HeaderFooterTemplate

HeaderFooterTemplate

Forum member · Mar 28, 2025
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);

Re: HeaderFooterTemplate

Support · Apr 1, 2025
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 [^a|mailto:support@dynamicpdf.com|opennewwindow|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