PDF办公全能工具,覆盖日常办公中PDF处理的全部常见需求。
python3 scripts/pdf_ops.py merge file1.pdf file2.pdf -o merged.pdf
python3 scripts/pdf_ops.py split input.pdf --pages 1-3,5,7-10 -o split/
python3 scripts/pdf_ops.py extract-text input.pdf -o text.txt
python3 scripts/pdf_ops.py watermark input.pdf --text "机密文件" -o watermarked.pdf
python3 scripts/pdf_ops.py rotate input.pdf --degrees 90 -o rotated.pdf
python3 scripts/pdf_ops.py page-number input.pdf -o numbered.pdf
python3 scripts/pdf_ops.py to-images input.pdf -o images/
python3 scripts/pdf_ops.py encrypt input.pdf --password 123456 -o encrypted.pdf
python3 scripts/pdf_ops.py decrypt encrypted.pdf --password 123456 -o decrypted.pdf
python3 scripts/pdf_ops.py ocr input.pdf -o ocr_result.txt
pip install PyPDF2 pdfplumber Pillow reportlab pytesseract
# OCR需要安装tesseract: sudo apt install tesseract-ocr tesseract-ocr-chi-sim
共 1 个版本