Platforms
Frameworks
Languages
The Apryse Server SDK is cross-platform and supported on Windows, Linux, and macOS. The base package is robust, allowing you to programmatically do the following with PDFs:
If you’re looking for additional capabilities, we offer add-on packages, such as Smart Data Extraction, and add-on modules, such as Office Conversion. For a complete list of add-ons, refer to the following:
Using the Server SDK allows you to build server-side document processing solutions at scale without relying on client devices or cloud APIs. Since the Server runs entirely on-premises (or in your private cloud), you can ensure security and compliance with full control over access, storage, and encryption. You can also easily integrate with web apps, backend systems, document management systems, and content workflows.
This guide walks you through steps to work through samples we give you, create a project, and integrate the Apryse Server SDK free trial into your project. We’ll use a Python project as our example project throughout this guide. By the end, you’ll have run through at least one sample, created a project, and built an "Apryse Hello World" within your application.
There are two ways to use Apryse with Python:
PDFNet bindings to build your own wrappers (less common).This guide will get you started using the precompiled Python for 3.x through pip3.
Choose your preferred platform from the tabs below.
This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into Python applications 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).
x64Python 3.9 - 3.14 for Apple M1 (ARM processor)pip3Make sure python3 and pip3 are installed in your system. You can check your python version and pip3 version by using the command in terminal:You can install python3 and pip3 with Homebrew using the following command:
There are THREE steps needed before you can use apryse-sdk library.
Use pip3 to install apryse-sdk library from Apryse's S3 private repository in terminal. Notice that PDFNetPython3 library from Python Package Index (PyPI) will no longer be updated in the future after the 9.5.0 release.
We recommend running this in a virtual environment, to guarantee the location of where our library will be installed. Henceforth, if our library needs to be imported, be sure to activate the same virtual environment before running a Python script that imports from apryse-sdk
or
If no errors occur, Successfully installed apryse-sdk ... will display in terminal.
If you run into this error when installing apryse-sdk via pip:
It is possible that your Python version is NOT fully compatible. You can check your python version by using the command:
and make sure your Python version is within 3.5 - 3.14.
Download apryse-sdk Samples and unzip the package.
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.
Navigate to the Samples folder. Notice that you will need to update Samples/LicenseKey/PYTHON/LicenseKey.py before you could run Samples.
Run a specific sample
PYTHON folder inside.RunTest.sh and use the following commands to run it in terminal:Alternatively, you can use the following commands to run AddImageTest:
If no errors occur, the following lines will display in terminal:
The output files are stored in Samples/TestFiles/output/
Run all samples
runall_python.sh in the samples folder and run it.The output files from all tests are stored in Samples/TestFiles/output/.
It is easy to integrate apryse-sdk into your application. After you have installed apryse-sdk via pip, all you need to do is add from apryse_sdk import * to your Python script.
Below is an example called HelloWorld.py:
To test that your code works, run the script in the folder containing HelloWorld.py in command prompt:
Once you have successfully run this, you should see an output file in the working directory of this program.
Additional modules are required to run our OCRTest or CADTest samples, which can be accessed on our additional module downloads page.
Be sure to merge the Samples/ directory from the module into the Samples/ directory obtained from the download in Step 2, ensuring that the files the sample code depends on are available.
It is possible that your Python version is NOT fully compatible. You can check your python version by using the command:
and make sure your Python version is within 3.5 - 3.14.
We recommend using Python 3.5.4, 3.6.8, 3.7.9, 3.8.5, 3.9.6, 3.10.4 to guarantee 100% compatibility.
If errors still occur, please contact our support team.
apryse-sdk library via pip, you need to check whether python3 and pip3 are installed in your system.You can test it by using the following command:If no errors occur and your python version is within 3.5 - 3.11, it may be that no precompiled apryse-sdk library is compatible with your system. Please contact our support team. You might need to build your own apryse-sdk wrapper using SWIG and our PDFNetC library.apryse-sdk, as follows:apryse-sdk to the latest version, you can simply run:You will need to install apryse-sdk via pip first before you could run the sample.

This guide will help you run Apryse samples and integrate a free trial of the Apryse SDK into Python applications on Windows. 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).
pip.Make sure the executable name is python.exe (default on Windows) and Python is added to your path environment variable.There are THREE steps needed before you can use apryse-sdk library.
Use pip to install apryse-sdk library from Apryse's dedicated repository.
Note that PDFNetPython3 library from Python Package Index (PyPI) is no longer being updated, and it is recommended that it is not used.
or
If no errors occur, Successfully installed apryse-sdk ... will display in command prompt (or a similar message if apryse-sdk was already present).
If you run into errors, then check out the Troubleshooting section of this guide
You will need this when you run the samples, or when you are ready to integrate the SDK into your application.
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.
It is easy to integrate apryse-sdk into your application. After you have installed apryse-sdk via pip, all you need to do is add from apryse-sdk import * to your Python script.
The essential steps are to
This is demonstrated in the following file called HelloWorld.py:
To test that your code works, run the script in the folder containing HelloWorld.py in command prompt:
Once you have successfully run this, you should see an output file in the working directory of this program.

Additional modules are required for some functionality, For example, OCR, CAD and PDF to Office. You can get these from our additional module downloads page.
Download apryse-sdk Samples and unzip the package.
Navigate to the Samples folder.
You will need to update Samples/LicenseKey/PYTHON/LicenseKey.py before you can run Samples.
PYTHON folder inside.RunTest.bat and double click on it to run it. Alternatively, you can use the following command to run AddImageTest in command prompt:
The output files are stored in Samples/TestFiles/output/
Find runall_python.bat in the samples folder and double click on it to run it. The output files from all tests are stored in Samples/TestFiles/output/.
As mentioned above, additional modules are required to run some of the samples, for example PDF2OfficeTest, OCRTest or CADTest.
Be sure to merge the Samples/ directory from the additional module into the Samples/ directory obtained from the download in Step 2, ensuring that the files the sample code depends on are available.
If you run into this error when installing apryse-sdk via pip:
It is possible that your Python version is NOT fully compatible. You can check your python version by using the command:
and make sure your Python version is within 3.5 - 3.14.
We recommend using Python 3.5.4, 3.6.8, 3.7.9, 3.8.5, 3.9.6, 3.10.4 to guarantee 100% compatibility.
If errors still occur, please contact our support team.
If you cannot install apryse-sdk library via pip, you need to check whether python and pip are installed in your system. You can test it by using the following command: If no errors occur and your python version is within 3.5 - 3.12, it may be that no precompiled apryse-sdk library is compatible with your system. Please contact our support team. You might need to build your own apryse-sdk wrapper using SWIG and our PDFNetC library.
If you are running into issues with compatibility with other libraries, we recommend using our library in a virtual environment, to guarantee the location of where our library will be installed. Henceforth, if our library needs to be imported, be sure to activate the same virtual environment before running a Python script that imports from apryse-sdk, as follows:
If you want to upgrade apryse-sdk to the latest version, you can simply run:
If you run a sample using the Run.bat and get the following output: You will need to install apryse-sdk via pip before you can run the sample.

A similar error will occur if you run the file directly. The solution is the same.
You'll install or update pip3 and Python 3, then get started with our samples to see the output you can create when you integrate the Apryse Server SDK into your application. Last, you'll create a project and integrate the Server SDK into your Python 3 application, all while using the Linux 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 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).
You’ll need Python 3 on your system. You’ll need pip3 to eventually install the Apryse Server SDK.
We used Ubuntu, version 25.10, for creating this guide.
2. Complete one of the following based on whether pip3 and Python3 are already installed:
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:
tar.gz tarball file, then select Extract to...ApryseSamples, and click Create to create a new folder to extract the tarball file into for running the samples. You can create a folder at a different location if you prefer, but for this guide’s instructions, we used the location and name above.The ApryseSamples folder is created and the tarball is extracted to the folder.
5. Navigate to the folder /Home/ApryseSamples/PDFNetPython3/Samples/OfficeToPDFTest/Python, right-click on the Python folder, then select Open in Terminal.
6. The Linux terminal opens to the directory you specified. On the command line, enter the following, then press Enter to install the apryse-sdk library from Apryse’s S3 private repository (You need this to run samples successfully):
The PDFNet Python 3 library from the default Python Package Index (PyPI) is not used in the code below because it’s no longer being updated. You’ll use the Apryse PyPI instead in the code.
or
If no errors occur, Successfully installed apryse-sdk ... will display in terminal.
7. Navigate via your Linux file explorer to /Home/ApryseSamples/PDFNetPython3/Samples/LicenseKey/Python/LicenseKey.py and double-click to open so you can add your license key to the LicenseKey.py file before running the sample.
8. Scroll down to the line containing ‘LicenseKey = “YOUR_PDFTRON_LICENSE_KEY” and replace the words in quotes with the copy of your trial license key. Leave the ‘if LicenseKey ==YOUR_PDFTRON_LICENSE_KEY’ as is with its default text.
9. Save your changes and close the file.
10. To run the sample, navigate, through the Linux file explorer, to /Home/ApryseSamples/PDFNetPython3/Samples/OfficeToPDFTest/Python, right-click on the Python folder, then select Open in Terminal.
11. The Linux terminal opens the OfficeToPDFTest sample. From the project directory, on the command line, enter the following, then press Enter:
When you run the sh RunTest.sh 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 finishes running, you'll see the status Done in the terminal.
12. At the command prompt, type Exit, then press Enter.
13. Go to your Linux file explorer and navigate to: /Home/ApryseSamples/PDFNetPython3/Samples/TestFiles/Output. You will see three output PDF files (Fisherman.pdf, the_rime_of_the_ancient_mariner.pdf, and the factsheet_Arabic.pdf).
14. Open the PDF files to see the converted output. You have successfully run the OfficeToPDFTest conversion sample!
Next, you’ll create your own Python 3 project and add the Apryse Server SDK so you can later integrate the Apryse Server SDK into the project and run it.
Home folder, and select New Folder. Alternatively, press CTRL + Shift + n to display the New Folder modal.NewApryseProject, then click Create./Home/NewApryseProject, right-click on the folder, then select Open in Terminal.apryse-sdk library from Apryse’s S3 private repository (You need this to run your project successfully):The PDFNet Python 3 library from the default Python Package Index (PyPI) is not used in the code below because it’s no longer being updated. You’ll use the Apryse PyPI instead in the code.
or
If no errors occur, Successfully installed apryse-sdk ... will display in terminal.
Next, you’ll open a blank PDF page within your application.
Home folder from Linux file explorer, then, select the NewApryseProject folder and click Open. The NewApryseProject opens in Visual Studio Code.
3. Create a file in the project named HelloWorld.py.
4. Copy the following Python code and paste it into Line 1 of the HelloWorld.py file, then Save your file.
Keep in mind the following about the code above:
PDFNet using your Apryse license key. Scroll down to the line containing PDFNet.Initialize(“YOUR_LICENSE_KEY”); and replace the words in quotes with the copy of your trial license key. If you’re logged in to Apryse.com, your license key will automatically replace YOUR_LICENSE_KEY in the code above.PDFNet. In this case, with a PDFDoc object.PDF.Terminate which releases any resources in use. 5. To test that your code works, run the script in the folder containing HelloWorld.py in the command prompt, then press Enter.
The code executes and you will see PDFNet is running in demo mode.
6. Exit out of the command line and navigate to the Home/NewApryseProject folder from Linux file explorer.
7. Open the linearized_output.pdf which you created by integrating the Apryse Server SDK!
8. Now that you have successfully run an OfficeToPDFTest sample and integrated the Apryse Server SDK Python PDF Library into your application, you can try out 50+ samples depending on your needs.
9. To try additional samples, go to section 2. Run a sample > Step 5 above and choose a different sample to run with a different URL path.
Additional modules are required for some samples functionality, for example, OCR, CAD and PDF to Office. You can get these from our additional module downloads page.
This guide will help you set up Apryse SDK serverless AWS Lambda functions. Your free trial includes unlimited trial usage and support from solution engineers.
In this particular guide, we will demonstrate how to set up an AWS Lambda function to use Apryse SDK.
First, prepare a zip package with apryse-sdk embedded and your lambda_function.py.
From the command line, check your Python3 version. This information will be needed when you create your function later.
From the command line:
Copy your lambda source (i.e. lambda_function.py) to YOUR_FUNCTION_FOLDER. Then zip your package before uploading it to your AWS Lambda account.
You can now upload YOUR_FUNCTION_FOLDER.zip to your AWS Lambda.
Second, create a lambda function in your AWS account and upload the zip package:
YOUR_FUNCTION_NAME] > Runtime [Python3.x] (Choose the version that matches your Python3 version from the checking above.) > choose Create FunctionOnce you have followed the initial setup instructions, you can begin calling Apryse SDK APIs in your lambda function source. For example:
You can update python script of your AWS Lambda function with the following code or download the source code from our github respository. This snippet shows how to process a request sent from a client to convert an office document to PDF and send the output to client.
After you have uploaded your zip package to your AWS Lambda function and get its API endpoint in Configuration > Triggers, you can now do a simple test using REST API.
In order to use this 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 pdf. That's it!
Access 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, and see the reponse 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 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:
We have shown how to set an AWS Lambda function using Apryse SDK. You can now experiment making your own functions, URLs, and can fully utilize Apryse SDK. If your have any questions, please don't hesitate to contact us!
How to Build Optical Character Recognition (OCR) in Python - 1/16/25
Splitting a PDF Using Python - 9/11/24
PDF to Office Document Conversion Using Apryse and Python - 4/4/24
Generating Documents and Reports from DOCX Templates and JSON using Apryse and Python - 10/9/23
A Guide to PDF Data Extraction Using Apryse SDK and Python - 7/20/23
Adding a Digital Signature to a PDF With the Python SDK - 7/13/23
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales