modelscope.cn

pdf-utilities

Read, extract, edit, and manipulate PDF documents including table extraction, page manipulation, fillable forms, and comments.

Installation

$ npx skills add https://modelscope.cn

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,767 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

PDF Utilities Skill

Overview

This skill provides comprehensive PDF processing capabilities including reading PDFs with multiple library backends (tabula, camelot, PyPDF2), extracting tables to DataFrames, editing/extracting page ranges, handling fillable forms, and managing PDF comments. All operations are driven by YAML configuration.

Key Components

ReadPDF Class (read_pdf.py)

Multi-backend PDF reading with table extraction:

  • readpdf(cfg, fileindex) - Route to appropriate backend based on config
  • frompdftabula(cfg, file_index) - Extract tables using tabula-py
  • frompdfcamelot(cfg, file_index) - Extract tables using camelot
  • frompdfPyPDF2(cfg, file_index) - Read PDF pages using PyPDF2

EditPDF Class (edit_pdf.py)

PDF page manipulation and extraction:

  • editpdf(cfg, fileindex) - Process PDF files based on configuration
  • frompdfPyPDF2(cfg, file_index) - Extract page ranges to new PDF files
  • processcfgfiles(cfg) - Process multiple PDF files from config

Additional Modules

  • fillable_pdf.py - Handle fillable PDF forms (fill fields, extract data)
  • pdf_comments.py - Add, read, and manipulate PDF annotations
  • pdf_reports.py - Generate PDF reports from data

Usage Patterns

Table Extraction Configuration

pdf:
  io: pdf_read
  reader: tabula  # or camelot, PyPDF2
  files:
    - path: "input.pdf"
      pages: [1, 2, 3]
      area: [0, 0, 100, 100]  # Optional: specific region

Page Extraction Configuration

pdf:
  io: pdf_edit
  files:
    - path: "source.pdf"
      output: "extracted_pages.pdf"
      page_start: 1
      page_end: 5

Common Workflows

  1. Table Extraction: PDF → tabula/camelot → DataFrame → CSV/Excel
  2. Page Extraction: Multi-page PDF → Extract range → New PDF
  3. Form Processing: Fillable PDF → Fill fields → Save completed form
  4. Report Generation: DataFrame → Generate styled PDF report

Module Location

  • Read: src/assetutilities/modules/pdfutilities/readpdf.py
  • Edit: src/assetutilities/modules/pdfutilities/editpdf.py
  • Forms: src/assetutilities/modules/pdfutilities/fillablepdf.py
  • Comments: src/assetutilities/modules/pdfutilities/pdfcomments.py
  • Reports: src/assetutilities/modules/pdfutilities/pdfreports.py

Dependencies

  • PyPDF2 (PDF reading and manipulation)
  • tabula-py (table extraction with Java backend)
  • camelot-py (table extraction)
  • reportlab (PDF generation, optional)