ImageMagick 7.0.8-47 Q16 x64
magick.exe identify -verbose 20190528161806907.pdf
Source Image
output
Problem: I'm sure that sample pdf-file contains scanned A4 page with 400dpi setting.
(I have double checked it on different DPI using the ruler and counting the pixels of one letter width with 3200% magnification)
But I can't see true DPI and image size in pixels anywhere in the "identify" command output.
Only 72dpi and accordin image size is shown.
bug (or feature?) of "identify" of the scanned PDF
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: bug (or feature?) of "identify" of the scanned PDF
Your PDF contains a single page, which has a single embedded raster image and nothing else. IM will rasterize the page at whatever density (aka "resolution", eg pixels per inch) you want, which is useful for vector images. But this will resample any embedded images, which you don't want.
If you want to simply extract the embedded image, I suggest you use pdfimages instead of IM.
If you want to simply extract the embedded image, I suggest you use pdfimages instead of IM.
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: bug (or feature?) of "identify" of the scanned PDF
IM doesn't know the true parameters of the embedded image. It only knows the parameters of the rasterized page.
To find the true parameters of the embedded image, extract it with pdfimages, and use "identify" on that.
To find the true parameters of the embedded image, extract it with pdfimages, and use "identify" on that.
snibgo's IM pages: im.snibgo.com