PDF 파일을 여러 개의 이미지 파일로 변환하는 파이썬 스크립트입니다.
pip install -r requirements.txtmacOS:
brew install popplerWindows:
- Poppler for Windows 다운로드
- 또는
python split_pdf.py input.pdf -p "C:\Program Files\poppler\bin"옵션 사용
Linux (Ubuntu/Debian):
sudo apt-get install poppler-utilspython split_pdf.py input.pdf-o, --output: 출력 폴더 (기본값: PDF와 같은 폴더)-d, --dpi: 해상도 (기본값: 200)-f, --format: 이미지 형식 - png, jpg, ppm (기본값: png)--first-page: 시작 페이지 (1부터 시작)--last-page: 끝 페이지-p, --poppler-path: poppler 설치 경로 (Windows)
# PNG 형식, 기본 설정
python split_pdf.py document.pdf
# 커스텀 폴더에 저장
python split_pdf.py document.pdf -o ./images
# JPG 형식, 300 DPI
python split_pdf.py document.pdf -f jpg -d 300
# 특정 페이지만 변환 (1~5페이지)
python split_pdf.py document.pdf --first-page 1 --last-page 5
# 고해상도 PNG (300 DPI)
python split_pdf.py document.pdf -d 300
# Windows에서 poppler 경로 지정
python split_pdf.py document.pdf -p "C:\Program Files\poppler\bin"📄 Converting: document.pdf
💾 Output dir: ./images
⚙️ DPI: 200, Format: PNG
✅ Total pages: 10
✓ Saved: ./images/document_page_1.png
✓ Saved: ./images/document_page_2.png
...
✓ Saved: ./images/document_page_10.png
🎉 Done! 10 images created.