2

I have to make a photocopy of my driving license. I've scanned the front and back sides, and generated a PDF for each side (and a PNG as well just in case).

So far, so good. Imagemagick reports:

$ identify front.pdf back.pdf
front.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2KB 0.010u 0:00.000
back.pdf[1] PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2KB 0.000u 0:00.000

That's ok. Now, each PDF has the driving license in the top right corner, the rest of the page is blank. I want to crop the pages in half, so in the final document I have the front side in the top half. of the photocopy, and the back side in the bottom half of the photocopy. So I do this:

$ convert back.pdf -gravity north -crop 100x50% -density 300 +repage back_crop.pdf

But that's not good, because identify reports wrong sizes:

back_crop.pdf PDF 147x190 147x190+0+0 16-bit Bilevel DirectClass 3.67KB 0.000u 0:00.000

Anyways, if I keep going, I use convert -append to combine the two images, and apparently the result is OK, but when I try to print the file, or if I check the embedded page geometry size using identify, the result is all over the place.

How can I do it? I think the cropping step is the one that's failing here.

0

You must log in to answer this question.

Browse other questions tagged .