Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as LaTeX, figures, seals, charts,...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install paddleocr-doc-parsing或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install paddleocr-doc-parsing⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/paddleocr-doc-parsing/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: paddleocr-doc-parsing description: >- Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as LaTeX, figures, seals, charts, headers/footers, multi-column layout and correct reading order. Trigger terms: 文档解析, 版面分析, 版面还原, 表格提取, 公式识别, 多栏排版, 扫描件结构化, 发票, 财报, 复杂 PDF, PDF转Markdown, 图表, 阅读顺序; reading order, formula, LaTeX, layout parsing, structure extraction, PP-StructureV3, PaddleOCR-VL. metadata: openclaw: requires: env: - PADDLEOCR_DOC_PARSING_API_URL - PADDLEOCR_ACCESS_TOKEN bins: - python primaryEnv: PADDLEOCR_ACCESS_TOKEN emoji: "📄" homepage: https://github.com/PaddlePaddle/PaddleOCR/tree/main/skills/paddleocr-doc-parsing ---
Trigger keywords (routing): Bilingual trigger terms (Chinese and English) are listed in the YAML description above—use that field for discovery and routing.
Use this skill for:
Do not use for:
Install Python dependencies before using this skill. From the skill directory (skills/paddleocr-doc-parsing):
pip install -r requirements.txt
Optional — for image optimization and PDF page extraction:
pip install -r requirements-optimize.txt
> Working directory: All python scripts/... commands below should be run from this skill's root directory (the directory containing this SKILL.md file).
- User provides URL: Use the --file-url parameter - User provides local file path: Use the --file-path parameter
Input type note: - Supported file types depend on the model and endpoint configuration. - Always follow the file type constraints documented by your endpoint API.
```bash python scripts/vl_caller.py --file-url "URL provided by user" --pretty ```
Or for local files:
```bash python scripts/vl_caller.py --file-path "file path" --pretty ```
Optional: explicitly set file type:
```bash python scripts/vl_caller.py --file-url "URL provided by user" --file-type 0 --pretty ```
- --file-type 0: PDF - --file-type 1: image - If omitted, the type is auto-detected from the file extension. For local files, a recognized extension (.pdf, .png, .jpg, .jpeg, .bmp, .tiff, .tif, .webp) is required; otherwise pass --file-type explicitly. For URLs with unrecognized extensions, the service attempts inference.
> Performance note: Parsing time scales with document complexity. Single-page images typically complete in 1-5 seconds; large PDFs (50+ pages) may take several minutes. Allow adequate time before assuming a timeout.
Default behavior: save raw JSON to a temp file: - If --output is omitted, the script saves automatically under the system temp directory - Default path pattern: - If --output is provided, it overrides the default temp-file destination - If --stdout is provided, JSON is printed to stdout and no file is saved - In save mode, the script prints the absolute saved path on stderr: Result saved to: /absolute/path/... - In default/custom save mode, read and parse the saved JSON file before responding - Use --stdout only when you explicitly want to skip file persistence
- Check the ok field: true means success, false means error - The output contains complete document data: text, tables, formulas (LaTeX), figures, seals, headers/footers, and reading order - Use the appropriate field based on what the user needs: - text — full document text across all pages - result.result.layoutParsingResults[n].markdown.text — page-level markdown - result.result.layoutParsingResults[n].prunedResult — structured layout data with positions and confidence - Handle errors: If ok is false, display error.message
- Display content based on what the user requested (see "Complete Output Display" below) - If the content is empty, the document may contain no extractable text - In save mode, always tell the user the saved file path and that full raw JSON is available there
Common next steps once you have the structured output:
text field to a .md file — tables, headings, and formulas are preservedresult.result.layoutParsingResults[n].prunedResult to access individual layout elements with position and confidence datatext field is structured markdown, ready for chunking and indexingDisplay the COMPLETE extracted content based on what the user asked for. The parsed output is only useful if the user receives all of it — truncation silently drops data.
text fieldExample - Correct:
User: "Extract all the text from this document"
Agent: I've parsed the complete document. Here's all the extracted text:
[Display entire text field or concatenated regions in reading order]
Document Statistics:
- Total regions: 25
- Text blocks: 15
- Tables: 3
- Formulas: 2
Quality: Excellent (confidence: 0.92)
Example - Incorrect:
User: "Extract all the text"
Agent: "I found a document with multiple sections. Here's the beginning:
'Introduction...' (content truncated for brevity)"
The script returns an envelope with ok, text, result, and error. Use text for the full document content; navigate result.result.layoutParsingResults[n] for per-page structured data.
For the complete schema and field-level details, see references/output_schema.md.
> Raw result location (default): the temp-file path printed by the script on stderr
Example 1: Extract Full Document Text
python scripts/vl_caller.py \
--file-url "https://example.com/paper.pdf" \
--pretty
Then use:
text for quick full-text outputresult.result.layoutParsingResults[n].markdown when page-level output is neededExample 2: Extract Structured Page Data
python scripts/vl_caller.py \
--file-path "./financial_report.pdf" \
--pretty
Then use:
result.result.layoutParsingResults[n].prunedResult for structured parsing data (layout/content/confidence)Example 3: Print JSON to stdout (without saving to file)
python scripts/vl_caller.py \
--file-url "URL" \
--stdout \
--pretty
By default the script writes JSON to a temp file and prints the path to stderr. Add --stdout to print the full JSON directly to stdout instead. Use this when you need to inspect the result inline or pipe it to another tool.
When API is not configured, the script outputs:
...
安装 PaddleOCR Document Parsing 后,可以对 AI 说这些话来触发它
Help me get started with PaddleOCR Document Parsing
Explains what PaddleOCR Document Parsing does, walks through the setup, and runs a quick demo based on your current project
Use PaddleOCR Document Parsing to use this skill to extract structured Markdown/JSON from PDFs and do...
Invokes PaddleOCR Document Parsing with the right parameters and returns the result directly in the conversation
What can I do with PaddleOCR Document Parsing in my design & creative workflow?
Lists the top use cases for PaddleOCR Document Parsing, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/paddleocr-doc-parsing/ 目录(个人级,所有项目可用),或 .claude/skills/paddleocr-doc-parsing/(项目级)。重启 AI 客户端后,用 /paddleocr-doc-parsing 主动调用,或让 AI 根据上下文自动发现并使用。
PaddleOCR Document Parsing 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
PaddleOCR Document Parsing 可免费安装使用。请查阅仓库了解许可证信息。
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as LaTeX, figures, seals, charts,...
PaddleOCR Document Parsing 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using PaddleOCR Document Parsing
Identifies repetitive steps in your workflow and sets up PaddleOCR Document Parsing to handle them automatically