Thứ Bảy, 16 tháng 8, 2025

Tách file pdf ra từng trang

Công việc này thực hiện trên MacBook
  1. Cài đặt công cụ (nếu chưa có):
    sudo apt-get install poppler-utils # Ubuntu/Debian brew install poppler # macOS

     

  2. Tạo script split_pdf.sh:
    #!/bin/bash input_pdf="input.pdf" # Thay tên file PDF gốc output_prefix="page" # Tiền tố tên file output # Tách từng trang thành file riêng pdfseparate "$input_pdf" "${output_prefix}_%d.pdf"

     

  3. Chạy script:
    chmod +x split_pdf.sh ./split_pdf.sh

     

Kết quả: page_1.pdf, page_2.pdf, ..., page_90.pdf

 

Không có nhận xét nào:

Đăng nhận xét