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?
How to cut a long,long pic into multiple pages for printing?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to cut a long,long pic into multiple pages for print
"-Crop" will chop up the image, eg ...
... 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
Code: Select all
convert x.png -crop 1060x600 out.png
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
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to cut a long,long pic into multiple pages for print
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.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?
See
http://www.imagemagick.org/script/comma ... p#resample
http://www.imagemagick.org/script/comma ... s.php#page