Extract embedded, inline, rendered, and vector-backed images from PDF files
Project description
pdf-image-kit
pdf-image-kit 是一个独立的 PDF 图片提取包,专注于把 PDF 里的候选图片提取出来。
能力
- 提取嵌入位图
- 提取内联图片块
- 在必要时渲染页面片段作为回退
- 提取大块矢量图区域
- 支持导出到磁盘或直接返回内存结果
安装
pip install pdf-image-kit
作为 Python 包调用
安装包名是 pdf-image-kit,导入模块名仍然是 pdf_image_extractor。
from pdf_image_extractor import extract_images, extract_images_from_bytes
manifest = extract_images(
pdf_path="/path/to/demo.pdf",
output_dir="./out/demo",
min_width=1,
min_height=1,
render_dpi=216,
dedupe=True,
vector_min_width=80,
vector_min_height=60,
vector_padding=6,
)
print(manifest["exported_images"])
CLI
pdf-image-extract /path/to/demo.pdf -o ./out
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
pdf_image_kit-0.1.0.tar.gz
(7.1 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 pdf_image_kit-0.1.0.tar.gz.
File metadata
- Download URL: pdf_image_kit-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86b799bdc010aa6b8f575441cd1b847e5b273dc0fcaaef60e502b8327c7b39de
|
|
| MD5 |
8cf9d16e233d7c5c1d17f4fcb1d7b0d2
|
|
| BLAKE2b-256 |
b9c98c0e1100f5150ce814138d8567fc755e3015bebf8f53142e6973127a7dfc
|
File details
Details for the file pdf_image_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pdf_image_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aa77e7be5f9255cd4a374387eaefbe898b441a936be0647613df6c34a2e3164
|
|
| MD5 |
28bb97bcc6fb6b8fe439c46198277abe
|
|
| BLAKE2b-256 |
c5a2bef4d5de9ad52591ef4ae891cb68db82f094d7f7cd7db9bf00e370dfa091
|