Free Support Forum -

PDF on footer not picking up font size


I've got Aspose.Word and I add a footer to the document in memory. Convert it to a pdf and the formatting of the footer doesn't take effect, except for the paragragh alignment. Any ideas...?


//Add a footer to each page of the word document.

Aspose.Word.Section sect = sourceDoc.Sections[0];

Aspose.Word.HeaderFooter footer = new Aspose.Word.HeaderFooter(sourceDoc, Aspose.Word.HeaderFooterType.FooterPrimary);


//Now you can add some paragraphs or whatever to the footer:

Aspose.Word.Paragraph para = new Aspose.Word.Paragraph(sourceDoc);

para.ParagraphFormat.Alignment = Aspose.Word.ParagraphAlignment.Right;

para.Font.Size = 8;

para.Font.Underline = Aspose.Word.Underline.Single;

para.AppendChild(new Run(sourceDoc, footerText));


The problem is not related to PDF conversion.

The font formatting should be applied to Run object to take effect:

Paragraph para = new Paragraph(doc);

Run run = new Run(doc, "Footer Text");

run.Font.Size = 16;

run.Font.Underline = Underline.Single;



para.ParagraphFormat.Alignment = ParagraphAlignment.Right;