Articles in this section
Category / Section

How to add Header and Footer in an existing PDF document(PdfLoadedDocument)?

2 mins read

For adding Header and Footer in an existing PDF document, you can import the PdfLoadedDocument to PdfDocument and add the Header and Footer. Refer to the following code example.

C#

//Load the existing PDF document
PdfLoadedDocument document = new PdfLoadedDocument("../../Barcode.pdf");
//Create new Pdf Document instance
PdfDocument doc = new PdfDocument();
//Importing PdfLoadedDocument to PdfDocument
doc.ImportPageRange(document, 0, document.Pages.Count - 1);
//Including header and footer
doc.Template.Top = AddHeader(doc, "Header 1");
doc.Template.Bottom = AddFooter(doc, "Footer 1");

Sample Link:

http://www.syncfusion.com/downloads/support/directtrac/general/HeaderAndFooter-328822493.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