Problem rendering PDF to jpg/png

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
SockPants

Problem rendering PDF to jpg/png

Post by SockPants »

Hi,

I'm using this to convert a pdf file to images:

convert input.pdf[0] -units PixelsPerInch -density 400 -page A0 -quality 95 output.png

My aim is to get a large image, but somehow it stays 612x792. I can change the density and page and nothing happens. I tried -resample and -resize but they just enlarge the image after it has been rasterized, which makes it ugly.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem rendering PDF to jpg/png

Post by snibgo »

You are reading the image, which rasterizes it, then changing the density etc. Try changing the order.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem rendering PDF to jpg/png

Post by fmw42 »

put units and density before the input image as snibgo suggested. You need to tell PDF files what density to use as they have no internal density since they are vector format.
Post Reply