Re: getting a page from a PDF with core
Bob Friesenhahn <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 17 Apr 2016, [email protected] wrote: > Hi all, > > I'd like to open a PDF (or some other multi-page image type) with Core > and get a specific page. I can append a [number] to the filename, of > course, but I'd like to be able to do this with a memory buffer as > well, where no filename is around, and it would "feel" better to do it > with an int rather than setting a string. > > I found the ->scene member, which seems to be what Wand uses, but I > can't get it to work. This test program seems to always render the > whole PDF and then pick out page zero: What you are wanting is 'subimage' and 'subrange' in ImageInfo. These need to be specified in the image_info struct which is passed to ReadImage. subimage - Starting image scene ID to select subrange - Span of image scene IDs (from starting scene) to select I can't answer if ImageMagick still supports this interface. In GraphicsMagick, the rather obtuse SetImageInfo() function sets these values based on what it finds in the image->filename field. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z