How to change the Fonat name and size of the page number in footer (Aspose.Words)


#1

Hi,

Pls guide me to change the Fonat name and size of the page number in footer (Aspose.Words)

Regards,

I.Prabhaharan.


#2

Do you want to change font properties of a page number field already existing in the document?


#3

Hi,

I am newly including page number in word document on the fly. That should be "Times New Roman" with size 10.

Regards,

I.Prabhaharan.


#4

Try the following code snippet:

builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);

builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;

builder.Font.Size = 10;

builder.Font.Name = "Times New Roman";

builder.Write("Page ");

builder.InsertField("PAGE", "");

builder.Write(" of ");

builder.InsertField("NUMPAGES", "");