Convert PDF to XML in Java
Import PDF pages into presentation slides and save the result in PowerPoint XML Presentation format.
Convert PDF to XML in Java
Aspose.Slides for Java lets you import PDF pages into presentation slides and save the resulting presentation in PowerPoint XML Presentation format without Adobe Acrobat.
The generated XML represents a presentation and preserves the imported pages as slide content; it does not extract the PDF’s logical structure into a generic XML schema.
Convert PDF to XML using Java
To convert PDF content to PowerPoint XML, create a Presentation, remove its default slide, import the source file with ISlideCollection.addFromPdf, and call save with SaveFormat.Xml.
Java code for converting PDF into XML
Presentation presentation = new Presentation();
try {
presentation.getSlides().removeAt(0);
presentation.getSlides().addFromPdf("input.pdf");
presentation.save("output.xml", SaveFormat.Xml);
} finally {
presentation.dispose();
}
How to convert PDF to XML using Aspose.Slides for Java API
These are the steps to convert PDF to XML in Java.
Install Aspose.Slides for Java .
Add a library reference (import the library) to your Java project.
Open the source
PDFfile in Java.Call
savewith the output file path andSaveFormat.Xml.
Free Online Converter
Convert presentations and slides online.
Convert PDF To Other Supported Formats
You can also convert PDF and save to other file formats. See all supported formats below: