Page 1 of 1

Help cropping pdf to pgm exporting only single crop section

Posted: 2013-04-11T10:21:38-07:00
by indefinitedrums
Hello all, please forgive me if this is covered or if I just missed something, I did some extensive searching first, and couldnt find a solution...

I am trying to use convert to take the first page of a pdf, crop it to small box in the top left corner, and save it as a pgm... this is the command I am using

Code: Select all

convert.exe -density 150 doc.pdf[1] -crop 425x206 -density 150 out.pgm
this DOES indeed crop to the desired size, but with an odd side effect... it 'layers'(?) the rest of the page in 425x206 boxes behind the desired cropped image, so when I go to OCR out.pgm, the other "boxes" are read as well, making the crop useless!

I know I just must be missing something here, could someone point me in the right direction? Thank you in advance for any help

Re: Help cropping pdf to pgm exporting only single crop sect

Posted: 2013-04-11T10:25:11-07:00
by indefinitedrums
aaaaaaaaaaaaaaaaaaaaand as soon as I posted, I realized my mistake.... I needed to add 0+0 to my crop dimensions to exclude the rest of the page.

Code: Select all

convert.exe -density 150 doc.pdf[1] -crop 425x206+0+0 -density 150 out.pgm
My apologies, and thank you for such a powerful tool!