- Cài đặt công cụ (nếu chưa có):
sudo apt-get install poppler-utils # Ubuntu/Debian
brew install poppler # macOS
|
- 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"
|
- 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