The Apryse Server SDK delivers powerful, high-quality document processing for your backend infrastructure, is cross-platform, and supported on Windows, Linux, and macOS. Our sophisticated library provides advanced rendering, conversion, and manipulation capabilities for popular formats, including PDF, MS Office, CAD, and various image types. Automate complex workflows, like server-side generation, batch conversion, merging, or pre-processing documents, without relying on client-side tools.
By managing all document services on your servers, you gain complete control, compliance, and security over your data. Integrate this fully-featured server SDK to build scalable, high-performance applications with superior document functionality out-of-the-box.
The Apryse Server SDK base package is scalable, allowing you to easily embed document processing into your backend applications. If you’re looking for additional capabilities, we offer add-on packages, such as Smart Data Extraction, and add-on modules, such as Digital Signatures and Office Conversion.
Steps & samples
This guide walks you through steps to integrate the Apryse Server SDK free trial into your project. We’ll use a Node.js project as our example project throughout this guide. By the end, you’ll have built an "Apryse Hello World" within your application and be able to open, save, and close a PDF Doc.
Get started video
Get started with the Apryse Server SDK on the Windows platform via the following video. If you wish, you may skip this section and follow the steps below to get started.
Get started video for Apryse Server SDK on the Windows platform
To get started, choose your preferred platform from the tabs below.
You'll get started with our samples to see the output you can create when you integrate the Apryse Server SDK into your Node.js projects. You'll also create a project and integrate the Server SDK into your Node.js projects, using the Windows platform.
Before you start:
Apryse collects some data regarding your usage of the SDK for product improvement.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
A commercial license key is required for use in a production environment. Please contact sales by filling out our licensing form if you want to purchase a commercial license key.
License keys are uniquely generated. Please make sure your key is not publicly available (e.g. in your public GitHub).
First, you’ll download and run the OfficeToPDFTest sample which allows you to explore and validate the conversion features offered by the SDK. By running the sample, you can quickly:
Note that all Apryse Node.js libraries install native binaries and installing the package will install a system-specific distribution.
The packages are added:

On the command line, install the npm package.
2. Enter the following and press Enter to install the pdfnet-node-samples (they are not included in the pdfnet-node package above and must be downloaded separately):
The samples are installed:

Install the samples.
At the command prompt, type exit and press Enter.
Before running the sample, you need to add your license key to the LicenseKey.cs file.
3. In File Explorer, navigate to: C:\Users\YourName\node_modules\@pdftron\pdfnet-node-samples\LicenseKey\LicenseKey.js and double-click to open.

Open the LicenseKey.js file.
4. Scroll down to the line containing const LicenseKey = ‘YOUR_PDFTRON_LICENSE_KEY’; and replace the words in quotes with the copy of your trial license key you generated when you completed the Prerequisites instructions above. Save your changes and close the file.

Enter your license key.
5. Navigate to the folder C:\Users\YourName\node_modules\@pdftron\pdfnet-node-samples\OfficeToPDFTest, right-click, and select Open in Terminal. The Windows terminal opens.

Navigate to the OfficeToPDFTest folder and open in the terminal.
6. From the project directory, on the command line, enter the following and press Enter to run the sample:
The sample runs:

Run the sample.
When you run the node OfficeToPDFTest.js command, the sample code loads an Office document, converts the Office document to PDF, saves the resulting PDF, and outputs status messages to the console. For more details, you can look at additional OfficeToPDF sample code and the Convert MS Office (Word, Excel, PowerPoint) to PDF overview.
Once the sample has finished running, you will see Done in the terminal.
7. At the command prompt, type exit, press Enter, and close the terminal window.
8. In File Explorer, navigate to C:\Users\YourName\node_modules\@pdftron\pdfnet-node-samples\TestFiles\Output. You will see three output PDF files (Fisherman.pdf, the_rime_of_the_ancient_mariner.pdf, and the factsheet_Arabic.pdf):

Navigate to the output folder.
9. Open the PDF files to see the converted output. You have successfully run the OfficeToPDFTest conversion sample!

Open the OfficeToPDFTest sample!
A new package.json file is created:

A new project is created.
5. At the command prompt, type exit, press Enter, and close the window.
1. Open Visual Studio Code, select File >Open Folder. Navigate to Document > NewApryseProject and click on Select folder.

Open the NewApryseProject folder.
2. From the File menu, select NewTextFile... and name it index.js.
3. Copy the following code and paste into the index.js file to create a blank pdf page.
4. Scroll down to the line containing PDFNet.runWithCleanup(main, ‘YOUR_PDFTRON_LICENSE_KEY’) and replace the words in quotes with the copy of your trial license key.

What your index.js should look like now.
5. Save your changes and close the file.
6. You have successfully added the Apryse Server SDK to your Node.js project!
The code executes and you will see the message, “Hello World!”

You will see "Hello World!"
3. Exit out of the command line and navigate to the Documents > NewApryseProject folder.
4. Open the blank.pdf which you created by integrating the Apryse Server SDK!
Now that you have successfully run an OfficeToPDFTest sample and integrated the Apryse Server SDK Node.js PDF Library into your application, you can try out 50+ samples depending on your needs:

