Step 2: Run export pdf operation using the sample files

Java

  1. Open a command prompt.

  2. Change directories into your sample code directory.

    For example, 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 is created in the src/main/resources directory.

.Net

  1. Open a command prompt.

  2. Change directories into your sample code directory.

    For example, 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 is created in the same directory.

Node.js

  1. Open a command prompt.

  2. Change directories into your sample code directory.

    For example, C:\Temp\PDFToolsAPI\adobe-dc-pdf-tools-sdk-node-samples

  3. Run the following command:

    node src/ocr/ocr-pdf.js

Your PDF is 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 can see another sample to export PDF files to image format. The same steps above 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

Previous pageCreate PDF from HTML
Next pageGetting started with Adobe PDF Services API and Java

Acrobat Services


Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more