Printing images through lpr

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
LangeNet

Printing images through lpr

Post by LangeNet »

Is there a way to print images in UNIX via the command line? Is there some preprocessing required to do something like lpr image.tff?

I've seached on here and see an unanswered request to this in the past...:(
Any suggestions??

Thanks in advance
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Printing images through lpr

Post by magick »

The lpr command should work fine. It generally contains filters to automatically convert most image formats to the output language of your printer. Its possible you may need a modern version of Linux which better supports a variety of image formats and printer models.
LangeNet

Re: Printing images through lpr

Post by LangeNet »

Thanks. My system Tru64 V5.1b does have the filters for the printer, just that I'm not sure about it's configuration.
I'm testing with HP LaserJet 4350. When I try to print the file, i get the ascii equivalent.

Here's my printcap file.

lp|lp0|0|laser:\
:af=/usr/adm/lpacct:\
:if=/usr/lbin/ppdof +OPageSize=Letter +Chplj4350.rpd:\
:lf=/usr/adm/lp0err:\
:lp=@idt-103/HP-HRES:\
:mx#0:\
:of=/usr/lbin/ppdof +OPageSize=Letter +Chplj4350.rpd:\
:pl#66:\
:pw#0:\
:rw:\
:sd=/usr/spool/lpd0:\
:xf=/usr/lbin/xf:


Should I be setting any particular switches?

N.B. I can print ok when I use display. What I'm looking for is to be able to print by the command line.

Robert
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Printing images through lpr

Post by magick »

This forum is about ImageMagick, not Unix printing. If you have a specific question about ImageMagick, let us know.
LangeNet

Re: Printing images through lpr

Post by LangeNet »

Thanks...and I realize that and make apologies for any perceived tangent. My goal is to get the IM rendered images printed and was just wondering if this was possible through IM and/or any of it's utilities in a UNIX environment.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Printing images through lpr

Post by anthony »

If your lpr command understand postscript but nor images directly you could try...

Code: Select all

 convert image .... -page A4 ps:- | lpr -
It should work, though I don't use it, prefering to print using a non-IM image viewer. Or taking the images via USB stick to a photo lab for high quality printing.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply