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

Free Support Forum - aspose.com

Blank pdf file when using pdf.BindFO(XmlDocument- XmlDocument)

I have attempted to use the BindFO(XmlDocument, XmlDocument) but no matter what I try I get a blank pdf file.

Here is a sample of my code:

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
XmlDocument myXPathDoc = new XmlDocument();
XmlDocument myXslTrans = new XmlDocument();

myXPathDoc.Load("C:\\1277\\11400.xml");
myXslTrans.Load("C:\\1277\\11400.xsl");


pdf.BindFO(myXPathDoc, myXslTrans);
pdf.Save("C:\\1277\\11400.pdf");

I have attached the the xml and xsl so you can test.

Thank you.

Is there anyone at aspose looking at this issue? I need to find a solution.

Hello Don,

Sorry for not replying you earlier. In fact we have been busy while identifying the reasons of blank resultant PDF. As per our current findings, the sample documents attached with this forum thread contain raw xml data file and Xsl file. Bind Fo method expects Xml Fo and Xsl files. In current scenario, input file format is not as expected by BindFo method.

In case you need to use BindFo method, then the source input files must be Aspose.Pdf compatible format. You may also try using some freely available raw Xml to XmlFo xsl templates and then call BindFo function. I would also recommend you to visit the following links for better understanding of Aspose.Pdf acceptable formats.