I originally posted a bug report (PDFNEWNET-35944) and the font portion of the bug was fixed, however, there were two issues, not one and the second has not been resolved.
Having set a font name and size for a text element I find that these values are ignored if IsHtmlTagSupported is set to true. This is now fixed
If, however I set UseTextInfoStyle="true", the font name and size are correct but all the HTML tags are then ignored. This is not fixed.
This is the c# code demonstrating the issue:
//Instantiate the Pdf instance
Pdf pdf = new Pdf();
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(@"c:\Development\Libs\Aspose.Pdf.lic");
//Bind the XML and XSLT file
pdf.BindXML(@"c:\temp\test.xml", null);
//Save the resultant PDF
pdf.Save(@"c:\temp\test.pdf");
and the XML:
<Pdf xmlns="Aspose.Pdf">
<Section
PageMarginRight="25"
PageMarginTop="25"
PageMarginLeft="25"
PageMarginBottom="25"
PageWidth="816"
PageHeight="1050" >
<Text
MarginTop="0.5cm"
FontName="Tahoma"
FontSize="10">
<Segment>
This is the basic text.
</Segment>
</Text>
<Text
MarginTop="0.5cm"
IsHtmlTagSupported="true"
FontName="Tahoma"
FontSize="10">
<Segment>
This is <span style="color: red;">also</span> test text with IsHtmlTagSupported="true".
</Segment>
</Text>
<Text
MarginTop="0.5cm"
IsHtmlTagSupported="true"
UseTextInfoStyle="true"
FontName="Tahoma"
FontSize="10">
<Segment>
This is <span style="color: red;">also</span> test text with IsHtmlTagSupported="true" and UseTextInfoStyle="true".
</Segment>
</Text>
</Section>
</Pdf>
Using Aspose to create a PDF from this XML shows that the third line has the correct font but the HTML tags in the text have been ignored. I was expecting the work 'also' to be red as in the second line.
Your help would be appreciated.
Having set a font name and size for a text element I find that these values are ignored if IsHtmlTagSupported is set to true. This is now fixed
If, however I set UseTextInfoStyle="true", the font name and size are correct but all the HTML tags are then ignored. This is not fixed.
This is the c# code demonstrating the issue:
//Instantiate the Pdf instance
Pdf pdf = new Pdf();
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(@"c:\Development\Libs\Aspose.Pdf.lic");
//Bind the XML and XSLT file
pdf.BindXML(@"c:\temp\test.xml", null);
//Save the resultant PDF
pdf.Save(@"c:\temp\test.pdf");
and the XML:
<Pdf xmlns="Aspose.Pdf">
<Section
PageMarginRight="25"
PageMarginTop="25"
PageMarginLeft="25"
PageMarginBottom="25"
PageWidth="816"
PageHeight="1050" >
<Text
MarginTop="0.5cm"
FontName="Tahoma"
FontSize="10">
<Segment>
This is the basic text.
</Segment>
</Text>
<Text
MarginTop="0.5cm"
IsHtmlTagSupported="true"
FontName="Tahoma"
FontSize="10">
<Segment>
This is <span style="color: red;">also</span> test text with IsHtmlTagSupported="true".
</Segment>
</Text>
<Text
MarginTop="0.5cm"
IsHtmlTagSupported="true"
UseTextInfoStyle="true"
FontName="Tahoma"
FontSize="10">
<Segment>
This is <span style="color: red;">also</span> test text with IsHtmlTagSupported="true" and UseTextInfoStyle="true".
</Segment>
</Text>
</Section>
</Pdf>
Using Aspose to create a PDF from this XML shows that the third line has the correct font but the HTML tags in the text have been ignored. I was expecting the work 'also' to be red as in the second line.
Your help would be appreciated.