2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 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 extracting-mistral-ocr- _meta.json300 B
- SKILL.md3.1 KB
Overview
This skill extracts text, tables, and images from PDFs (including scanned PDFs) using the Mistral OCR API. It produces per-page Markdown, combined documents, raw OCR JSON, and optional decoded images or separate table files. Use it to convert PDFs to searchable text, generate Markdown outputs, or produce structured JSON field extractions for downstream workflows.
How this skill works
The skill uploads a local PDF or points the OCR API at a public URL, runs Mistral OCR, and writes deterministic on-disk artifacts. Outputs include combined.md, per-page Markdown, raw_response.json, decoded images, and separate table files. It also supports document-level annotation prompts to extract structured fields as JSON.
When to use it
- You need to OCR a scanned PDF or image-based document.
- Convert a PDF to Markdown for content reuse or publishing.
- Extract tables or images from a PDF for analysis or downstream parsing.
- Produce structured field extractions (invoices, contracts, forms) as JSON.
- Prepare documents for retrieval-augmented generation (RAG) or search indexing.
Best practices
- Upload local PDFs rather than exposing private URLs; the script handles Files API uploads automatically.
- Default to inline table_format for RAG; use table_format=html when table parsing robustness matters.
- Include --include-image-base64 only when figures/diagrams are required to avoid large outputs.
- Use --extract-header/--extract-footer to remove repetitive noise that harms search relevance.
- For large PDFs, process selected pages or batch files to avoid memory/time limits.
Example use cases
- Convert a scanned contract into per-page Markdown and a combined.md for legal review.
- Extract tables from a financial report into HTML or separate CSVs for analysis.
- Run an invoice through OCR with an annotation prompt to return supplier_name, invoice_number, invoice_date, currency, and total_amount as JSON.
- Prepare a scientific paper by extracting images and figure captions for a literature database.
- OCR a private PDF by uploading it, then index the produced Markdown for semantic search.
FAQ
Local PDF uploads via the Files API and public URLs via document_url are supported. Use uploads for private or authenticated resources.
How do I get structured fields like invoice totals?
Provide an annotation prompt and set annotation_format (for example json_object). The script will return document-level annotations in the OCR response.
Why did URL OCR fail on my file?
URL OCR fails when the file is not publicly accessible or requires authentication. Upload the file instead.