Free Support Forum - aspose.com

Page numbering format

Hello,

I am appending multiply documents.

Some documents have page numbering in bottom-center, some: bottom-right.

How programmatically fix in the final document with page numbering: bottom-center.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks

RK

Hi Rudolf,

Thanks for your request. You can set position of page numbers using several approaches. You can achieve this using frame, text box, table or just by specifying paragraph alignment. So there is no single way to change position of page numbers. All depends on your documents.

As an option, you can remove Footers from all sections in your final document and insert your own footer with page numbers positioned as you need.

Best regards,

Hello Alexey,


Thank you for your reply,
I did add two lines of code and now it's works properly.
builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;

Regards,

RK

Hi Rudolf,

It is perfect that you managed to achieve what you need. Please feel free to ask in case of any issues, we are always glad to help you.

Best regards,