Quantcast

wxpdfdocument: insert a pdf image (from file)?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wxpdfdocument: insert a pdf image (from file)?

Frédéric Bron
Is it possible to read a pdf page from a file and add it to a pdf
document as a vectorial image?
I would like to read a cover page from a file and add to it some
information (text), then create myself the rest of the document.

Frédéric

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxpdfdocument: insert a pdf image (from file)?

Ulrich Telle
Hi Frédéric,

> Is it possible to read a pdf page from a file and add it to a pdf
> document as a vectorial image?

Yes, wxPdfDocument supports this through the "external template"
mechanism. The first step is to use method SetSourceFile of the
wxPdfDocument class to associate the PDF file containing the page in
question. The second step is to import the page in question as a
template using method ImportPage. The third step is then to add the
template to the resulting PDF document using method UseTemplate. It is
possible to tweak the bounding box of the template before adding it to
the final document (see template sample coming with wxPdfDocument).

> I would like to read a cover page from a file and add to it some
> information (text), then create myself the rest of the document.

Modifying an imported page is not directly supported by wxPdfDocument.
However, you can add the template (cover page) first and then place text
on top of it.

Regards,

Ulrich

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxpdfdocument: insert a pdf image (from file)?

Frédéric Bron
Hi Ulrich,

> Yes, wxPdfDocument supports this through the "external template" mechanism.

This is wonderful. Your library is so useful. Thanks a lot.

Frédéric

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Loading...