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

Free Support Forum - aspose.com

Reg XSL FO - XML to pdf

Hi Team,

We are using ASPOSE.PDF and wanted to know whether we will be able to convert XML which uses XML FO (XSLT) to convert to pdf? If so please provide me more details on how can we achieve this.



Aspose.PDF offers BindXml() method to create PDF using XML and XSLT style. Following code snippet can be used to generate PDF using both files provided that the XML and XSLT elements sequence is based on Aspose.Pdf XML Schema:

Document pdfDocument = new Document();
pdfDocument.BindXml("input.xml", "input.xsl");

A complete example is also given in API documentation to create Hello World PDF Document using XML and XSLT. In case you need further assistance, please feel free to let us know.

I tried this but it does not work for me as it provides errors saying “Data at the root level is invalid. Line 2, position 3.” string"

We are using the existing XLST which has XSL with FO and its not converting the same.

Please let me know if anything needs to be done to make it work.



Could you please share the sample input files which you are trying to convert into PDF. We will test the scenario in our environment and address it accordingly.