Trouble with PDF to jpeg conversion

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dimazelensky
Posts: 1
Joined: 2012-03-05T23:38:31-07:00
Authentication code: 8675308

Trouble with PDF to jpeg conversion

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Trouble with PDF to jpeg conversion

Post 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
Post Reply