2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Yes, it is possible to create different header and footer in a document by using the LinkToPrevious property of the Section object. By setting this property as false, we can create different header/footer for each section. Please find the below code snippet to do so C# WParagraph pa = new WParagraph(doc); pa.AppendText("Page1_Header1"); doc.LastSection.HeadersFooters.Header.Paragraphs.Add(pa); doc.AddSection(); doc.LastSection.HeadersFooters.LinkToPrevious = false; pa = new WParagraph(doc); pa.AppendText("Second Page _Header2"); pa.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Right; doc.LastSection.HeadersFooters.Footer.Paragraphs.Add(pa); VB Dim pa As WParagraph = New WParagraph(doc) pa.AppendText("Page1_Header1") doc.LastSection.HeadersFooters.Header.Paragraphs.Add(pa) doc.AddSection() doc.LastSection.HeadersFooters.LinkToPrevious = False pa = New WParagraph(doc) pa.AppendText("Second Page _Header2") pa.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Right doc.LastSection.HeadersFooters.Footer.Paragraphs.Add(pa) |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.