Page 1 of 1

Trouble with PDF to jpeg conversion

Posted: 2012-03-06T00:27:12-07:00
by dimazelensky
Hi!

I need to convert multipage PDF-document into separate JPG files with definition 300 DPI.

I used the following algorithm:
1. conversion of multipage PDF file into onepage documents by meas of Mac OS (Automator).
2. conversion of onepage PDF into jpeg using command mogrify -density 300 -quality 100 -format "jpeg" *.pdf

But it final jpeg files I have white margins on the top and sometimes at the right of image.

There is no such a problem if I use automator :(

Image
Image

Re: Trouble with PDF to jpeg conversion

Posted: 2012-03-06T11:07:34-07:00
by fmw42
did you try

convert -density 300 image.pdf image_%d.jpg

it should separate each page into a jpg with _0, _1 ect appended.

Try this, it works for me IM 6.7.5.10 Q16 Mac OSX Snow Leopard:


convert rose: rose: rose: rose.pdf
identify rose.pdf
rose.pdf[0] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 476B 0.000u 0:00.020
rose.pdf[1] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 476B 0.000u 0:00.000
rose.pdf[2] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 476B 0.000u 0:00.000
convert -density 300 rose.pdf rose_%d.jpg
identify -verbose rose_0.jpg
Image: rose_0.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 292x192+0+0
Resolution: 300x300