IsFirstPageOnly no effect

Hello, I also use xml to create the pdf, In "Header", I already use the attribute "IsFirstPageOnly" but the "Header" also shown in page 2,3,4.......

The xml code:

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













Test Header




Others






Chinese


Help me please, Thank you.

Hello Mok,

Thanks for considering Aspose.

I've tested the scenario and I'm unable to reproduce the problem with latest version of Aspose.Pdf 4.1.0.0. The resultant PDF does not contain Header section over pages other than 1. I've used the following XML file to test the issue. The resultant PDF is also in attachment, please take a look.

You can donwload the latest version from here.

[XML]

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

<Pdf xmlns="Aspose.Pdf" DestinationType="FitPage">

<Section>

<Header MarginTop="30" MarginBottom="50" IsFirstPageOnly="true">

<Table ColumnWidths="240 180">

<All LineWidth="0">

<Border>

<All LineWidth="0">

</Border>

<Row>

<Cell>

<Segment FontSize="8" IsUnicode="true">Test Header</Segment>

</Cell>

<Cell>

<Text MarginTop="10">

<Segment FontSize="8" IsUnicode="true">Others</Segment>

</Cell>

</Row>

</Table>

<Text Alignment="Center" MarginTop="30" MarginBottom="20">

<Segment IsUnicode="true" IsTrueTypeFontBold="true" IsUnderline="true">Chinese</Segment>

</Section>

<Section>

<Text Alignment="Center" MarginTop="60" MarginBottom="20">

<Segment IsUnicode="true" IsTrueTypeFontBold="true" IsUnderline="true">Second page without Header</Segment>

</Section>

</Pdf>

In case you are still facing an issue, please feel free to contact.