Page 1 of 1

How to convert PDF to PNG and cut each page to half?

Posted: 2011-02-20T02:03:50-07:00
by rondesta
Hi,

I'm trying to convert a PDF file. The file is a presentation that each page contains 2 slides.
I want to convert it in way that I'll get PNG for every slide (not page).

I tried:

Code: Select all

convert file.pdf file.png
but it creates a PNG for every page.
I assume that I need to use one of the functions to cut each page to half (relatively to the height) but I don't know which one.

Thanks,

Ron.

Re: How to convert PDF to PNG and cut each page to half?[SOL

Posted: 2011-02-20T03:16:26-07:00
by rondesta
I figured it out:

Code: Select all

convert -crop widthXheight file.pdf file.png

Re: How to convert PDF to PNG and cut each page to half?

Posted: 2011-02-20T17:38:13-07:00
by anthony
Try -crop 2x1@ instead That will not need you to pre-calculate the size, but divide the image in two as equally as possible.

http://www.imagemagick.org/Usage/crop/#crop_equal

There are also options to add some overlap to the two halves :-)