Using Spire.Doc to generate word doc file.
Then we need this file to be saved as .doc and .pdf.
In doc file all is ok, but in pdf number of pages have default font (I change font for footer) - see attached file.
This is code:
Spire.Doc.Fields.TextRange tRangeC31 = paragraphC3.AppendField("pagenumber", Spire.Doc.FieldType.FieldPage);
tRangeC31.CharacterFormat.FontSize = footerFontSize;
Spire.Doc.Fields.TextRange tRangeC32 = paragraphC3.AppendText(" / ");
tRangeC32.CharacterFormat.FontSize = footerFontSize;
Spire.Doc.Fields.TextRange tRangeC33 = paragraphC3.AppendField("numberofpages", Spire.Doc.FieldType.FieldNumPages);
tRangeC33.CharacterFormat.FontSize = footerFontSize;
Have a nice day.