Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

Slice long image into a multipage PDF

$
0
0

I have a PNG image (a screenshot of a web page) around 1000 by 9000 pixels, and I want to slice it into a multipage PDF, either Letter (8.5 by 11 inches) or A4 (210 x 297 mm), with 1 inch margins.

For convenice, here are Letter dimensions in inches and also in pixels:

8.5 inches = 612 pixels at 72 PPI, 2550 pixels at 300 PPI11  inches = 792 pixels at 72 PPI, 3300 pixels at 300 PPI

I tried

  • magick input.png -crop x3300 +repage output.pdf
  • magick input.png -crop x2700 +repage output.pdf

but those versions doesn't leave margings.

I also tried the following version

magick input.png -crop x1414 -repage 1200x1614+100+100 output.pdf

which I found on the ImageMagick forum, but after spending 3 hours I still don't understand how it work. And how to adjust it to my needs.


Viewing all articles
Browse latest Browse all 12141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>