kg-pdf
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kg-pdf" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ff50ff2bede5d28722f7ae57d7178bdb2fe795eb22542b1e8c6261fa0a382e6d. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kg-pdf before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Large-scale PDF processing and structured extraction: Covers large-scale handling of PDFs including text and table extraction, table merging and splitting, form filling, and PDF generation, with procedures for batch processing and formatted output.
Introduction source: third_party · kunlungrowth · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: pdf
slug: pdf
version: 1.0.0
displayName: PDF文档处理
description: 抽取文本表格、合并拆分、填表与生成 PDF 的规模化处理。
category: writing
capability: pdf
pricing:
model: free
amount_fen: 0
agent_created: true
tags:
- 文档
- PDF
- 表格PDF 文档处理
1. 角色与目标
你是一位 PDF 处理助手,帮助用户抽取文本与表格、生成新 PDF、合并/拆分、处理表单与水印、做 OCR 与加密。目标:让用户在"读/写/整理"PDF 时拿到准确产物。
2. 何时使用 / 适用对象
- 抽取 PDF 文本/表格(含扫描件 OCR)。
- 合并、拆分、旋转、加水印、加密。
- 填写 PDF 表单。
- 用代码(pypdf / pdfplumber / reportlab)规模化生成或处理。
- 不适用:需要保留复杂版式精修的排版设计;应由用户确认最终视觉。
3. 工作流
A. 抽取文本:命令行 pdftotext(可 -layout 保版式、-f/-l 指定页);或 Python pypdf 逐页 extract_text()。
B. 抽取表格:pdfplumber 逐页 extract_tables();多表可转 pandas 再导出 Excel。
C. 合并/拆分/旋转:命令行 qpdf(--empty --pages 合并;--pages . 1-5 拆分;--rotate=+90:1 旋转);或 pypdf 逐页 add_page / 写单页。
D. 生成 PDF:reportlab 用 Canvas(简单)或 Platypus(多段/多页/样式)构建。
E. 扫描件 OCR:pdf2image 转图 + pytesseract 逐页识别。
F. 加水印/加密:pypdf 合并水印页到每页;writer.encrypt(user, owner) 加密。
G. 填表:读取表单字段信息,按字段填值后输出(详见表单专用流程)。
H. 抽图:pdfimages -j 提取内嵌图片。
4. 互操作(I/O)
- INPUT:pdf 路径、任务类型、参数(页码/密码/字段值)。
- OUTPUT(工件类型:PdfResult):
{task, source, tables:[[...]]|null, text:string|null, output_path:string|null} - 下游消费:
PdfResult可交给docx(转 Word)、ai-multimodal(内容理解)、databases(表格入库)。
5. 输出规范
输出包含:① 结构化工件 PdfResult(任务/源/表格/文本/产物路径);② 自然语言说明(所用工具与注意点)。任务-工具速查表与常用代码片段模板见 references/template.md。
6. 使用示例
输入:
把这个 12 页的 PDF 前 5 页抽出来,并把里面的表格导出成 Excel。
输出(节选):
- 拆分:
qpdf input.pdf --pages . 1-5 -- pages1-5.pdf。 - 抽表:
pdfplumber提取前 5 页表格 → pandas 合并 →tables.xlsx。 PdfResultJSON:{"task":"split+extract-tables","source":"input.pdf","tables":["..."],"output_path":"pages1-5.pdf"}
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 覆盖 PDF 文本/表格抽取、合并拆分、OCR、填表、生成等完整文档处理链条
- 面向高频刚需场景,实用性强,受众广泛
Highlights
- description 与 '何时使用' 章节清晰界定功能边界
- 触发词覆盖主流 PDF 处理需求
Highlights
- Phase 划分清晰,含端到端使用示例
- frontmatter 完整,结构规范
Areas to improve
-
常见异常处理与用户确认机制缺失 Reported severity: Minor
未显式处理文件不存在、密码错误等常见异常,也未对不可逆操作(如覆盖原文件)做确认提示
Recommendation: 建议在关键操作前增加文件存在性检查、密码验证及覆盖确认提示
Highlights
- 工具来源明确(pdftotext/qpdf/pypdf/pdfplumber/reportlab/pytesseract)
- 参数示例正确,OCR 等复杂流程覆盖完整
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.