Free Support Forum -

Aspose.PDF questions about even and odd pages handling

Hi, I’m using Aspose.PDF to create a PDF using the XML binding approach, and I would like to ask if I can handle even and odd pages differently.

For example, I would like to have a different footer for even pages and a different one for odd pages.

Thanks for your time!

Hi there,

Thanks for your inquiry. You can easily handle header/footer against even and odd pages. Please check following documentation link for sample code snippet/XML.

Please feel free to contact us for any further assistance.

Best Regards,

Thanks for the reply.

I used the attributes and separate the footers to odd and even using the Type attribute. My problem now is that the even footer does not appear on even pages. The odd footer appears correctly.

Here is a fragment from the XML I have used:

<Table ID=“op-content1” ColumnWidths=“50% 50%” DefaultCellPaddingTop=“5” DefaultCellPaddingLeft=“5” DefaultCellPaddingRight=“10”
DefaultCellPaddingBottom=“5” MarginBottom=“0.5cm” MarginLeft=“2.7cm” MarginRight=“2.73cm” IsKeptTogether=“false”>



$p / $P

$p / $P

Do you notice a mistake? Also can I have “$p/$P” instead of “$p / $P”?

Hi Giorgos,

Thanks for sharing the details.

have tested the scenario and I am able to notice the same problem that footer is not appearing in even pages. For the sake
of correction, I have logged this issue as PDFJAVA-33194 in
our issue tracking system. We will further look into the details of this problem
and will keep you updated on the status of correction. Please be patient and
spare us little time. We are sorry for this inconvenience.<o:p></o:p>

Now concerning to you query “Also can I have “$p/$P” instead of “$p / $P”?”, as per my understanidng, you do not want to have space between $p and $P. If so is the case, then please note that if we do not add space at the end of $p or $P, the sysmbol is not properly replaced. It’s a know issue. In case of any further query, please feel free to contact.