Skip to content

This is a simple command line utility to convert PDF files to images.

Notifications You must be signed in to change notification settings

silvio2402/batchpdf2img

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Batch PDF -> image converter

This is a simple command line utility to convert PDF files to images.

Pre-requisites

  • Python 3

Installation

git clone https://github.com/silvio2402/batchpdf2img.git
cd batchpdf2img
pip install -r requirements.txt

Installing poppler

Windows

Windows users will have to build or download poppler for Windows. I recommend @oschwartz10612 version which is the most up-to-date. You will then have to add the bin/ folder to PATH.

Linux

Most distros ship with pdftoppm and pdftocairo. If they are not installed, refer to your package manager to install poppler-utils.

Mac

Mac users will have to install poppler.

Installing using Brew:

brew install poppler

Usage

python batchpdf2img.py pdfstoconvert/*.pdf -o pageimages/
usage: batchpdf2img.py [-h] -o OUTPUT [-e EXT] [-t MAX_THREADS] [-w] files

batch convert pdfs to images

positional arguments:
  files                 input files wildcard

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output directory
  -e EXT, --ext EXT     output format extension
  -t MAX_THREADS, --max-threads MAX_THREADS
                        max number of converter threads
  -w, --overwrite       overwrite all document, else only incomplete

About

This is a simple command line utility to convert PDF files to images.

Resources

Stars

Watchers

Forks

Languages