Skip to main content

Extract embedded, inline, rendered, and vector-backed images from PDF files

Project description

pdf-image-kit

pdf-image-kit is a standalone PDF image extraction package focused on pulling candidate images out of PDF files.

Features

  • Extracts embedded bitmap images
  • Extracts inline image blocks
  • Renders page clips as a fallback when needed
  • Captures large vector drawing regions
  • Supports both file output and in-memory extraction

Installation

pip install pdf-image-kit

Python Usage

from pdf_image_kit 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


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.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_image_kit-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pdf_image_kit-0.1.1.tar.gz.

File metadata

  • Download URL: pdf_image_kit-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for pdf_image_kit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6f2658475de6cde41561bc2bacdaada87f1bdbd2ed03aa8d1e0b4148d75df46f
MD5 f14cff4b2733b8c73634a704d432bbcc
BLAKE2b-256 cb7737bd8f62d5fd358a0e367377b008ef4126c2a7d9d6b135c28a87ba7f5480

See more details on using hashes here.

File details

Details for the file pdf_image_kit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pdf_image_kit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for pdf_image_kit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbaee165fbcae71d1e1b6a81545333df7c979dc8fc8541bdf5fe7c18c46265e0
MD5 be06ff2216a8e716601b72c75cde84e3
BLAKE2b-256 55bb1344b120f422d9b23b3addb8a94c3595417e1d4fac83f519c88d281d8b53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page