HeaderFooterTemplate

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v12)  /  HeaderFooterTemplate

DynamicPDF CoreSuite for .NET (v12) Forum

 Mar 28 2025 1:56 PM
I'm creating a PDF document that requires "banner text" at the top and bottom of the the document.   When the document is rendered, there's text at the bottom of the file only. My assumption was there would be text in the "Header" and "Footer" of the document.   I used the following code below.

 Document document = new Document();
 ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page();

 HeaderFooterTemplate headerFooter = new("UNCLASSIFIED", "UNCLASSIFIED");

 document.Template = headerFooter;
          
 document.Pages.Add(page);
 Apr 01 2025 4:49 AM
Posted by a ceTe Software moderator
Hi,

We  tested  this on our end using the code sample you posted and are able to render specified header and footer text on the PDF page without any problem.

Here is a code sample.

            Document document = new Document();
            ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page();
            HeaderFooterTemplate headerFooter = new HeaderFooterTemplate("UNCLASSIFIED", "UNCLASSIFIED");
            document.Template = headerFooter;
            document.Pages.Add(page);
            string output = @"C:\\Temp\MyDocument.pdf";
            document.Draw(output);

Please try the above code sample on your end and see if it works for you. If you continue facing an issue then please send over the following information to support@dynamicpdf.com so we can look into it further.

1.Code sample or simple Console application which uses static data to recrate the issue.
2.Output PDF.
3.Exact version and build number of DynamicPDF Core Suite for .NET product DLL file used in your application. You can find this information by right clicking on the Core Suite DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.

Thanks,
ceTe Software Support Team
 Apr 01 2025 9:44 PM

All times are US Eastern Standard time. The time now is 4:21 AM.