Can you provide a example of how to use the BindFO(XmlDocument, XmlDocument) I have tried using it several times and I get a blank pdf everytime.
Here is a sample of my code:
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
XmlDocument xmldoc = new XmlDocument();
XmlDocument xsldoc = new XmlDocument();
xmldoc.Load("C:\\1277\\11400.xml");
xsldoc.Load("C:\\1277\\11400.xsl");
pdf.BindFO(xmldoc, xsldoc);
pdf.Save("C:\\1277\\11400.pdf");
This message was posted using Page2Forum from Pdf.BindFO Method (XmlDocument, XmlDocument) - Aspose.Pdf for .NET
Hello Don,
Thanks for using our products.
You can use the following code snippet to convert the XSL-FO file into PDF format. The sample HelloWorld.fo and HelloWorld_test.pdf are in XSL_FO.zip attachment. Please take a look.
[C#]
//Instantiate a Pdf object by calling its empty constructor
Pdf pdf1 = new Pdf();
// use the method to bind the XSL-FO file
pdf1.BindFO(@"d:/pdftest/XSL-FO Working/HelloWorld.fo");
//Save the Pdf
pdf1.Save("d:/pdftest/XSL-FO Working/HelloWorld_test.pdf");
You may also try using the following code snippet to convert an XML and XSL file into PDF format. You can try using the sample resource files present in XML_XSL.zip document.
[C#]
//Instantiate a Pdf object by calling its empty constructor
Pdf pdf1 = new Pdf();
XmlDocument xmldoc = new XmlDocument();
XmlDocument xsldoc = new XmlDocument();
xmldoc.Load(@"D:/pdftest/language-test/languages.xml");
xsldoc.Load(@"D:/pdftest/language-test/languages.xsl");
// use the method to bind the XSL-FO file
pdf1.BindFO(xmldoc, xsldoc);
//Save the Pdf
pdf1.Save(@"D:/pdftest/language-test/languages_test.pdf");
In case you have any further query, please feel free to contact. We apologize for your inconvenience.