Best use case
pdf-parsing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
用于PDF文本与结构解析的PDF解析原子 skill,适用于通用行业文档解析场景。
Teams using pdf-parsing should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
$curl -o ~/.claude/skills/pdf-parsing/SKILL.md --create-dirs "https://raw.githubusercontent.com/aifinlab/FinClaw/main/skills/archive/pdf-parsing/SKILL.md"
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/pdf-parsing/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pdf-parsing Compares
| Feature / Agent | pdf-parsing | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
用于PDF文本与结构解析的PDF解析原子 skill,适用于通用行业文档解析场景。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# PDF解析 Skill
## 数据来源
本 Skill 支持多种PDF文档输入格式,核心数据来源包括:
### 1. PDF文档类型
- **文本型PDF**:可提取文本的标准PDF文档
- **扫描型PDF**:扫描图片生成的PDF文档
- **混合型PDF**:包含文本和图片的PDF文档
- **加密PDF**:需要密码的加密PDF文档
### 2. 文档内容类型
- **金融报告**:年报、季报、研究报告、公告
- **合同协议**:贷款合同、担保合同、投资协议
- **法律文档**:法律意见书、合规文件
- **业务文档**:业务说明、产品介绍
### 3. 文档特征
- **语言类型**:中文、英文、多语言混合
- **版式类型**:标准版式、复杂版式、双栏版式
- **文档大小**:小文档(<10MB)、大文档(>10MB)
### 4. 数据格式要求
- **文件路径**:本地文件路径或网络文件URL
- **文件编码**:UTF-8、GBK、GB2312等
- **文件权限**:需要读取权限
> 说明:本 Skill 不包含文档采集功能,需要用户提供PDF文档文件。建议文档格式规范,以便进行准确的解析。
---
## 功能
本 Skill 提供全面的PDF文档解析能力,涵盖多种解析功能:
### 1. 文本提取
- **正文提取**:提取PDF正文内容
- **标题提取**:提取各级标题
- **段落提取**:提取段落内容
- **列表提取**:提取有序列表和无序列表
### 2. 结构识别
- **章节层级**:识别PDF的章节层级结构
- **目录识别**:识别和提取PDF目录
- **书签识别**:提取PDF书签结构
- **页面结构**:识别页面的布局结构
### 3. 表格识别
- **表格提取**:识别和提取表格内容
- **表格结构**:识别表格的行列结构
- **表格格式**:保留表格的格式信息
- **表格定位**:记录表格在文档中的位置
### 4. 图表识别
- **图片提取**:提取PDF中的图片
- **图表识别**:识别图表类型和内容
- **图表定位**:记录图表在文档中的位置
- **图表描述**:生成图表的文字描述
### 5. OCR识别
- **OCR文本识别**:对扫描PDF进行OCR识别
- **OCR表格识别**:对扫描表格进行OCR识别
- **OCR图片识别**:对图片中的文字进行识别
- **多语言OCR**:支持多语言OCR识别
### 6. 格式信息提取
- **字体信息**:提取字体、字号、颜色等信息
- **段落格式**:提取段落对齐、缩进等信息
- **元数据提取**:提取PDF属性、作者、创建时间等
- **页面信息**:提取页面大小、页边距等信息
### 7. 高级处理功能
- **版式还原**:尽可能还原PDF的原始版式
- **双栏识别**:识别和处理双栏版式
- **水印处理**:识别和处理水印内容
- **结构化输出**:输出结构化的文档内容
---
## 使用示例
### 输出示例
```json
{
"document_info": {
"filename": "document.pdf",
"file_size": 2048000,
"page_count": 50,
"language": "zh-CN",
"created_date": "2024-01-15",
"modified_date": "2024-03-20",
"encrypted": false
},
"structure": {
"title": "2024年度报告",
"bookmarks": [
{
"level": 1,
"title": "第一章 公司概况",
"page": 1,
"children": [
{
"level": 2,
"title": "1.1 公司基本信息",
"page": 1
}
]
}
],
"sections": [
{
"level": 1,
"title": "第一章 公司概况",
"content": "公司概况内容...",
"page": 1,
"subsections": [
{
"level": 2,
"title": "1.1 公司基本信息",
"content": "基本信息内容...",
"page": 1
}
]
}
]
},
"tables": [
{
"table_id": 1,
"position": {
"page": 5,
"bbox": [100, 200, 500, 400]
},
"rows": 10,
"columns": 5,
"data": [
["项目", "2024年", "2023年", "2022年", "2021年"],
["营业收入", "1000", "900", "800", "700"]
]
}
],
"images": [
{
"image_id": 1,
"position": {
"page": 8,
"bbox": [150, 300, 450, 500]
},
"format": "png",
"size": [800, 600]
}
],
"metadata": {
"author": "张三",
"company": "示例公司",
"keywords": ["年报", "财务报告"]
}
}
```
---
## 注意事项与限制
### 1. 文档格式要求
- 支持标准PDF格式文档
- 复杂版式可能影响解析准确性
- 扫描PDF需要OCR功能支持
### 2. 解析准确性
- 文本型PDF文本提取准确率较高
- 表格识别对复杂表格可能有限
- OCR识别准确率受图片质量影响
### 3. 性能考虑
- 大PDF处理可能需要较长时间
- 内存占用与PDF大小成正比
- 建议对超大PDF进行分页处理
### 4. OCR限制
- OCR识别需要图片质量良好
- 手写文字识别准确率较低
- 多语言OCR需要相应语言包
### 5. 使用限制
- 本 Skill 不包含PDF编辑功能
- 解析结果需要人工复核
- 受保护PDF可能无法解析
---
## 参考资料
- 见 references/ 目录中的相关文档,包括:
- PDF解析方法手册
- OCR识别算法说明
- 表格识别使用指南
- 性能优化指南
## License
- 本 skill 代码部分采用 MIT License,详见 `LICENSE` 文件
- 依赖与运行环境以 `requirements.txt` 为准
- 文档内容采用 CC BY 4.0 许可Related Skills
word-parsing
105
from aifinlab/FinClaw
用于Word文档解析的Word解析原子 skill,适用于通用行业文档解析场景。
toc-section-parsing
105
from aifinlab/FinClaw
用于长文档章节树的目录与章节结构解析原子 skill,适用于通用行业文档解析场景。
financial-report-layout-parsing
105
from aifinlab/FinClaw
用于三表/附注拆分的财报版式解析原子 skill,适用于通用行业文档解析场景。
excel-parsing
105
from aifinlab/FinClaw
用于Excel表解析的Excel解析原子 skill,适用于通用行业文档解析场景。
contract-structure-parsing
105
from aifinlab/FinClaw
用于条款/义务/责任解析的合同结构解析原子 skill,适用于通用行业文档解析场景。
announcement-layout-parsing
105
from aifinlab/FinClaw
用于公告结构拆分的公告版式解析原子 skill,适用于通用行业文档解析场景。
trust-valuation-engine
105
from aifinlab/FinClaw
## 描述
trust-risk-manager
105
from aifinlab/FinClaw
## 描述
trust-product-analyzer
105
from aifinlab/FinClaw
## 描述
trust-income-calculator
105
from aifinlab/FinClaw
## 描述
trust-compliance-checker
105
from aifinlab/FinClaw
## 描述
trust-asset-allocation
105
from aifinlab/FinClaw
## 描述