Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
5 posts • Page 1 of 1
cutecode wrote:I scoped to insert images to wxPdfDocument, and now I need to extract those images back from PDF file. Is it possible?
I looked at API docs and didn't find any function for it.
There is no pre-defined function for this purpose. Keep in mind that wxPdfDocument is meant for generating PDF documents, not for editing and/or manipulating existing PDF files.
The class wxPdfParser has the building blocks to read an existing PDF file and to extract objects from it, but you have to know a lot about the PDF format and how to interpret it. That is, in principle it would be possible to extract images from a PDF file, but not out-of-the-box.
You would still have the problem to identify the images you need to extract. For this you might need to interpret the page content ... and wxPdfDocument has no support for this.
Conclusion: Not totally impossibe, but probably not easy to accomplish. Tools like PDFedit are most likely better suited for the purpose.
cutecode wrote:Actually I need images of every page, not an individual image with precise coordinates.
What library would you recommend? Will wxPdfDC satisfy my needs?
No, wxPdfDC is just a wxWidgets drawing context, not able to manipulate existing PDF files at all.
Maybe you could use PDFedit for this purpose.
Who is online
Users browsing this forum: No registered users and 2 guests