Free Support Forum -

Help on passing variable at header

hi guys,
i want to display sectionID at header, please help me to passing variable data (like section ‘ID’) at header in pdf doc, i unable to do.

as for examp:

weekly release section ‘A’ page 1

weekly release section ‘B’ page 5

weekly release section ‘F’ page 9


Dear sojib,

Thank you for considering Aspose.

Do you mean your section ID is assigned at run time and you want to display the ID at the header? Here is an example:

<?xml version="1.0" encoding="utf-8" ?>

weekly release section

#$TAB#$TAB#$TABPage $p

This is section 1.

[C# code]
Pdf pdf = new Pdf();
Section sec1 = pdf.Sections[0];

sec1.ID = "A";

Segment seg1 = sec1.GetObjectByID("SectionID") as Segment;
seg1.Content = sec1.ID;


[VB code]
Dim pdf As Pdf = New Pdf()
Dim sec1 As Section = pdf.Sections(0)

sec1.ID = "A"

Dim seg1 As Segment = sec1.GetObjectByID("SectionID") as Segment
seg1.Content = sec1.ID


I hope this can help you.