Fast PDF to image converter with batch processing and multi-threading
Project description
pdf-to-img
Fast PDF to image converter with batch processing and multi-threading support using PyMuPDF.
Installation
pip install pdf-to-img
# or
uv pip install pdf-to-img
Quick start
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
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymupdf_img-0.1.0.tar.gz
(15.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymupdf_img-0.1.0.tar.gz.
File metadata
- Download URL: pymupdf_img-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7d038d4dc8b8ff208f1f7c1c323b162df11970449a1e1fca32ceadf2b87ec36
|
|
| MD5 |
4ead1185f1988fd7053a35e9af90038d
|
|
| BLAKE2b-256 |
e64528a4976358f1cbfc9536321a107b5363e5467411fcff9009841f17bfcbfd
|
File details
Details for the file pymupdf_img-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pymupdf_img-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7d880e57a981164ac797f849e465ac1221a97376e303de8783fb6b620611876
|
|
| MD5 |
9204f183751919a6125cd056e5c88521
|
|
| BLAKE2b-256 |
80d861cbe9c6459dc39c0bee9d3129daf173e0288775790c07360df2f36e1383
|