Documents

pypdf

Try it

Extract text, metadata, and pages from PDF files using pypdf. Use for tasks such as reading PDF content, extracting specific pages, splitting or merging PDFs...

What it does

Extract text, metadata, and pages from PDF files using pypdf. Use for tasks such as reading PDF content, extracting specific pages, splitting or merging PDFs...

The skill document

pypdf

Use scripts/pypdf_cli.py for deterministic PDF operations instead of ad-hoc pypdf snippets.

Workflow

  1. Confirm the PDF file path is accessible locally.
  2. Run the desired command (inspect, extract-text, extract-pages, merge, split, rotate).
  3. Inspect text output or the resulting PDF file.

Command Guide

  • Inspect metadata and page count:
    • python scripts/pypdf_cli.py info --input
  • Extract all text:
    • python scripts/pypdf_cli.py extract-text --input
  • Extract text from specific pages (0-indexed):
    • python scripts/pypdf_cli.py extract-text --input --pages 0 1 2
  • Split PDF into individual pages:
    • python scripts/pypdf_cli.py split --input --output-dir
  • Extract a page range into a new PDF:
    • python scripts/pypdf_cli.py extract-pages --input --pages 0 1 2 --output
  • Merge multiple PDFs:
    • python scripts/pypdf_cli.py merge --inputs --output
  • Rotate pages:
    • python scripts/pypdf_cli.py rotate --input --angle 90 --output
    • --angle must be 90, 180, or 270.
    • Optionally restrict to specific pages with --pages 0 2.

Operational Rules

  • Pages are always 0-indexed in all commands.
  • For extract-text, output goes to stdout; redirect to a file when needed.
  • Require explicit --output for commands that write a new PDF.
  • Install dependency if missing: pip install pypdf.

Related skills

Render PDF pages to images, extract embedded images, annotate PDFs, and perform advanced PDF inspection using pymupdf (fitz). Use for tasks such as exporting...

29 installs

Convert PDF and image files into 10 document and data formats, with OCR and layout controls.

by ComPDF32 installs95 stars

Run 50+ PDF and document processing operations through the ComPDF Cloud API from one agent skill.

38 installs99 stars

Convert unstructured documents into LLM-ready structured data. Supports PDF, Word, PPT, and images; extracts paragraphs, formulas, tables, charts, and other...

24 installs1 stars

Convert, edit, and extract data from PDF files via the ComPDF Cloud API across 50+ operations.

28 installs102 stars

Convert PDFs, images, Office, HTML, and OFD documents to structured Markdown or JSON via xparse-cli.

28 installs2 stars