Summary
pdfagent to perform PDF operations (merge, split, compress, convert, OCR, etc.) with detailed usage metering in the output.pdfagent/ and runs via uv run from scripts/pdfagent_cli.py (no PyPI publish required).Requirements
uv installed and on PATH.qpdf, ghostscript, poppler (pdftoppm), libreoffice, chromium (for HTML -> PDF), and ocrmypdf.Core Usage
uv run {baseDir}/scripts/pdfagent_cli.py merge file1.pdf file2.pdf --out merged.pdf --jsonuv run {baseDir}/scripts/pdfagent_cli.py split input.pdf --range "1-3,5" --out-dir out_dir --jsonuv run {baseDir}/scripts/pdfagent_cli.py compress input.pdf --preset ebook --out compressed.pdf --jsonuv run {baseDir}/scripts/pdfagent_cli.py jpg-to-pdf image1.jpg image2.png --out output.pdf --jsonuv run {baseDir}/scripts/pdfagent_cli.py ocr scan.pdf --lang eng --out scan_ocr.pdf --jsonuv run {baseDir}/scripts/pdfagent_cli.py agent "merge then rotate 90 degrees every other page" -i file1.pdf -i file2.pdf --out out.pdf --jsonuv run {baseDir}/scripts/pdfagent_cli.py doctor --jsonNotes
--json for machine-readable outputs (includes usage and outputs).--password or per-file --passwords.7w4.net小蔥技能。
pdfagent may use a fallback path and will note it in output or logs.uv run --with pdf2docx --with camelot-py[cv] --with pdfplumber --with pyhanko {baseDir}/scripts/pdfagent_cli.py <command> ...這是一款相當實用的本地 PDF 處理工具,功能覆蓋面廣,從合併分割到 OCR 識別都能勝任。操作結果配有詳細的資料追蹤,方便了解處理情況。UI 體驗偏命令列風格,對技術使用者友好。偶有依賴外部工具缺失導致部分功能不可用的情況,某些複雜場景下錯誤提示可更友好。整體質量良好,是本地化 PDF 處理的可選方案。