From owner-freebsd-doc@FreeBSD.ORG Sat Nov 9 11:29:13 2013 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0FDC997 for ; Sat, 9 Nov 2013 11:29:12 +0000 (UTC) (envelope-from juris.kaminskis@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C84B2824 for ; Sat, 9 Nov 2013 11:29:12 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id ey11so471905wid.13 for ; Sat, 09 Nov 2013 03:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=thcimkdj2M13gWyYctMVzG0ofQI2UNTdp2Drf2bKdno=; b=aH67TrKOuJrAXJCWWZJeInpEU3QEgUJ7q4/lp/mKpLP2pga2l7uXBPeFvq9CoWx3zl 4H6GCLYOa2OyyhhwSFeTV5EMBV9aapCuGYy7N6H0H7HUexSadg3rTpss/WIIXfTYIHhJ C4jWViGb7y/VgqDPHTJpjBhH2BF/gzx2U7KNo0xLiwCXAz6KWMwj6yDJB5pKnSYjB2t/ ft0bw7zYeBoFASNgVBd7mWQy+/916sNjDTy771SBcRjOLxMqm35PCCgCeELOS7sWcE/0 3NoGGiWhm9AF5qK1JIwchxJT1GHRV3xgVnn8zXehQ2ZWKaUiTd0rKZe/ZgobHPC7hFtn zYAA== MIME-Version: 1.0 X-Received: by 10.180.37.114 with SMTP id x18mr5729444wij.64.1383996550769; Sat, 09 Nov 2013 03:29:10 -0800 (PST) Received: by 10.194.185.101 with HTTP; Sat, 9 Nov 2013 03:29:10 -0800 (PST) In-Reply-To: References: Date: Sat, 9 Nov 2013 13:29:10 +0200 Message-ID: Subject: Re: TODO item: Add info on USB printers From: Juris Kaminskis To: Warren Block Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-doc@freebsd.org X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 11:29:13 -0000 2013/11/5 Warren Block > On Mon, 4 Nov 2013, Juris Kaminskis wrote: > > >> Thank you for working on this. The entire printing chapter >> really needs a rewrite, and I've been meaning to write an outline for wh= at >> a new printing chapter >> should cover. In the meantime, please look at >> http://www.wonkity.com/~wblock/docs/html/lpdprinting.htmland= see if it is adequate in the meantime. >> >> >> I am not sure I understand what should I do next from this. Can you let >> me know how can I contribute further? >> > > I've done some preliminary work on a rewrite of the printing chapter. Can > you look at the article above and see if anything important is left out? > > Thanks! Chapter Printing Directly requires some minor update I think: Printing Directly A spooler is not required. Sometimes it=92s simpler to just print data directly to a device or to troubleshoot printing setup: % cat myfile.txt > /dev/lpt0 */dev/lpt0* the standard parallel port */dev/ulpt0* the standard USB printer port */dev/unlpt0* the non-reset USB printer port, use if */dev/ulpt0* does not work correctly netcat (*nc(1) *) can be used to print directly to network printers: % nc nethplaser 9100 < myfile.txt *nethplaser* the DNS name of the network printer *9100* the network port used by HP and some other brands *lpd* printing using the standard *lpr(1) * i= s usually more convenient and more versatile than direct printing. Many printers use different file transfer protocols, therefore convert myfile.txt in appropriate format. Several convertors exist to name few: ghostscript and foo2zjs. For example for certain types of HP Laserjet use XQX stream: foo2xqx-wrapper myfile.ps > /dev/ulpt0 and chapter Adding filter first parapgraph would in my mind be better if like this: Adding A Filter Many Unix applications produce *PostScript* output, but not all printers are Postcript compliant. Verify what file protocol printer accepts and then proceed adding a specific filter. For example many inexpensive printers understand *PCL*This filter uses *Ghostscript* to translate PostScript code into PCL. Save it in*/usr/local/libexec/ps2pcl* and then make it executable: