Skip to content

A simple CLI tool to convert PDF pages into a series of PNG/JPEG images

Notifications You must be signed in to change notification settings

fallapasseig/pdf-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF to JPEG Converter

A simple CLI tool to convert PDF pages into a series of PNG/JPEG images.

Features

  • Converts every page of a PDF to a high-resolution PNG/JPEG image (approx 216 DPI).
  • Names output files sequentially (e.g., 0000.png, 0001.jpeg).
  • Uses PyMuPDF for fast and self-contained rendering.

Installation

  1. Clone the repository.
  2. Create a virtual environment (recommended):
    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:
    pip install -r requirements.txt

Usage

python src/cli.py input.pdf --output-dir output_folder

This will generate 0000.png, 0001.png, etc., in the output_folder.

Running Tests

pytest

About

A simple CLI tool to convert PDF pages into a series of PNG/JPEG images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages