Convert PDF to XML in PHP
Import PDF pages into presentation slides and save the result in PowerPoint XML Presentation format.
Convert PDF to XML in PHP
Aspose.Slides for PHP via Java can import PDF pages into presentation slides and save the resulting presentation in PowerPoint XML Presentation format.
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 PHP
Create a Presentation, remove its default slide, import the PDF pages with addFromPdf, and call save with SaveFormat::Xml.
PHP code for converting PDF into XML
$presentation = new Presentation();
try {
$presentation->getSlides()->removeAt(0);
$presentation->getSlides()->addFromPdf("document.pdf");
$presentation->save("output.xml", SaveFormat::Xml);
} finally {
$presentation->dispose();
}
How to convert PDF to XML using Aspose.Slides for PHP API
These are the steps to convert PDF to XML in PHP.
Install Aspose.Slides for PHP via Java .
Create a
Presentationand remove its default slide.Import the PDF pages with
addFromPdf.Call
savewith the output file path andSaveFormat::Xml.
Free Online Converter
Convert PDF To Other Supported Formats
You can also convert PDF and save to other file formats. See all supported formats below: