We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text color changed in Aspose PDF

In the attached Aspose generated PDF, on page 393 you can see that the text color switches from black to yellow. However, the footer page numbers are not yellow, and neither is the attached Word file. The rest of the PDF also continues to be black.

We are running Aspose.Words 10.8.

Hi
Nick,


Thanks for your inquiry. The problem occurs because Character Level Formatting is being applied to this problematic portion of your document. In MS WORD you can verify this by using Style Inspector as shown in the following figure:


Moreover, to be able to clear all such Character Formatings from your document, I would suggest you please try using the following code snippet:

Document
doc = new Document(@“C:\temp\in.doc”);

NodeCollection runs = doc.GetChildNodes(NodeType.Run,
true);
foreach (Run run in runs)
{
run.Font.ClearFormatting();
}

doc.Save(@“C:\temp\out.pdf”);

I hope, this will help.

Best Regards,