This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
# IMPORTANT! This script requires a Unix based system. Such as Mac, Ubuntu, or Windows Subsystem for Linux (WSL) running under Windows. You cannot use it in Windows alone. | |
# The reason for this is that the poppler-utils dependency does not have all the required features on Windows. | |
# This script requires poppler-utils (containing: pdfimage, pdftoppm), imagemagick (containing: convert), and alive-progress (containing: alive_bar) | |
# If your pdf file contains jp2 images, you can either install libopenjp2-tools (containing: opj_decompress), or uncomment the line that indicates a large performance hit | |
# Example usage: python3 pdf-extract-images.py "Players Handbook.pdf" "PHB" |