Search

PythonReactSEOPDF
OpenClaw

Pdf Ocr Layout

GLM OCR Multimodal Deep Analysis

baokui0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install baokui/pdf-ocr-layout

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

GLM-OCR Multimodal Deep Analysis

This tool builds a high-precision document parsing pipeline: using GLM-OCR for layout element extraction, calling GLM-4.7 for logical interpretation of table data, and calling GLM-4.6V for multimodal visual interpretation of images and charts.

Pipeline Implementation Architecture

This Skill consists of two core script stages, orchestrated through glm_ocr_pipeline.py:

1. Extraction Stage (scripts/glm_ocr_extract.py)
  • Core Model: GLM-OCR
  • Function: Responsible for physical layout analysis of documents
  • Output: Extract table HTML and clean to Markdown, automatically crop independent chart image files based on Bbox coordinates, and generate intermediate JSON containing full page reading order
2. Understanding Stage (scripts/glm_understanding.py)
  • Core Model: GLM-4.7 (text) / GLM-4.6V (visual)
  • Function: Responsible for deep semantic reasoning of content
  • Logic:
    • Tables: Combine full text context, use GLM-4.7 to analyze business meaning of Markdown table data
    • Charts: Combine full text context + cropped images, use GLM-4.6V for multimodal visual analysis

Invocation Methods

Command Line Invocation
# Run complete pipeline: extraction -> cropping -> understanding analysis, supports input in .pdf, .jpg, .png and other formats
python scripts/glm_ocr_pipeline.py \
  --file_path "/data/report_page.jpg" \
  --output_dir "/data/output"

API Parameter Description

Parameter Type Required Description
file_path string ✅ Absolute path to input file (supports .pdf, .png, .jpg)
output_dir string ✅ Result output directory (used to save cropped images and JSON reports)

Return Result Structure (JSON)

The tool returns a list containing layout elements and their deep understanding:

[
  {
    "type": "table",
    "bbox": [100, 200, 500, 600],
    "content_info": "| Revenue | Q1 |\n|-...

Source information

Source
github
Repository
openclaw/skills
Path
skills/baokui/pdf-ocr-layout
Version
—
Commit
be0a5a9a63f12fcc33fc20238d237551bbe0136d
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# GLM-OCR Multimodal Deep Analysis

This tool builds a high-precision document parsing pipeline: using **GLM-OCR** for layout element extraction, calling **GLM-4.7** for logical interpretation of table data, and calling **GLM-4.6V** for multimodal visual interpretation of images and charts.

## Pipeline Implementation Architecture

This Skill consists of two core script stages, orchestrated through `glm_ocr_pipeline.py`:

### 1. Extraction Stage (`scripts/glm_ocr_extract.py`)

- **Core Model**: GLM-OCR
- **Function**: Responsible for physical layout analysis of documents
- **Output**: Extract table HTML and clean to Markdown, automatically crop independent chart image files based on Bbox coordinates, and generate intermediate JSON containing full page reading order

### 2. Understanding Stage (`scripts/glm_understanding.py`)

- **Core Model**: GLM-4.7 (text) / GLM-4.6V (visual)
- **Function**: Responsible for deep semantic reasoning of content
- **Logic**:
  - **Tables**: Combine full text context, use GLM-4.7 to analyze business meaning of Markdown table data
  - **Charts**: Combine full text context + cropped images, use GLM-4.6V for multimodal visual analysis

## Invocation Methods

### Command Line Invocation

```bash
# Run complete pipeline: extraction -> cropping -> understanding analysis, supports input in .pdf, .jpg, .png and other formats
python scripts/glm_ocr_pipeline.py \
  --file_path "/data/report_page.jpg" \
  --output_dir "/data/output"
```

## API Parameter Description

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| file_path | string | ✅ | Absolute path to input file (supports .pdf, .png, .jpg) |
| output_dir | string | ✅ | Result output directory (used to save cropped images and JSON reports) |

## Return Result Structure (JSON)

The tool returns a list containing layout elements and their deep understanding:

```json
[
  {
    "type": "table",
    "bbox": [100, 200, 500, 600],
    "content_info": "| Revenue | Q1 |\n|-...

Related skills

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance