Obtaining credentials and downloading sample files

The first step is to obtain a credential (API Key) to unlock use. Sign up for the free trial here and click on ‘Get Started’ to create your new credentials.

API Key

It’s important to choose a ‘Personal Account’ to sign up for the free trial:

Personal Account

In the next step you’ll choose the PDF Services API Service, then add a name and description for your credentials.

There is a checkbox to ‘Create personalized code sample’. Choose this option to have your new credentials automatically added to your sample files, skipping the manual step.

Next, choose Node.js as your language to receive the Node.js specific samples and click on the ‘Create Credentials’ button.

Create Credentials

You’ll receive a .zip file to download called PDFToolsSDK-Node.jsSamples.zip which can be saved to your local file system.

Adding your credentials to the code samples

If you chose the option for ‘Create personalized code sample’ then you do not must to manually add your client ID to the code sample files and can skip the next step and go directly to the Running code samples section below.

If you did not choose the option for ‘Create personalized code sample’, then you will must to copy the client ID (API Key) from the Adobe.io Console:

Code Sample

Unzip the contents of PDFToolsSDK-Node.jsSamples.zip.

Go to the root directory under adobe-dc-pdf-tools-sdk-node-samples folder.

Open pdftools-api-credentials.json with any text editor or IDE.

Paste the credential into the field for client ID in the code:

{
 "client_credentials": {
  "client_id": "abcdefghijklmnopqrstuvwxyz",

Save the file and continue to the next step to run the code samples.

Running your first code sample

Using the command prompt, go to the root directory under adobe-dc-pdf-tools-sdk-node-samples folder.

Type npm install:

C:\Temp\PDFToolsAPI\adobe-dc-pdf-tools-sdk-node-samples>npm install

Now you’re ready to run the sample files!

For your first sample, create a PDF:

While still in the command prompt, run the create PDF sample with the following command:

C:\Temp\PDFToolsAPI\adobe-dc-pdf-tools-sdk-node-samples>node src/createpdf/create-pdf-from-docx.js

Example output:

Example Output

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

Resources and next steps

PDF Services API Documentation

Previous pageCreate your first flow in Microsoft Power Automate
Next pageUsing PDF Services API to export PDF to Word, PowerPoint, and more

Acrobat Services