I have an Xml file (XmlFile1.xml) which produces a valid PDF when I use the Pdf Generator BindXML method and saving. But I read that the Generator is old and we should use the Document API instead.
When I use the Document BindXml method, the call succeeds but the generated PDF (PdfFromXmlTest.pdf) cannot be opened. (Invalid PDF).
Please advice what the correct XML schema is for using the Document BindXml method to generate a PDF.
XmlLoadOptions options = new XmlLoadOptions();<o:p></o:p>
// load xml file
Document pdfDocument = new Document(myDir + "XMLFile1.xml", options);
pdfDocument.Save(myDir + "XMLtoPDF_DOM.pdf");
Loading the Xml in the constructor works. So apparently the only problem is to bind a full XML definition in the BindXml method.