pymupdf-img
Fast PDF to image converter with batch processing and multi-threading support using PyMuPDF.
Installation
pip install pymupdf-img
# or
uv pip install pymupdf-img
Quick start
Command Line
pdf2img document.pdf
Options:
-o, --output-dir: Output directory (default:output)-p, --prefix: Image filename prefix-r, --range: Page range, e.g.,1-10-d, --dpi: Resolution in DPI (default: 95)-e, --ext: Format:jpg,png,webp(default:jpg)-q, --quality: Image quality 1-100 (default: 95)-m, --max-size: Max width/height in pixels (default: 2500)-b, --batch-size: Pages per batch (default: 25)-a, --auto-alpha: PNG for transparency, otherwise ext format
from pymupdf_img import convert_pdf
# Basic conversion
images = convert_pdf("document.pdf")
# Advanced usage
images = convert_pdf(
pdf_path="path/to/document.pdf",
page_range=(1, 10), # None for all pages or (start, end) tuple
output_dir="output/images", # output directory
img_prefix="img_", # prefix for image filenames
dpi=150, # resolution
ext="jpg", # output image format
quality=95, # image quality for lossy formats
max_size=2500, # max width/height in pixels
batch_size=50, # number of pages to process per batch
auto_alpha_format=True # PNG if alpha channel detected, ext otherwise
)
Development
# Build the package
uv run python -m build
# Check the package
uv run twine check dist/*
# Upload the package
uv run twine upload dist/*
Metadata
Release files for pymupdf-img 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymupdf_img-0.1.1.tar.gz | 16.9 kB | Without provenance | Details for pymupdf_img-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymupdf_img-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pymupdf_img-0.1.1-py3-none-any.whl |
Total release size: 34.8 kB
Release files / pymupdf_img-0.1.1.tar.gz
| Download URL | pymupdf_img-0.1.1.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51874e1b6829d3ddabcd7837a928c281f198a8428a033381cc4bb67e6167fe99
|
|
BLAKE2b-256 checksum How to use checksums |
75a5a2c06e98dedb608162582c5974848d1649d7dc5ed5dd15471fc6b4231408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / pymupdf_img-0.1.1-py3-none-any.whl
| Download URL | pymupdf_img-0.1.1-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8aaf524e29b84fa3eacf43dd25234968916fdacefd5b3460ca0cc077a3ecf08a
|
|
BLAKE2b-256 checksum How to use checksums |
90a3def31f04e2ed0dc8b064935fc24722fd43fd4e898fa3f9429106ae69d932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for pymupdf-img 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.