Browse and try out additional samples.
6. To try additional samples, go to section 1. Run a sample > step5 above and choose another sample to run.
This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into Node.js projects on Linux or help you set up Apryse SDK serverless AWS Lambda functions. Your free trial includes unlimited trial usage and support from solution engineers.
Node.js Version: 8 - 24 (excluding Node 9 on Alpine)
A commercial license key is required for use in a production environment. Please fill out our licensing form if you do not have a valid license key.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
1. Install the npm package:
Please note that all Apryse NodeJS libraries install native binaries and installing the package will install a system specific distribution.
If using Alpine Linux you will have to include a target platform specifier to ensure you recieve the correct binaries.
If your OS or Node.js version is not supported, the installation will fail.
2. Get your Apryse trial key.
Apryse collects some data regarding your usage of the SDK for product improvement.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
The samples are not included with the pdfnet-node package, and need to be downloaded separately.
Open a command line console, and run
Change the directory to the node_modules/@pdftron/pdfnet-node-samples folder
The Apryse SDK requires a license key. Open the file LicenseKey.js, and paste the license key into it.
While you can run samples individually, you can also run all of them together using a script that is in package.json.
If you want to run a sample individually, then navigate to its folder, then use node to run the JavaScript file. For example, here's how to run the AddImageTest sample:
You can now import the Apryse SDK by using the following in your Node.js code:
At the end of your code, don't forget to call PDFNet.shutdown(), otherwise your Node.js program will keep hanging.
Here is an example for creating a blank pdf page:
In this particular guide, we will demonstrate how to set up an AWS Lambda function to use the Apryse SDK with Node.js.
First, you will have to prepare a deployment package with the pdfnet-node module and your Lambda function code (typically named index.js) within it. From the command line:
Now, copy your lambda function code to YOUR_FUNCTION_FOLDER.
It's at this point that it is important to note that the pdfnet-node module must be installed using the same operating system that AWS Lambda will use for its runtime. This is dependent on on the version of Node.js you are using. To see which operating system is required, look here.
We recommend that you use a Docker container to simulate this runtime and have included a Dockerfile to do just that. Create a Dockerfile with the contents below.
Dockerfile
Next, run the following docker commands to generate a deployment package to upload to AWS Lambda. Replace YOUR_IMAGE_NAME_HERE with the image name of your choice, as well as YOUR_NODE_VERSION_HERE as the Node version of your choice. YOUR_NODE_VERSION_HERE as the Node version of your choice. Note that this Dockerfile requires that your AWS Lambda function code file be named index.js, and that it uses your project's package.json and package-lock.json to install dependencies such as the pdfnet-node module you installed in the last step.
After running this Docker container, you should have your deployment package within the ./output directory and can now upload it to AWS Lambda.
Second, create a Lambda function in your AWS account and upload the deployment package:
YOUR_FUNCTION_NAME] > Runtime (matching your Node version) > choose Create FunctionOnce you have followed the initial setup instructions, you can begin calling Apryse SDK APIs in your Lambda function code. For example:
You can update the Node.js script of your AWS Lambda function with the following code or download the source code from our GitHub repository. This snippet shows how to process a request sent from a client, convert an office document to a PDF, and send the output to client.
After you have uploaded your deployment package to AWS Lambda and set its API endpoint in Configuration > Triggers, you can now do a simple test using a REST API.
In order to use the function to convert an office document to PDF, the client needs to POST a REST API request to the server. The request must include JSON data structured as in the code below.
Upon receiving a client's request, a response will be sent back to the client including the base64 encoded PDF output using the same JSON structure. All the client needs to do now is decode the encoded data into a PDF. That's it!
Please review the sample python code. After cloning the repository and installing necessary packages, please refer to /client/README.txt for detailed instructions. Navigate to the client folder, run the following command, see the response to client's request in the console, and check the output in the output folder:
The client will send a REST API request to convert /input/simple-word_2007.docx to a PDF and the server will send back the encoded data, which will then be saved as PDF in the output folder.
You can experiment with your own office document by putting it inside input folder:
In this article, we have shown how to set up an AWS Lambda function using the Apryse SDK. You can now experiment making your own functions, URLs, and can fully utilize the Apryse SDK using AWS Lambda. If your have any questions, please don't hesitate to contact us!
This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into Node.js projects on macOS. Your free trial includes unlimited trial usage and support from solution engineers.
A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
Please note that all Apryse NodeJS libraries install native binaries and installing the package will install a system specific distribution.
If your OS or Node.js version is not supported, the installation will fail.
2. Get your Apryse trial key.
The Apryse SDK requires a license key. it's free to get a trial one.
Apryse collects some data regarding your usage of the SDK for product improvement.
If you wish to continue without data collection, contact us and we will email you a no-tracking trial key for you to get started.
The samples are not included with the pdfnet-node package, and need to be downloaded separately.
Open a command line console, and run
Change the directory to the node_modules/@pdftron/pdfnet-node-samples folder
The Apryse SDK requires a license key. Open the file LicenseKey.js, and paste the license key into it.
While you can run samples individually, you can also run all of them together using a script that is in package.json.
If you want to run a sample individually, then navigate to its folder, then use node to run the JavaScript file. For example, here's how to run the AddImageTest sample:
You can now import the Apryse SDK by using the following in your Node.js code:
At the end of your code, don't forget to call PDFNet.shutdown(), otherwise your Node.js program will keep hanging.
Here is an example for creating a blank pdf page:
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales