Installation

Overview

Install Aspose.PDF FOSS for Python with the command below. The package targets Python 3.11 and later and ships type information for editor autocompletion.


Prerequisites

RequirementDetail
Python3.11 or later
OSWindows, Linux, or macOS
Runtime dependenciescryptography>=42, asn1crypto>=1.5 (installed automatically)
Optional extrasimages (Pillow), woff2 (Brotli), text-layout (uharfbuzz, python-bidi, fonttools)

API change: The Document class has been updated (API_MODIFIED).


1. Install the package

git clone https://github.com/aspose-pdf-foss/Aspose-PDF-FOSS-for-Python.git
cd Aspose-PDF-FOSS-for-Python
pip install -e .

2. Install optional extras (if needed)

Add the images, woff2, or text-layout extra when you need Pillow-based raster image handling, Brotli-based WOFF2 font decoding, or HarfBuzz-based complex text shaping:

git clone https://github.com/aspose-pdf-foss/Aspose-PDF-FOSS-for-Python.git
cd Aspose-PDF-FOSS-for-Python
pip install -e .

3. Verify the installation

Import the package and construct an empty Document to confirm the install resolved correctly:

from aspose_pdf import Document

document = Document()
print("Aspose.PDF FOSS for Python installed OK — pages:", document.page_count)

A successful run prints pages: 0 for the freshly constructed, empty document.


Next Steps

See Also

 English