Pdf text extract

From cas-bigdatalab/piflow · View interactive version

Pdf text extract is an AI agent skill from the GitHub repository cas-bigdatalab/piflow. 从PDF文件中提取文本内容,保存为txt文件。当用户需要从PDF中提取文字时使用此skill。

How to use this skill

Skill file

pdf_text_extract 技能

功能说明

该技能从PDF文件中提取文本内容,保存为txt文件,适用于需要从PDF中提取可编辑文本的场景。

核心功能

使用方法

python scripts/run_pdf_text_extract.py --input_path <输入PDF> --output_path <输出TXT> [--pages <页码范围>]

参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 |

| :--- | :--- | :--- | :--- | :--- |

| input_path | string | 是 | - | 输入PDF文件路径 |

| output_path | string | 是 | - | 输出txt文件路径 |

| pages | string | 否 | 全部 | 页码范围,如"1-3,5" |

示例

示例1:提取全部页面文本

python scripts/run_pdf_text_extract.py --input_path document.pdf --output_path text.txt

示例2:提取指定页码文本

python scripts/run_pdf_text_extract.py --input_path document.pdf --output_path text.txt --pages "1-10"

输出格式

--- Page 1 ---
这是第一页的文本内容...

--- Page 2 ---
这是第二页的文本内容...

注意事项

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.