Skip to content

kickbell/pdf_splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PDF Splitter - PDF를 이미지로 변환

PDF 파일을 여러 개의 이미지 파일로 변환하는 파이썬 스크립트입니다.

설치

1. 의존성 설치

pip install -r requirements.txt

2. Poppler 설치 (필수)

macOS:

brew install poppler

Windows:

  • Poppler for Windows 다운로드
  • 또는 python split_pdf.py input.pdf -p "C:\Program Files\poppler\bin" 옵션 사용

Linux (Ubuntu/Debian):

sudo apt-get install poppler-utils

사용법

기본 사용

python 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages