We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Insert page from another PDF document

Thread ID:





99577 May 30,2011 03:00 AM Jun 1,2011 02:15 AM Windows Forms 3
Tags: PDF
Guido Schrage
Asked On May 30, 2011 03:00 AM


I'm importing pages to a PdfDocument from a template PDF file located in the filesystem with the PdfDocument.ImportPage(...) method.

How can I insert such a loaded page at a specific position? The ImportPage(...) method just appends it.

The PdfDocument.Pages.Insert(...) method crashes, stating that the page already exists in another section.

Hope you can help me out, Regards

Geetha M [Syncfusion]
Replied On May 31, 2011 02:03 AM

Hi Guido,

Thank you for your interest in Syncfusion products.

You may create a PdfTemplate of the loaded page and draw at a new position in a new PdfDocument. Please refer to the code snippet given below:

PdfPage page = doc1.Pages.Add();
PdfGraphics g = page.Graphics;

PdfPageBase lpage = doc2.Pages[0];
PdfTemplate template = lpage.CreateTemplate();

g.DrawPdfTemplate(template, new PointF(100,100), page.GetClientSize());

Also, following is the link to our documentation which explains the same:
Import Pages As Templates
Please try this and let us know if you have any questions.


Guido Schrage
Replied On May 31, 2011 04:42 AM

Hi Geetha,

thanks for your response. I already read this solution, but what I don't mentioned in my first post (sorry) is that my PDF file template contains form fields and those get lost when just drawing an PdfTemplate on a new page.

I also don't know how to get the form fields of a specific page.

Any suggestions :) ?


Geetha M [Syncfusion]
Replied On June 1, 2011 02:15 AM

Hi Guido,

Thank you for the details.

Currently it is not possible to import an existing page with formfields based on position.

Please let us know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.