Skip to Content.
Sympa Menu

baslinux - Re: [BL] Printing CLI with BL without lpr - using cat and netpbm

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Printing CLI with BL without lpr - using cat and netpbm
  • Date: Tue, 5 Apr 2005 03:03:50 +0000 (UTC)

Netpbm prints ONLY .pbm (black and white) not greyscale or color.

To print 300x300 dpi .pbm files on a deskjet or laserjet use the following as script or alias (or CLI with filename.pbm instead of $1):

pbmtolj -resolution 300 $1 > /dev/lp0
(or probably just -r 300 will do it; you can also use /dev/lp1)

Laserjet printers and deskjet printers need a bidirectional cable for use with pbmtolj - with the wrong cable you will be told paper out and lp0 off line. (I don't know about other inkjet printers and cables)

pbmtolj prints 1:1 so you have to match the original resolution of the .pbm file (or the pdf or ps file you got it from using something like xpdf's pdfimages). Deskjet and laserjet print multiples of 75: 75,
150, 300, and maybe also 600.

The Epson Stylus Color (800 or C62) works with pbmtoescp2 which prints at a default 360 dpi, therefore a 300x300 dpi scanned file prints at 5/6 the original width and height (300/360).

I cannot find the man page for this but perhaps you can also change resolution (to 180, or 720, or even 1440, to be close to the dpi of the original image).

I printed a file scanned at 400x400 dpi with wide margins on all sides at 360x360, which was usable. If no margins you can print at 720x720 and it will get smaller.

pbmreduce will reduce by an integral factor, which is not usually helpful, and also degrades the quality badly.

pnmscale reduces or enlarges by nonintegral factors but converts pbm to pgm (greyscale), which won't print with netpbm, and pgmtopbm degrades quality. It is better than nothing if you don't have ghostscript and really need to print something the same size as the original but lower quality.

If you are trying to print something you scanned yourself, depending on the scanner, you may be able to match the printer resolution with S.A.N.E (scanimage).


One more posting to follow, on pbmtoppa. Deskjet 720c and 822cse. These 'Windows' printers refuse to print in black unless you have a color cartridge in them, and the 720c requires ink in the color cartridge (or maybe 3 colors ink - the 822 printed black with just a bit of blue ink in the color cartridge). We might squirt some black into the color cartridge. Earlier deskjets will 'print' even if the black cartridge is empty but require cartridges in both slots. I would recycle them except they do 600 dpi and are therefore useful for 200x200 dpi scanned files.

Sindi




Archive powered by MHonArc 2.6.24.

Top of Page