pdf

PDF 综合工具:提取文本与表格、生成/合并/拆分 PDF、处理表单。当需要填写 PDF 表单、批量处理/生成或分析 PDF 时使用。

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pdf" with this command: npx skills add kunhai-88/skills/kunhai-88-skills-pdf

PDF 处理指南

概述

本指南介绍使用 Python 库与命令行进行 PDF 处理的常用操作。高级功能、JavaScript 库与填表流程见原技能 reference.md / forms.md。

快速开始

from pypdf import PdfReader, PdfWriter

reader = PdfReader("document.pdf")
print(f"Pages: {len(reader.pages)}")

text = ""
for page in reader.pages:
    text += page.extract_text()

Python 库

pypdf:基础操作

合并PdfWriter 循环读入多个 PDF,add_pagewrite 输出。
拆分:遍历 reader.pages,每页单独 PdfWriter 写出。
元数据reader.metadata(title, author, subject, creator)。
旋转page.rotate(90) 后写入新 PDF。

pdfplumber:文本与表格提取

  • 文本pdfplumber.open() 遍历 pdf.pagespage.extract_text()
  • 表格page.extract_tables(),可转 DataFrame 再导出 Excel。

reportlab:生成 PDF

  • 简单canvas.Canvas + drawStringline 等,最后 save
  • 多页/富文本SimpleDocTemplateParagraphSpacerPageBreak,使用 getSampleStyleSheet

何时使用

  • 提取 PDF 文本或表格
  • 合并、拆分、旋转页面
  • 程序化生成 PDF 报告
  • 填写或解析 PDF 表单(见 forms.md)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

Repository Source
39.5K94.2Kanthropics
General

pdf

No summary provided by upstream source.

Repository SourceNeeds Review
483-openai
General

pdf

No summary provided by upstream source.

Repository SourceNeeds Review
General

pdf

No summary provided by upstream source.

Repository SourceNeeds Review