Sign in to follow this  

command line image printing

This topic is 3856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. Is there a command line way of saying "print the following images, each of which must be scaled and rotated as necessary to fill a Xcm by Ycm page as much as possible while preserving aspect ratio?" Even better would be to also specify that the image should be horizontally and vertically centred whatever the page size. Thanks

Share this post


Link to post
Share on other sites
I'm no ImageMagick expert, but maybe the following will get you started. It assumes all the files in the current working directory are images to be printed. You'll have to change the glob in other cases.


for i in *; do convert -page A4 +repage "$i" ps:- | lpr


You'll want to run some tests before blindly running the batch job, as you'll likely have to tweak this one-liner. I didn't test it myself.

Hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this