Some test text!

Hamburger Icon

Core / Guides

Get started with Node.js

Welcome to Apryse. Apryse technology can be integrated with Node.js using various platforms. You can select your desired platform below.

Linux Node.js PDF library integration

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.


AWS Lambda Functions

Download the SDK


  • Linux (64-bit), excluding Alpine
  • Node.js Version: 8 - 18
Run Apryse SDK in production
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.
Keep your commercial license key confidential.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).

Initial setup

  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.

npm i @pdftron/pdfnet-node
  1. 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.

If your OS or Node.js version is not supported, the installation will fail.

Run the samples

  1. Open a command line console, and run
npm i @pdftron/pdfnet-node-samples
  1. Change the directory to the node_modules/@pdftron/pdfnet-node-samples folder
  2. Run all samples:
npm run test

You can also enter any individual sample folder to run them separately. For example, here's how to run the AddImageTest sample:

cd ./samples/AddImageTest
node AddImageTest.js

Integrate into your project

Import the Apryse SDK by using the following in your Node.js code:

const { PDFNet } = require('@pdftron/pdfnet-node');

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:

const { PDFNet } = require('@pdftron/pdfnet-node');  // you may need to set up NODE_PATH environment variable to make this work.

const main = async() => {
  const doc = await PDFNet.PDFDoc.create();
  const page = await doc.pageCreate();
  doc.pagePushBack(page);'blank.pdf', PDFNet.SDFDoc.SaveOptions.e_linearized);

// add your own license key as the second parameter, e.g. in place of 'YOUR_LICENSE_KEY'.
PDFNet.runWithCleanup(main, 'YOUR_LICENSE_KEY').catch(function(error) {
  console.log('Error: ' + JSON.stringify(error));
}).then(function(){ PDFNet.shutdown(); });

Next step

Guides API docsSamples

Get the answers you need: Chat with us