Installation

Installation

Install Aspose.PDF FOSS for Python from PyPI with pip. 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)

1. Install the package

pip install aspose-pdf-foss-for-python

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:

pip install "aspose-pdf-foss-for-python[images]"
pip install "aspose-pdf-foss-for-python[woff2]"
pip install "aspose-pdf-foss-for-python[text-layout]"

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