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

Free Support Forum - aspose.com

Converting Xml to pdf

Hi

I am trying to convert xml to pdf, but the pdf is always blank.

The sample files I am using are from W3Schools (http://www.w3schools.com/xml/xml_xsl.asp)



code snippet:

Pdf pdf = new Pdf();

pdf.BindXml(new FileStream(@“c:\sample.xml”,FileMode.Open), new FileStream(@“c:\SSheet.xslt”,FileMode.Open));

pdf.Save(@“c:\output.pdf”);







Thanks

Hi Matthew,


Thanks for using our API’s.

In order to perform correct conversion, the input/source XML should be according to Document Object Model of Aspose.Pdf.Generator namespace. In case you need to use your own XML file, you can use XSLT to make it compatible with Aspose.Pdf DOM. For further details, please visit