Articles in this section
Category / Section

How to preserve form fields while overlaying documents?

1 min read

To preserve form fields while overlaying documents, you can load the PDF that contains forms in PdfLoadedDocument and then draw the overlay PDF as a template in the loadeddocument.

Refer to the following code example to achieve the above.

C#

//Load the border template
PdfLoadedDocument ldDoc1 = new PdfLoadedDocument(@"BorderTemplate.pdf");
//Load the Form document
PdfLoadedDocument ldDoc2 = new PdfLoadedDocument(@"Form.pdf");
//Draw the border template in form document  
 for (int i = 0, count = ldDoc2.Pages.Count; i < count; ++i)
 {
PdfPageBase lpage = ldDoc1.Pages[0];
PdfTemplate template = lpage.CreateTemplate();
ldDoc2.Pages[i].Graphics.DrawPdfTemplate(template, PointF.Empty, ldDoc2.Pages[i].Graphics.ClientSize.ToSize());
}

Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/general/OverlayForms-354894904.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied