Platforms
Frameworks
Languages
Platform Specifics
File format support
Welcome to Apryse. Python 3.x for the Apryse SDK is cross-platform and supported on Windows, Linux and macOS.
There are three ways to use Apryse with Python:
This guide will help you get started using the precompiled Python wrappers for 3.x. To get started, 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).
x64
Python 3.9 - 3.12 for Apple M1
(ARM processor)pip3
Make 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.11
.
Download apryse-sdk
Samples and unzip the package.
Get your Apryse trial key.
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.11
.
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 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.
or
If no errors occur, Successfully installed apryse-sdk ...
will display in command prompt.
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.11
.
Download apryse-sdk
Samples and unzip the package.
Get your Apryse trial key.
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.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/
Run all samples
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/
.
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.11
.
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 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.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: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 Linux. 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 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).
ARM64
pip3
Make sure python3
and pip3
are installed in your system. You can check your python version and pip3 version by using the command in terminal:If you need to install them, you can use the following commands:
There are THREE steps needed before you can use apryse-sdk
library.
Step 1
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.
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.11
.
Step 2
Download apryse-sdk
Samples and unzip the package.
Step 3
Get your Apryse trial key.
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
1. Find the sample you want to run and navigate into the PYTHON
folder inside.
2. Find 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
1. Find 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.
1. 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.11
.
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.
2. If you cannot install 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.
3. 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:
4. If you want to upgrade apryse-sdk
to the latest version, you can simply run:
5. If you run a sample and get the output:
You will need to install apryse-sdk
via pip first before you could run the sample.
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!
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales