Platforms
Frameworks
Languages
Platform Specifics
File format support
There are three ways to use Apryse with Python:
This guide will help you get started by building your own wrapper. You can find more information about using the precompiled library
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).
PDFNetWrappers/PDFNetC
and move the downloaded [PDFNet C/C++ SDK] for macOS(#prerequisites) into that directory and unzip it. Ensure you obtain the right architecture for your Python interpreter. This can be done with these two commands:PDFNetWrappers/PDFNetC
directory and executeandto move the PDFNet libraries in place.You can delete PDFNetCMac.zip
to free up space.Your /PDFNetC
folder should be laid out like this like this:/PDFNetWrappers
and navigate to it. This guide will assume the build directory is called Build.make
followed by sudo make install
.rpaths
issue on Mac. While still in the same Build
directory, execute these lines:You are now ready to run the samples or integrate Apryse SDK into your own application.
Also check out the source for the PDFNetC wrappers here.
Running a specific sample
PYTHON
folder in the sample, for example /Samples/AddImageTest/PYTHON
and execute ./RunTest.sh
.Run all samples
/Samples
and executeThe tests will run one by one.Output files will be in /Samples/TestFiles/Output
This section will show you how to use our SDK to create a simple Apryse "Hello World!" application. It will create a document with one blank page and save it as a linearized PDF in its running directory.
/Samples
directory and create a new directory called myApp
(if it does not exist already). This guide will assume your application is named myApp. For organization, create a new directory inside myApp
called PYTHON
.PYTHON
directory and create a new Python file called myApp.py
. Open it with your favorite text editor and paste this into it:python myApp.py
. If all goes well your output should read:Check the output.pdf
that the program output in the same directory. It should be a PDF with one blank page.
Check the troubleshooting page and our PDFNetWrappers github if you run into any issues going through this document.
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.
python.exe
Make sure Python, cmake and SWIG are all added to your path
environment variable.
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).
1. Extract the PDFNetWrappersWinXX
folder from the .zip file. This guide will assume it has been extracted to the current user's Desktop
.
2. From the extracted folder, copy the Lib
and Headers
folders and paste them into PDFNetWrappers-master/PDFNetC/
3. Create a new folder called Build
inside the PDFNetWrappers
folder and enter it.This is what the current directory structure should look like:
4. Open a Command Prompt here and run the following:
This will choose a default Visual Studio version to build the projects for. Wait for the bindings to finish. The output should end with something like this:
If you see error messages during this process, see the Troubleshooting section.You should have the following files in your Build
directory:
5. Open the generated PDFNetLanguageBindings.sln
with Visual Studio.
6. Change the build mode from Debug
to Release
, make sure the appropriate target version (x86 or x64) is selected and build the solution.
There is no Debug version of the PDFNet library available.
Step 7 to step 10 is only required if the x64 target build option is not available. These steps will create the x64 build target and manually copy the dynamic link library output for installation.
7. When using the PDFNetC64
(64-bit) library files then change the build configuration to x64
in the Build
dropdown by choosing Configuration Manager...
.Under Active Solution Platform
, Select <New...>
and choose x64
if x64
is not displayed as a platform.Click ok then close the modal to exit.
8. Right-click project PDFNetPython
within Solution Explorer and choose Properties
.Under Linker
, select Command Line
and change X86
to X64
.Click ok to exit the modal.
9. Right-click and build the PDFNetPython
project.This will build the Python library files.
10. Copy the _PDFNetPython.pyd
dynamic link library file to the build\lib\Release
folder using the command line below or manually from Windows explorer.This will ensure the Python module which communicates through the dynamic link library can be located for installation.
11. When this is done, select and build the INSTALL
project.This will install PDFNetPython
lib files to the PDFNetWrappers\PDFNetC\lib
folder where it can be located by the samples.
12. Get your Apryse trial key.
The bindings should be successfully built. You can now run the samples to test out the Apryse SDK.
Find and enter the Samples
folder (PDFNetWrappers-master/Samples
). Here you can find sample code for a large number of features supported by the Apryse SDK.
The output files from all tests are stored in Samples/TestFiles/output/
Run a specific sample
PYTHON
folder inside.RunTest.bat
and run it. The results should appear on a cmd
window.Run all samples
runall_python.bat
in the samples folder and double click on it to run it. The results should appear on a cmd
window.Press any key when a sample ends to start the next one.
This is what we call the "Apryse Hello World" application. It is easy to integrate the rest of Apryse SDK if you are able to open, save and close a PDFDoc.
Samples
by the name HelloWorld
.HelloWorld
folder, create a new file called HelloWorld.py
, open and edit it using your favorite text editor.HelloWorld
folder using:Once you have successfully run this, you should see an output file in the working directory of this program.Multiple versions of Python
More information for conflict resolution between multiple Python installations.
CMake Process finding incorrect version
Setting specific versions of Python to use for cmake.
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 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).
PDFNetWrappers/PDFNetC
and download the PDFNet C/C++ SDK into that directory. Ensure you obtain the right architecture for your Python interpreter. For example, if your interpreter is 64bit (which this guide will assume), executePDFNetC64.tar.gz
by tar xvzf PDFNetC64.tar.gz
, then executeandto move the PDFNet libraries in place.You can delete PDFNetC64.tar.gz
to free up space.Your /PDFNetC
folder should be laid out like this like this:/PDFNetWrappers
and navigate to it. This guide will assume the build directory is called Build.make
followed by sudo make install
. You are now ready to run the samples or integrate Apryse SDK into your own application.Running a specific sample
PYTHON
folder in the sample, for example /Samples/AddImageTest/PYTHON
and execute ./RunTest.sh
.Run all samples
/Samples
and executeThe tests will run one by one.This section will show you how to use our SDK to create a simple Apryse "Hello World!" application. It will create a document with one blank page and save it as a linearized PDF in its running directory.
/Samples
directory and create a new directory called myApp
(if it does not exist already). This guide will assume your application is named myApp. For organization, create a new directory inside myApp
called PYTHON
.PYTHON
directory and create a new Python file called myApp.py
. Open it with your favorite text editor and paste this into it:python myApp.py
. If all goes well your output should read:Check the output.pdf
that the program output in the same directory. It should be a PDF with one blank page.
Check the troubleshooting page and our PDFNetWrappers github if you run into any issues going through this document.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales