Getting Resolution of Multi-Page PDFs *Before* Splitting?
Posted: 2007-10-25T07:33:26-07:00
I want to parse out a multipage PDF, but I need to know what the resolution of the PDF is before I split it (so that the individual PDF pages have the same resolution as the initial file). However, I'm supposed to set the resolution before I read the file, but I can't set the resolution to what I need until I read the file and *get* the resolution.
I tried to work around this by creating one MagickWand resource to read and then a second one to split the PDF. The problem is when I try to get the resolution of a multipage PDF with MagickGetImageResolution(), it returns no value (and neither does MagickGetImageHeight(), MagickGetImageWidth() or MagickGetImageFormat()). Why don't these values show up in a multipage PDF? (Height and width I can understand, but shouldn't format work at least?) And how can I work around this?
--Ben
I tried to work around this by creating one MagickWand resource to read and then a second one to split the PDF. The problem is when I try to get the resolution of a multipage PDF with MagickGetImageResolution(), it returns no value (and neither does MagickGetImageHeight(), MagickGetImageWidth() or MagickGetImageFormat()). Why don't these values show up in a multipage PDF? (Height and width I can understand, but shouldn't format work at least?) And how can I work around this?
--Ben