Why PDF read into imagick always small resolution.
Why PDF read into imagick always small resolution.
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?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Why PDF read into imagick always small resolution.
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
see
http://www.imagemagick.org/Usage/formats/#vector
Re: Why PDF read into imagick always small resolution.
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.
By the way i use imagick for php i dont want to run shell commands for security reasons.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Why PDF read into imagick always small resolution.
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.