> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/core/get-started/languages/python3.md).

# Build a Python PDF library app with Apryse Server SDK

Learn how to build a simple Python PDF application using the Apryse Python PDF library and Server SDK to generate PDFs programmatically.

This get-started guide explains how to set up your Python environment and install and use the [Apryse Server SDK](https://docs.apryse.com/try-now?tab-cfc13cf95cb8=server+%2F+desktop+sdk) in a Python application. We'll demonstrate how to build a simple app for programmatic PDF generation.

There are two ways to use Apryse with Python:

* Use `pip` to install third‑party Python packages, such as the Apryse SDK. The SDK is distributed as a precompiled Python library.
* Use `PDFNet` bindings to build your own [custom Python wrapper](/core/get-started/get-started/python3-custom.md) (less common).

This guide walks you through getting started with the precompiled Python SDK using pip.

Choose your preferred platform from these tabs.

{% tabs %}
{% tab title="macOS" %}

## Prerequisites

Before you start:

* Install [Visual Studio Code](https://code.visualstudio.com/Download) or another code editor to develop and debug code.
* Install [Python 3](https://www.python.org/downloads/macos/) and pip. In this guide, we use [Homebrew](https://brew.sh/) to manage the Python installation.
* Get your Apryse trial key.

{% @apryse-license-key/apryse-license-key platform="SERVER" variant="full" %}

{% hint style="info" %}
**Run Apryse SDK in production**

A commercial license key is required for use in a production environment. [Contact sales](https://apryse.com/form/contact-sales) to purchase a commercial license key.
{% endhint %}

{% hint style="warning" %}
**Keep your commercial license key confidential**

License keys are uniquely generated and strictly confidential. Don't publish or store them in any public location, including public GitHub repositories.
{% endhint %}

## 1. Set up Python and pip

Before getting started, ensure that Python and pip are installed. You’ll use pip to install the Apryse Server SDK.

{% hint style="info" %}
**Info**

macOS includes a system‑managed Python used by the operating system. For development, install Python via Homebrew and use it inside a virtual environment.
{% endhint %}

1. Check whether Python and pip are installed:

{% code lineNumbers="true" %}

```bash
python3 --version
python3 -m pip --version
which python3
```

{% endcode %}

The `python3` path should point to Homebrew (for example, `/opt/homebrew/bin/python3` or `/usr/local/bin/python3`). If it points to `/usr/bin/python3`, you're using the system Python.

2. If Python and pip aren't installed, install them with Homebrew. This command installs the latest Python version with pip:

{% code lineNumbers="true" %}

```bash
brew install python
```

{% endcode %}

3. If Python and pip are installed with Homebrew, update Homebrew and Python. This also updates pip:

{% code lineNumbers="true" %}

```bash
brew update
brew upgrade python
```

{% endcode %}

## 2. Set up your project

Set up your project by creating a folder and preparing your workspace for the application.

1. In your file manager, create a **Documents > NewApryseProject** folder.
2. Open the new **NewApryseProject** folder in Visual Studio Code or in another code editor.
3. Create a `HelloWorld.py` file at the root of your project.

## 3. Add the Apryse SDK

Next, integrate the Apryse Server SDK into your Python application and add the code needed to generate a PDF.

1. Navigate to the `~/Documents/NewApryseProject` directory in your terminal, then install the Apryse SDK using pip to fetch the package from Apryse's package index:

{% hint style="info" %}
**Info**

Install the Apryse SDK in a [virtual environment](https://docs.python.org/3/library/venv.html) to ensure it's isolated and installed in a predictable location. When running Python scripts that import `apryse-sdk`, make sure you activate the same virtual environment first.
{% endhint %}

{% code lineNumbers="true" %}

```bash
python3 -m pip install apryse-sdk --extra-index-url=https://pypi.apryse.com
```

{% endcode %}

A successful output looks like:

{% code lineNumbers="true" %}

```bash
Looking in indexes: https://pypi.org/simple, <additional index>
Collecting apryse-sdk
  Downloading apryse_sdk-<version>.whl
Installing collected packages: apryse-sdk
Successfully installed apryse-sdk-<version>
```

{% endcode %}

{% hint style="info" %}
**Info**

The legacy `PDFNetPython3` package on the default Python Package Index (PyPI) is no longer maintained.
{% endhint %}

2. Open the `HelloWorld.py` file in Visual Studio Code or your preferred code editor:

{% code lineNumbers="true" %}

```
~/Documents/NewApryseProject/HelloWorld.py
```

{% endcode %}

3. Add this code to the `HelloWorld.py` file, update your license key, and save your changes:

<pre class="language-python" data-line-numbers><code class="lang-python"># You can add the following line to integrate apryse-sdk
# into your solution from anywhere on your system as long as
# the library was installed successfully via pip

from apryse_sdk import *

def main():

    # Initialize Apryse SDK
    # Replace with your demo license key
    PDFNet.Initialize("<code class="expression">visitor.claims.serverKey || "YOUR_LICENSE_KEY"</code>")

    # This example creates a new document
    # and a new page, then adds the page
    # in the page sequence of the document
    doc = PDFDoc()

    page1 = doc.PageCreate()
    doc.PagePushBack(page1)

    # Save the document in a linearized
    # format which is the most popular and
    # effective way to speed up viewing PDFs
    doc.Save(("output.pdf"), SDFDoc.e_linearized)

    doc.Close()

if __name__ == "__main__":
    main()
</code></pre>

{% hint style="info" %}
**Info**

If you're signed in with an Apryse account, your license key is automatically prepopulated in all code snippets.
{% endhint %}

With this code, you can:

* Import and initialize the Apryse Python SDK using your license key.
* Create a new PDF document and add a blank page.
* Save the document as a linearized PDF for optimized viewing.
* Perform document operations using the PDFNet API—in this case, creating and modifying a `PDFDoc` object.
* Close the document after saving.

## 4. Verify your output

Finally, build and run your application to confirm that the Apryse Server SDK is working correctly. After the application runs successfully, it will generate a blank PDF file locally.

1. Go to the **Documents > NewApryseProject** folder, and right-click to select **New Terminal at Folder**.
2. In the terminal, run the `HelloWorld.py` script:

{% code lineNumbers="true" %}

```bash
python3 -u HelloWorld.py 
```

{% endcode %}

A successful output looks similar to:

{% code lineNumbers="true" %}

```bash
PDFNet is running in demo mode.
PackageV2: base
```

{% endcode %}

3. Go to the **Documents** > **NewApryseProject** folder using the file manager.
4. Verify the blank `output.pdf` file was generated programmatically using the Apryse Server SDK. The folder structure looks similar to:

{% code lineNumbers="true" %}

```
NewApryseProject/
├── HelloWorld.py
└── output.pdf
```

{% endcode %}
{% endtab %}

{% tab title="Windows" %}

## Prerequisites

Before you start:

* Install [Visual Studio Code](https://code.visualstudio.com/Download) or another code editor to develop and debug code.
* Install [Python 3](https://www.python.org/downloads/macos/) and pip.
* Get your Apryse trial key.

{% @apryse-license-key/apryse-license-key platform="SERVER" variant="full" %}

{% hint style="info" %}
**Run Apryse SDK in production**

A commercial license key is required for use in a production environment. [Contact sales](https://apryse.com/form/contact-sales) to purchase a commercial license key.
{% endhint %}

{% hint style="warning" %}
**Keep your commercial license key confidential**

License keys are uniquely generated and strictly confidential. Don't publish or store them in any public location, including public GitHub repositories.
{% endhint %}

## 1. Set up Python and pip

Before getting started, ensure that Python and pip are installed. You’ll use pip to install the Apryse Server SDK.

1. Check whether Python and pip are installed:

{% code lineNumbers="true" %}

```shell
python --version
pip --version
```

{% endcode %}

2. If Python and pip aren't installed, download any supported [Python 3](https://www.python.org/downloads/windows/) version and run the installer from your **Downloads** folder. During installation:

* Use admin privileges.
* Select **Add Python to PATH**.
* Enable pip and `venv`.

3. If Python and pip are installed, run the following command to update:

{% code lineNumbers="true" %}

```shell
python -m pip install --upgrade pip
```

{% endcode %}

## 2. Set up your project

Set up your project by creating a folder and preparing your workspace for the application.

1. In your file manager, create a **Documents > NewApryseProject** folder.
2. Open the new **NewApryseProject** folder in Visual Studio Code or in another code editor.
3. Create a `HelloWorld.py` file at the root of your project.

## 3. Add the Apryse SDK

Next, integrate the Apryse Server SDK into your Python application and add the code needed to generate a PDF.

1. Navigate to the `\Documents\NewApryseProject` directory in your terminal, then install the Apryse SDK using pip to fetch the package from Apryse's package index:

{% hint style="info" %}
**Info**

Install the Apryse SDK in a [virtual environment](https://docs.python.org/3/library/venv.html) to ensure it's isolated and installed in a predictable location. When running Python scripts that import `apryse-sdk`, make sure you activate the same virtual environment first.
{% endhint %}

{% code lineNumbers="true" %}

```shell
python -m pip install apryse-sdk --extra-index-url=https://pypi.apryse.com
```

{% endcode %}

A successful output looks like:

{% code lineNumbers="true" %}

```shell
Looking in indexes: https://pypi.org/simple, <additional index>
Collecting apryse-sdk
  Downloading apryse_sdk-<version>.whl
Installing collected packages: apryse-sdk
Successfully installed apryse-sdk-<version>
```

{% endcode %}

{% hint style="info" %}
**Info**

The legacy `PDFNetPython3` package on the default Python Package Index (PyPI) is no longer maintained.
{% endhint %}

2. Open the `HelloWorld.py` file in Visual Studio Code or your preferred code editor:

{% code lineNumbers="true" %}

```
C:\Users\<your_name>\Documents\NewApryseProject\HelloWorld.py
```

{% endcode %}

3. Add this code to the `HelloWorld.py` file, update your license key, and save your changes:

<pre class="language-python" data-line-numbers><code class="lang-python"># You can add the following line to integrate apryse-sdk
# into your solution from anywhere on your system so long as
# the library was installed successfully via pip

from apryse_sdk import *

def main():

    # Initialize Apyrse SDK
    # Replace with you demo license key
    PDFNet.Initialize("<code class="expression">visitor.claims.serverKey || "YOUR_LICENSE_KEY"</code>")
    
    try:
      # This example creates a new document
      # and a new page, then adds the page
      # in the page sequence of the document
      doc = PDFDoc()

      page1 = doc.PageCreate()
      doc.PagePushBack(page1)

      # Save the document in a linearized
      # format which is the most popular and
      # effective way to speed up viewing PDFs
      doc.Save(("output.pdf"), SDFDoc.e_linearized)

      doc.Close()
    except Exception as e:
        print("Unable to create PDF document, error: " + str(e))

    PDFNet.Terminate()

if __name__ == "__main__":
    main()
</code></pre>

{% hint style="info" %}
**Info**

If you're signed in with an Apryse account, your license key is automatically prepopulated in all code snippets.
{% endhint %}

With this code, you can:

* Import and initialize the Apryse Python SDK using your license key.
* Create a new PDF document and add a blank page.
* Save the document as a linearized PDF for optimized viewing.
* Perform document operations using the PDFNet API—in this case, creating and modifying a `PDFDoc` object.
* Close the document after saving.

## 4. Verify your output

Finally, build and run your application to confirm that the Apryse Server SDK is working correctly. After the application runs successfully, it will generate a blank PDF file locally.

1. Go to the **Documents > NewApryseProject** folder, and right-click to select **Open in Terminal.**
2. In the terminal, run the `HelloWorld.py` script:

{% code lineNumbers="true" %}

```shell
python.exe -u HelloWorld.py 
```

{% endcode %}

A successful output looks similar to:

{% code lineNumbers="true" %}

```shell
PDFNet is running in demo mode.
PackageV2: base
```

{% endcode %}

3. Go to the **Documents > NewApryseProject** folder using the file manager.
4. Verify the blank `output.pdf` file was generated programmatically using the Apryse Server SDK. The folder structure looks similar to:

{% code lineNumbers="true" %}

```
NewApryseProject/
├── HelloWorld.py
└── output.pdf
```

{% endcode %}

###

###

{% endtab %}

{% tab title="Linux" %}
{% tabs %}
{% tab title="Python" %}

## Prerequisites

Before you start:

* Install [Visual Studio Code](https://code.visualstudio.com/Download) or another code editor to develop and debug code.
* Install [Python 3](https://www.python.org/downloads/macos/) and pip.
* Get your Apryse trial key.

{% @apryse-license-key/apryse-license-key platform="SERVER" variant="full" %}

{% hint style="info" %}
**Run Apryse SDK in production**

A commercial license key is required for use in a production environment. [Contact sales](https://apryse.com/form/contact-sales) to purchase a commercial license key.
{% endhint %}

{% hint style="warning" %}
**Keep your commercial license key confidential**

License keys are uniquely generated and strictly confidential. Don't publish or store them in any public location, including public GitHub repositories.
{% endhint %}

## 1. Set up Python and pip

Before getting started, ensure that Python and pip are installed. You’ll use pip to install the Apryse Server SDK. We used Ubuntu 25.10 to create this guide.

1. Check whether Python and pip are installed:

{% code lineNumbers="true" %}

```bash
python3 --version 
python3 -m pip --version
which python3
```

{% endcode %}

On Ubuntu, `/usr/bin/python3` is the system Python installed via the Advanced Package Tool (apt) package manager. This is expected and safe to use on Ubuntu systems.

2. If Python and pip aren't installed, or you want to ensure they're up-to-date, run:

{% code lineNumbers="true" %}

```bash
sudo apt update 
sudo apt install python3 python3-pip python3-venv 
```

{% endcode %}

The commands install Python 3, pip, and the `venv` module if they aren't already installed, and update them to the latest versions provided by Ubuntu.

{% hint style="info" %}
**Info**

On most Ubuntu systems, the `universe` repository is already enabled. If a package cannot be found, you may need to enable it.
{% endhint %}

## 2. Set up your project

Set up your project by creating a folder and preparing your workspace for the application.

1. In your file manager, create a **Documents > NewApryseProject** folder.
2. Open the new **NewApryseProject** folder in Visual Studio Code or in another code editor.
3. Create a `HelloWorld.py` file at the root of your project.

## 3. Add the Apryse SDK

Next, integrate the Apryse Server SDK into your Python application and add the code needed to generate a PDF.

1. Navigate to the `~/Documents/NewApryseProject` directory in your terminal, then install the Apryse SDK using pip to fetch the package from Apryse's package index

{% hint style="info" %}
**Info**

Install the Apryse SDK in a [virtual environment](https://docs.python.org/3/library/venv.html) to ensure it's isolated and installed in a predictable location. When running Python scripts that import `apryse-sdk`, make sure you activate the same virtual environment first.
{% endhint %}

{% code lineNumbers="true" %}

```bash
python3 -m pip install apryse-sdk --extra-index-url=https://pypi.apryse.com 
```

{% endcode %}

A successful output looks like:

{% code lineNumbers="true" %}

```bash
Looking in indexes: https://pypi.org/simple, <additional index>
Collecting apryse-sdk
  Downloading apryse_sdk-<version>.whl
Installing collected packages: apryse-sdk
Successfully installed apryse-sdk-<version>
```

{% endcode %}

{% hint style="info" %}
**Info**

The legacy `PDFNetPython3` package on the default Python Package Index (PyPI) is no longer maintained.
{% endhint %}

2. Open the `HelloWorld.py` file in Visual Studio Code or your preferred code editor:

{% code lineNumbers="true" %}

```
~/Documents/NewApryseProject/HelloWorld.py
```

{% endcode %}

3. Add this code to the `HelloWorld.py` file, update your license key, and save your changes:

<pre class="language-python" data-line-numbers><code class="lang-python"># You can add the following line to integrate apryse-sdk
# into your solution from anywhere on your system so long as
# the library was installed successfully via pip

from apryse_sdk import *

def main():

    # Initialize Apryse SDK
    # Replace with your demo license key
    PDFNet.Initialize("<code class="expression">visitor.claims.serverKey || "YOUR_LICENSE_KEY"</code>")
    
    # This example creates a new document
    # and a new page, then adds the page
    # in the page sequence of the document
    doc = PDFDoc()
    
    page1 = doc.PageCreate()
    doc.PagePushBack(page1)
    
    # Save the document in a linearized
    # format which is the most popular and
    # effective way to speed up viewing PDFs
    doc.Save(("output.pdf"), SDFDoc.e_linearized)
    
    doc.Close()
    
if __name__ == "__main__":
    main()
</code></pre>

{% hint style="info" %}
**Info**

If you're signed in with an Apryse account, your license key is automatically prepopulated in all code snippets.
{% endhint %}

With this code, you can:

* Import and initialize the Apryse Python SDK using your license key.
* Create a new PDF document and add a blank page.
* Save the document as a linearized PDF for optimized viewing.
* Perform document operations using the PDFNet API—in this case, creating and modifying a `PDFDoc` object.
* Close the document after saving.

## 4. Verify your output

Finally, build and run your application to confirm that the Apryse Server SDK is working correctly. After the application runs successfully, it will generate a blank PDF file locally.

1. Go to the **Documents** > **NewApryseProject** folder, and right-click to select **Open in Terminal**.
2. In the terminal, run the `HelloWorld.py` script:

{% code lineNumbers="true" %}

```bash
python3 -u HelloWorld.py 
```

{% endcode %}

A successful output looks similar to:

{% code lineNumbers="true" %}

```bash
PDFNet is running in demo mode.
PackageV2: base
```

{% endcode %}

3. Go to the **Documents > NewApryseProject** folder using the file manager.
4. Verify the blank `output.pdf` file was generated programmatically using the Apryse Server SDK. The folder structure looks similar to:

{% code lineNumbers="true" %}

```
NewApryseProject/
├── HelloWorld.py
└── output.pdf
```

{% endcode %}
{% endtab %}

{% tab title="AWS Lambda Functions" %}
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.

## Prerequisites

* [Python 3.6-3.14](https://www.python.org/downloads/)
* An active [AWS account](https://aws.amazon.com/lambda/getting-started/)

## Initial setup

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.

{% code lineNumbers="true" %}

```sh
python3 --version
```

{% endcode %}

From the command line:

{% code lineNumbers="true" %}

```sh
mkdir YOUR_FUNCTION_FOLDER
cd YOUR_FUNCTION_FOLDER
python3 -m pip install --target . apryse-sdk --extra-index-url=https://pypi.apryse.com
```

{% endcode %}

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.

{% code lineNumbers="true" %}

```sh
zip -r ./YOUR_FUNCTION_FOLDER.zip .
```

{% endcode %}

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:

* Lambda > Functions > Create function > Author from scratch > Function name \[`YOUR_FUNCTION_NAME`] > Runtime \[Python3.x] (Choose the version that matches your Python3 version from the checking above.) > choose Create Function
* Upload from .zip file > Upload \[your zip package] > Save
* Add triger > API Gateway > Create an API > REST > Security \[Open]
* Configuration > General configuration > Edit > memory \[Choose 10240MB]

## Integrate into your application

Once you have followed the initial setup instructions, you can begin calling Apryse SDK APIs in your lambda function source. For example:

{% code lineNumbers="true" %}

```python
from base64 import b64encode, b64decode
import json
from apryse_sdk import *
def lambda_handler(event, context):
    if event["httpMethod"] == "GET":
        return {
            'statusCode': 200,
            'body': json.dumps('Hello from Apryse!')
        }
    elif event["httpMethod"] == "POST":
        try:
            body = json.loads(event["body"])
            PDFNet.Initialize("YOUR_APRYSE_LICENSE_KEY") # if you use apryse-sdk 9.1.0 and above. Otherwise use PDFNet.Initialize()
            # your AWS lambda function goes here
            message = {
                'statusCode': 200,
                'headers': {'Content-Type': 'application/json'},
                'body': json.dumps(base64_string),
            }
            return message
        except Exception as e:
            message = {
                'statusCode': 500,
                'body': e
                }
            return (message)
```

{% endcode %}

## Run Sample Code

You can update python script of your AWS Lambda function with the following code or download the [source code from our github respository](https://github.com/PDFTron/aws-function-example/tree/main/server-python/). 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.

{% code lineNumbers="true" %}

```python
# This example shows how to create AWS Lambda functions using Apryse SDK.
# A REST API request was posted with base64 encoded data by the client.
# The request would be processed by the server and a response with base64 encoded data of OfficeToPDF output would be sent to the client.
from base64 import b64encode, b64decode
import json
from apryse_sdk import *
def lambda_handler(event, context):
    if event["httpMethod"] == "GET":
        return {
            'statusCode': 200,
            'body': json.dumps('Hello, please send base64 doc to use this Lambda!')
        }
    elif event["httpMethod"] == "POST":
        try:
            body = json.loads(event["body"])
            base64str = body["file"]["data"]
            filename = body["file"]["filename"]
            base64_bytes = b64decode(base64str)
            # save input doc
            output_path = '/tmp/'
            input_filename = filename.split('.')[0] + '.docx'
            with open(output_path + input_filename, 'wb') as open_file:
                byte_content = open_file.write(base64_bytes)
            # Start with a PDFDoc
            PDFNet.Initialize("YOUR_APRYSE_LICENSE_KEY") # if you use apryse-sdk 9.1.0 and above. Otherwise use PDFNet.Initialize()
            pdfdoc = PDFDoc()
            # perform the conversion with no optional parameters and save to /temp
            Convert.OfficeToPDF(pdfdoc, output_path + input_filename, None)
            # save the result
            output_filename = filename.split('.')[0] + '.pdf'
            pdfdoc.Save(output_path + output_filename, SDFDoc.e_linearized)
            # sending data
            with open(output_path + output_filename, 'rb') as open_file:
                byte_content = open_file.read()
            base64_bytes = b64encode(byte_content)
            base64_string = base64_bytes.decode('utf-8')
            print("Sending " + output_filename )
            message = {
                'statusCode': 200,
                'headers': {'Content-Type': 'application/json'},
                'body': json.dumps(base64_string),
            }
            return message
        except Exception as e:
            print(e)
            message = {
                'statusCode': 500,
                'body': e
                }
            return (message)
```

{% endcode %}

### Testing

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.

{% code lineNumbers="true" %}

```python
json_data = {
            "file": {
                "encoding": "base64",
                "data": base64_string_of_your_office_document,
                "filename": filename,
                "content-type": "application/pdf"
            }
        }
```

{% endcode %}

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](https://github.com/PDFTron/aws-function-example/tree/main/client/). 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:

{% code lineNumbers="true" %}

```sh
python AWSLambdaExample.py --url <YOUR PUBLISHED FUNCTION URL>
```

{% endcode %}

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:

{% code lineNumbers="true" %}

```sh
python AWSLambdaExample.py --url <YOUR PUBLISHED FUNCTION URL> --filename <YOUR OFFICE FILENAME>
```

{% endcode %}

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!
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

***

### Related Blogs

* [How to Build Optical Character Recognition (OCR) in Python](https://apryse.com/blog/ocr-in-python) - 1/16/25
* [Splitting a PDF Using Python ](https://apryse.com/blog/pdf-splitting-with-python)- 9/11/24
* [PDF to Office Document Conversion Using Apryse and Python](https://apryse.com/blog/pdf-to-office-conversion-in-python-with-apryse-sdk) - 4/4/24
* [Generating Documents and Reports from DOCX Templates and JSON using Apryse and Python](https://apryse.com/blog/docx-template-document-generation-using-python) - 10/9/23
* [A Guide to PDF Data Extraction Using Apryse SDK and Python](https://apryse.com/blog/pdf-data-extraction-with-python) - 7/20/23
* [Adding a Digital Signature to a PDF With the Python SDK](https://apryse.com/blog/digital-signature-using-python-sdk) - 7/13/23
* [How to Extract Text from a PDF Using Python](https://apryse.com/blog/python/extract-text-from-pdf-python) - 12/9/22


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/core/get-started/languages/python3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
