AI Agent Hub
Back to skills
📁

PDF Office Toolkit

Office Efficiency Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please install @user_f1d11e73/zfl-pdf-toolkit following the guide at https://skillhub.cn/install/skillhub.md.

About this skill

Problem Context

A PDF that opens locally may still fail in a business system: strict server-side parsers can reject missing %%EOF, broken startxref, or unsupported AES-256 encryption. Splitting pages, correcting skew, adding watermarks, and checking sensitive data are often fragmented across tools.

How It Works

PDF Office Toolkit groups common PDF operations into scripts/pdf_toolkit.py subcommands: split-orient corrects and splits pages, merge combines files by name, annotate adds a translucent highlight and red border, watermark and generate create CJK-friendly PDFs, crypt performs AES-256 encryption or decryption, compress targets a file size with lossless-first rewriting, check and repair validate headers, EOF, xref, strict parsing, and first-page rendering, while batch aggregates directory-level PASS/FAIL results. Write-out commands such as orient, merge, generate, watermark, crypt, and flatten rerun a strict self-check after saving, preserving output for debugging when validation fails.

Boundaries And Notes

Orientation correction relies on Tesseract; sensitive-data scanning covers only the text layer, so scanned PDFs need OCR first. Flattening rasterizes pages and removes selectable text. AES-256 encrypted files may be rejected by legacy server previewers, so confirm compatibility before upload.

Use Cases

  • Validate PDF headers, xref, encryption, and first-page rendering before submission, then repair failures.
  • Merge multiple PDFs by filename order and apply a translucent confidentiality watermark.
  • Batch-check scanned PDFs in a folder, aggregate PASS/FAIL, then compress or repair failing files.
  • Mark a target line with a yellow highlight and red border, then flatten it into a read-only submission PDF.

Best For

  • Supervision engineers submitting documents who need pre-upload PDF health checks and repair.
  • Administrative staff handling scans and contracts who need splitting, merging, page numbers, and watermarks.
  • Legal staff preparing external materials who need highlighting, read-only flattening, and PII self-checks.
  • Project assistants archiving bulk files who need folder-level PDF checks and PASS/FAIL reports.