command line image printing
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
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement