Extract images from PDF files with three output modes.
ModeCommandBest ForOriginalpython scripts/extract_original.pyPrinting, high-qualityStandardpython scripts/extract_standard.pyWebsite, e-commerceCompresspython scripts/extract_compress.pyWeChat, Douyin, social
bash
# Install dependencies
pip install pymupdf pillow
# Configure
# Edit CONFIG section at top of each script:
# - pdf_folder: Path to your PDF folder
# - output_folder: Where to save images
# Run
python scripts/extract_original.py # Original quality
python scripts/extract_standard.py # 800x800 square
python scripts/extract_compress.py # Compressed sharing
text
output_folder/
├── PDF_Name_1/
│ ├── page001_img01.jpg
│ └── ...
└── PDF_Name_2/
└── ...
License: MIT
Author: 小杰 @ AI家具链