Converting Xml to pdf


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

The sample files I am using are from W3Schools (

code snippet:

Pdf pdf = new Pdf();

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



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