运行时依赖
安装命令
点击复制技能文档
PDF 代理
Summary
Use pdf代理 to perform PDF operations (merge, split, 压缩, convert, OCR, etc.) with detAIled usage metering in the 输出. Best for local, self-hosted processing where 输入s/输出s must stay on disk. This 技能 ships source code in pdf代理/ and 运行s via uv 运行 from scripts/pdf代理_命令行工具.py (no PyPI publish required).
Requirements
uv 安装ed and on PATH. 系统 工具s as needed by specific commands: qpdf, ghostscript, poppler (pdftoppm), libreoffice, chromium (for HTML -> PDF), and ocrmypdf.
Core Usage
Merge PDFs with usage 指标: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py merge file1.pdf file2.pdf --out merged.pdf --json Split a PDF by ranges: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py split 输入.pdf --range "1-3,5" --out-dir out_dir --json 压缩 a PDF with a pre设置: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py 压缩 输入.pdf --pre设置 ebook --out 压缩ed.pdf --json Convert images to PDF: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py jpg-to-pdf image1.jpg image2.png --out 输出.pdf --json OCR a 扫描ned PDF: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py ocr 扫描.pdf --lang eng --out 扫描_ocr.pdf --json 代理 mode for multi-step instructions: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py 代理 "merge then rotate 90 degrees every other page" -i file1.pdf -i file2.pdf --out out.pdf --json Dependency/binary 检查: uv 运行 {baseDir}/scripts/pdf代理_命令行工具.py doctor --json
Notes
Use --json for machine-readable 输出s (includes usage and 输出s). For 加密ed PDFs, pass --password or per-file --passwords. If a conversion 工具 is missing, pdf代理 may use a fallback path and will note it in 输出 or 记录s. Optional Python deps are still command-specific: uv 运行 --with pdf2docx --with camelot-py[cv] --with pdfplumber --with pyhanko {baseDir}/scripts/pdf代理_命令行工具.py ...