IS it possible to convert PDF to XML using Aspose and then modify few fields in XML and again convert it back to PDF using aspose.



Thanks for contacting support.

Aspose.PDF offers the functionality to convert PDF into XML based on mobiXml standards but, in order to generate PDF from XML, you need to provide XML Template based on Aspose.Pdf XML Schema. Furthermore, would you please share your sample PDF document along with a bit more details of your actual requirements. We will further check for related information and share our feedback with you.


I have converted PDF to XML based on mobiXml but can I again convert that xml back to PDF??



Thanks for getting back to us.

Please note that currently you can generate MobiXml from PDF but this XML structure is different and follows different XML standards than the Aspose.Pdf Schema which helps generating PDF from XML. In other words, XML obtained from PDF using Aspose.PDF is different than the XML Structure needed to generate PDF back using Aspose.PDF API.

Furthermore, we already have logged similar requirements under a ticket ID PDFNET-45736 in our issue tracking system. In the logged ticket, we will investigate the feasibility to convert PDF into Aspose.PDF based XML model so that it can be edited and converted back into PDF. As soon as some definite updates are available regarding ticket resolution, we will share with you. Please spare us little time.

We are sorry for the inconvenience.



I checked the documentation and I don’t see a code sample to convert from pdf to xml for aspose pdf .net. Please can you share the sample code



Please use following code snippet in order to achieve your requirements:

Document pdfDoc = new Document(dataDir + "Sample PDF.pdf");
pdfDoc.save("resultant.xml", SaveFormat.Xml);