I am currently evaluating version 17.2 with the view to upgrading our Aspose Pdf from our current version of 3.8.
Hi Mark,
Thanks for contacting support.
Please note that you are trying to use XML structure which was supported by old Aspose.Pdf.Generator approach. Whereas it is strongly recommended to use new DOM (Document Object Model) approach. In DOM supported XML schema, a new element HtmlFragment has been introduced which can be used to display HTML supported text in the document.
Please check the following XML and code snippet to convert XML into PDF. I have modified your XML to following XML and used new DOM approach to convert it into PDF.
[XML]
<?xml version="1.0" encoding="utf-8" ?>
This is simple Text.
<![CDATA[
Test string
]]>
[C#]
Document doc = new Document();
doc.BindXml(dataDir + “XML2PDF.xml”);
doc.Save(dataDir + “XMLToPDF_out.pdf”);
For the reference I have also attached the generated output by above code. You may check the new approach in “Working with Aspose.Pdf” section of API documentation. In case if you need further assistance please feel free to contact us.
Best Regards,
Hi Asad,
Hi Mark,
regarding new DOM approach is under process. I hope that you will get updated information about working with XML using new DOM approach in API documentation soon. In case of any further assistance please feel free to contact us. We are sorry for the inconvenience.