2.5k
GitHub Stars
9
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill pdf-ocr-tool- _meta.json461 B
- analyzer.py10.9 KB
- integrator.py6.2 KB
- ocr_tool.py7.9 KB
- processor.py5.2 KB
- prompts.py5.3 KB
- pyproject.toml1.3 KB
- README.md7.1 KB
- SKILL.md7.5 KB
Overview
This skill converts PDFs and images into structured Markdown using the Ollama GLM-OCR model. It detects page regions (text, tables, figures), applies tailored prompts per region, and outputs a combined, readable Markdown document. The tool supports page-by-page processing, mixed-region splitting, and saving extracted figure images.
How this skill works
The tool rasterizes PDF pages to images, then analyzes each page to detect content regions and classify them as text, table, or figure. For each region it selects a mode-specific prompt and runs OCR via an Ollama GLM-OCR model, assembling results back into a single Markdown file. You can run full auto-detection, force a specific mode, or split pages into vertical regions for finer-grained processing.
When to use it
- Convert research papers, reports, or articles into editable Markdown
- Extract and preserve tables from PDFs into Markdown table format
- Generate textual descriptions and thumbnails for charts and figures
- Process scanned documents or images where structure (mixed text/tables/figures) matters
- Automate archive conversion workflows where Markdown is the target format
Best practices
- Use the auto mode for general documents and switch to table/text/figure modes when results are imperfect
- Increase input image resolution for scanned PDFs to improve OCR accuracy
- Use --granularity region for complex pages with mixed content to get better segmentation
- Provide custom prompts for domain-specific formatting (e.g., math-heavy papers or financial tables)
- Ensure Ollama service is running and the specified model (e.g., glm-ocr:q8_0) is pulled before processing
Example use cases
- Batch-convert a folder of scanned conference papers to Markdown for knowledge bases
- Extract balance sheets and financial tables from annual reports into Markdown tables
- Create accessible documentation by converting image-heavy manuals into text plus figure images
- Archive historical documents by producing searchable Markdown with embedded figure snapshots
- Preprocess PDFs for downstream text analysis or static site publishing
FAQ
Try a different mode (text/table/mixed), increase image DPI, or provide a custom prompt targeted to the content.
How do I keep extracted figure images?
Enable the save-images option to export region images alongside the generated Markdown.
Can I point the tool to a remote Ollama host?
Yes. Configure host, port, and model via CLI flags or environment variables (OLLAMA_HOST, OLLAMA_PORT, OCR_MODEL).