AI Agent Hub
Back to skills
PDF Processing Guide icon

PDF Processing Guide

Office Efficiency Updated 2026.08.30

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

Install @user_3b701cc1/pdf-hyl by following https://skillhub.cn/install/skillhub.md.

About this skill

Problem

PDF work often spans different tools: pypdf is suited for merging, splitting, reading metadata, and rotating pages; pdfplumber is suited for extracting layout-aware text and tables; reportlab is suited for generating PDFs from scratch; scanned files usually need image conversion before OCR; and form filling has separate guidance. This skill organizes “which library to use and what to do first” into a practical task path, reducing back-and-forth between multiple documents.

How It Works

  • Basic structure operations: use pypdf to merge PDFs, split by page, extract document metadata, and rotate selected pages, useful for archiving, extracting single pages, and fixing page orientation.
  • Text and table extraction: use pdfplumber to extract text and tables while preserving layout information, useful for reports, invoices, checklists, and tabular data.
  • PDF creation: use reportlab with Canvas or Platypus to create single-page or multi-page PDFs, useful for simple reports, notes, and test files.
  • CLI support: use pdftotext for quick text conversion and qpdf for structural operations such as merging and splitting, useful for scripting and batch processing.
  • Advanced tasks: convert scanned PDFs to images before OCR; handle watermarks, image extraction, and password protection according to the guide; follow forms.md for form filling instead of treating it as plain text replacement.

Boundaries

This is an engineering-oriented operations guide, not an OCR algorithm, layout reconstruction, or automatic recognition solution for complex business forms. For JavaScript pdf-lib, advanced pypdfium2, troubleshooting, and more detailed examples, consult reference.md.

Use Cases

  • Archive a multi-page invoice PDF by splitting each page into separate files.
  • Extract layout-aware text and tables from a quote PDF for later data review.
  • Generate a multi-page explanation PDF with reportlab for testing or delivery.
  • Process a scanned contract PDF by converting it to images before OCR text extraction.

Best For

  • Python engineers maintaining scripts: need to merge, split, and read PDF metadata in code.
  • Analysts organizing data: need to extract structured text from PDF tables for review.
  • Backend engineers building automation: need batch document processing with qpdf and pdftotext.
  • Toolchain engineers creating reports: need to output multi-page PDFs with reportlab.