Page 1 of 1

How to cut a long,long pic into multiple pages for printing?

Posted: 2013-03-30T21:54:09-07:00
by bensto
Assume I have a long,long,long picture (e.g. 1060 * 4620 pixels).

I want to print it out on physical or pdf printer.

BUT I don't want to shrink or stretch the picture or let it somehow fit on ONE page.

Instead it should be adjusted/cut so that the current WIDTH fits exactly on one page.
If the length of the picture is too big to fit on the first page then automatically additional pages should be printed.

To perform this operation I have to cut the picture into multiple chunks.
The width and height of each picture chunk should be automatically calculated by ImageMagick according to the target print paper size (letter or DIN A4 or X*Y mm).

How can I do this with ImageMagick?

Re: How to cut a long,long pic into multiple pages for print

Posted: 2013-03-30T22:12:50-07:00
by snibgo
"-Crop" will chop up the image, eg ...

Code: Select all

convert x.png -crop 1060x600 out.png
... will create 8 output files.

IM knows about many paper sizes, but I never use them so can't advise. See http://www.imagemagick.org/script/comma ... s.php#page

Re: How to cut a long,long pic into multiple pages for print

Posted: 2013-03-30T22:33:11-07:00
by fmw42
To perform this operation I have to cut the picture into multiple chunks.
The width and height of each picture chunk should be automatically calculated by ImageMagick according to the target print paper size (letter or DIN A4 or X*Y mm).

How can I do this with ImageMagick?
No, not to my knowledge. IM is basically a pixel processor. The only command that knows and respects the density is -resample. So you probably need to do those calculations ahead of time to convert dpi to pixels.

See
http://www.imagemagick.org/script/comma ... p#resample
http://www.imagemagick.org/script/comma ... s.php#page