Page 1 of 1

Why PDF read into imagick always small resolution.

Posted: 2012-10-16T10:35:42-07:00
by JohnSmith
I kind of hate how imagick works with psf's at this point. When i $im->readImage($pdf_file_path); size is about 600x400px why its so small?

Re: Why PDF read into imagick always small resolution.

Posted: 2012-10-16T11:12:57-07:00
by fmw42
unless there is a raster imbedded in the pdf, pdf files are basically vector and thus have no size. They need to be told what size to use to convert to some other raster format. The is done via the -density parameter.

see
http://www.imagemagick.org/Usage/formats/#vector

Re: Why PDF read into imagick always small resolution.

Posted: 2012-10-16T12:18:57-07:00
by JohnSmith
Would be great if it could be same size as when you open pdf in adobe reader and set zoom to 100%...

By the way i use imagick for php i dont want to run shell commands for security reasons.

Re: Why PDF read into imagick always small resolution.

Posted: 2012-10-16T14:46:28-07:00
by fmw42
JohnSmith wrote:Would be great if it could be same size as when you open pdf in adobe reader and set zoom to 100%...

By the way i use imagick for php i dont want to run shell commands for security reasons.

Each viewer may set its own default density, so they all do not necessarily display the same size for 100%.

You can try setting -density 72 or -density 96 as the two most likely densities.