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: Sun, 3 Apr 2005 19:13:35 +0000 (UTC)

For converting p*m to ps use not pbmtolps (which is for ps printers?) but pnmtops, which also lets you scale, choose dpi, center, change height and width.


To reduce to 1/4 width pbmreduce 4 filename.pbm

To print a pdf file on a deskjet 500, could I use the following script?
Call it printpdfdj and chmod +x.

#!/bin/sh
insmod lp (assuming parport and parport_pc already installed)
pdftopbm $1|pbmreduce 4|pbmtojl > /dev/lp0
(pdftopbm from gs or maybe netpbm has something similar)

Similarly for printing jpegs or gifs:
jpegtopbm (if it exists) ...

netpbm programs probably of use:
pbmreduce/pnmenlarge (by integer factor) - won't reduce color?
pnmrotate angle filename.p*m (by -90 to +90)
pnmflip -lr (left-right) or -tb (top-bottom) or -xy (transpose) etc.
pbmtext - convert text to image (in order to label images?)
pamcomp - overlay two images, can adjust transparency
pnmcut and pnmpaste - copies out a rectangle and pastes it back
(Can this be used to crop? Or combined with pnmcomp?)
pnmcat - stick two images side by side or one above the other, choose whether to center if not the same size, white or black background

keesan AT sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org




Archive powered by MHonArc 2.6.24.

Top of Page