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

Free Support Forum - aspose.com

Color malfunction when using toPDF

Please check the following code example. It should make a pdf file with a black text, a red one and a light-purple one. In stead of that, all text is coloured like specified in the last tag.

public void myTestHTML()
Pdf pdf1 = new Pdf();
Section sec1 = pdf1.Sections.Add();
string s = "Test black text Arial 9";
Text t = new Text(s);
t.TextInfo.FontName = "Arial";
t.TextInfo.FontSize = 9;
t.TextInfo.Color = new Aspose.Pdf.Color("Black");
string s2 = "Some red text should be here ";
Text t2 = new Text(s2);
t2.IsHtmlTagSupported = true;
string s1 = "This is a test for HTML" +
"with colored text.";
Text t1 = new Text(s1);
t1.IsHtmlTagSupported = true;

Hello Radu,

Thanks for using our products.

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNET-16422. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

The issues you have found earlier (filed as 16422) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.