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
| Requirement | Detail |
|---|---|
| Python | 3.11 or later |
| OS | Windows, Linux, or macOS |
| Runtime dependencies | cryptography>=42, asn1crypto>=1.5 (installed automatically) |
| Optional extras | images (Pillow), woff2 (Brotli), text-layout (uharfbuzz, python-bidi, fonttools) |
1. Install the package
pip install aspose-pdf-foss-for-python2. 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
- Quick Start — build, save, and reload a PDF
- License — MIT license terms
- Developer Guide — feature-level documentation