Leveraging PDF Tools API to export PDF to Word, PowerPoint, and more

Create PDF Hero Image

Adobe PDF Tools API provides the ability to convert PDF files to MS Office, text, and images using APIs. There are many common use cases to unlock existing PDFs for content editing and analysis and with PDF Tools API developers can easily integrate this capability into existing systems and applications. Convert PDF files to MS Word for editing of content, approvals, and later sending for signatures to create custom contract workflows. Or export PDF content to MS Excel format for invoice and financial calculations or data analysis.

The Export operation supports the following PDF file conversions:

  • PDF to Microsoft Word (DOC, DOCX)
  • PDF to Microsoft PowerPoint (PPTX)
  • PDF to Microsoft Excel (XLSX)
  • PDF to text (RTF)
  • PDF to Image (JPEG, PNG)

In this tutorial we’ll cover the basics of how to run your first PDF Tools API export operation using sample files for Node.js, Java, and .Net languages.

Step 1: Create your credentials and setup your environment:

Use the getting started tutorials below to create your API credentials, download sample files, and setup your environment.

Getting Started with PDF Tools API and Java
Getting Started with PDF Tools API and .Net
Getting Started with PDF Tools API and Node.js

Step 2: Run export pdf operation using the sample files

Java

  1. Open a command prompt.

  2. Change directories into your sample code directory.

    E.g., C:\Temp\PDFToolsAPI\adobe-dc-pdf-tools-sdk-java-samples

  3. Run the following command:

    mvn -f pom.xml exec:java -Dexec.mainClass=com.adobe.platform.operation.samples.exportpdf.ExportPDFToDOCX

Your PDF will be created in the src/main/resources directory.

.Net

  1. Open a command prompt.

  2. Change directories into your sample code directory.

    E.g., C:\Temp\PDFToolsAPI\adobe-dc-pdf-tools-sdk-NetSamples

  3. Change directories again into the ExportPDFtoDocx directory.

  4. Run the following command:

    dotnet run ExportPDFToDocx.csproj

Your PDF will be created in the same directory.

Node.js

  1. Open a command prompt.

  2. Change directories into your sample code directory.

    E.g., C:\Temp\PDFToolsAPI\adobe-dc-pdf-tools-sdk-node-samples

  3. Run the following command:

    node src/ocr/ocr-pdf.js

Your PDF will be created in the location designated in the output, which by default is the pdfServicesSdkResult directory.

Final thoughts

You should now have a working example that can be imported into your existing applications to start a proof of concept. In each of the sample directories, you’ll also see another sample to export PDF files to image format. The same steps above will allow you to run that sample as well. To change to another format you can update the code to the new format you would like:

SupportedTargetFormats.PPTX

And the destination result:

output/exportPdfOutput.PPTX

To another format.

Resources and next steps

On this page

Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now