Solutions · Document Intelligence · OCR

OCR that returns the page, not just the text.

Two engines, one contract: a native engine built for throughput on business documents, and vision-language OCR for tables, formulas, charts, and full page layout. Fully local.

Geometry on every element 35 language packs Runs fully local No per-page billing
35 language packs in the native engine, auto-downloaded on first use
8 VLM intents, from plain text to full layout analysis
13 semantic layout categories: title, text, table, formula, figure, captions, footers
0 cloud calls, per-page billing, or quota limits

Real pages are the hard part, not clean scans.

Production OCR fails on the pages nobody demos: photographed, rotated, mixed, noisy, and structured. Each failure below has a specific mechanism behind its fix.

  • Photographed pages arrive rotated and skewed. Orientation detection, automatic deskew, despeckle, and smart binarization run before recognition, and the measured skew is reported per page.
  • Born-digital PDFs hide raster content. Charts, labels, and figure legends rendered as images carry no text layer; embedded-image OCR recognizes them and merges the text back at its exact page coordinates.
  • OCR on photos produces word-shaped noise. Each page can be scored for the likelihood its content is genuine text, with published reject and review thresholds, so textures never poison a search index.
  • Plain text destroys structure. Tables come back as HTML, formulas as LaTeX, charts as data: layout stays first-class instead of flattening into a string.
  • Text without geometry cannot drive workflows. Every element carries its bounding box, which is what redaction, highlighting, and region extraction are built on.
  • Cloud OCR bills per page and exports the page. Both engines run on your hardware: a million pages costs the same as one, and no document leaves the perimeter.

Two engines, one contract.

Both implement the same OcrEngine base and return the same geometric result, so swapping engines is a one-line change.

Layout is output, not a side effect.

Every engine returns a geometric page tree, and the layout-analysis intent turns it semantic: regions in reading order, typed by what they are.

Geometry

Coordinates on everything

Every element carries its bounding quadrilateral; every page reports width, height, rotation, and measured skew.

Semantics

13 layout categories

Title, body text, header, footer, figure, table, formula, plus their captions and footnotes, sorted in human reading order.

Typing

Content typed by category

Tables carry HTML, formulas carry LaTeX, everything else carries Markdown, and a machine-readable JSON payload rides along.

Fidelity

Granularity follows the model

Spotting models return positioned text lines; document parsers return classified layout blocks. The engine surfaces each model's native spatial output.

Four jobs, four short programs.

Native recognition with noise screening, semantic layout analysis, scan to searchable PDF, and geometry for redaction. Pick a tab.

The native engine reads a page into positioned, reading-ordered text and can score it for text-versus-noise, so a photograph never enters your index as words.

NativeOcr.cs
using LMKit.Extraction.Ocr;
using LMKit.Media.Image;

// Native engine. Language packs auto-download on first use.
using var ocr = new LMKitOcr
{
    EnableNoiseRejection = true   // score each page for genuine text
};

using ImageBuffer image = ImageBuffer.LoadAsRGB(@"C:\scans\invoice.png");
OcrResult result = await ocr.RunAsync(new OcrParameters(image, name: "invoice.png"));

Console.WriteLine(result.PageText);   // reading-order text
Console.WriteLine($"rotation {result.PageRotation}, skew {result.PageSkew:F1}");

if (result.ContentConfidence < OcrResult.ContentConfidenceReviewThreshold)
{
    // likely a photo or texture, not a document: route to review
}

What each model family natively supports.

The engine maps every intent to the loaded model, and VlmOcr.GetSupportedIntents(model) reports this matrix at runtime.

Intent PaddleOCR-VL 1.6 Infinity-Parser2 GLM-OCR LightOnOCR-2 General VLMs
Plain text Yes Yes Yes Yes Yes
Markdown No Yes No Yes Yes
Tables (HTML) Yes Yes Yes No Yes
Formulas (LaTeX) Yes Yes Yes No Yes
Charts Yes Yes No No Yes
Text with coordinates Yes, text lines Yes, layout blocks No Via the BBox variant No
Seals & stamps Yes No No No Yes
Layout analysis No Yes, 13 categories No No No

The native LMKitOcr engine sits outside this matrix: it always returns positioned text with reading-order layout analysis, on every page, with no model to load. Intents outside a family's native set are still accepted and served best-effort.

Specialised vision OCR models.

Every model loads by ID from the model catalog, downloads on first use, and runs on hardware from laptop to server.

paddleocr-vl-1.6:0.9b

PaddleOCR-VL 1.6

Ultra-compact 0.9B reporting 96.33% on OmniDocBench v1.6, state of the art, with records on scanned, warped, and screen-photographed pages. The default for laptop-class deployments.

infinity-parser2-flash

Infinity-Parser2 Flash

2B document parser and the layout-analysis flagship: semantic regions, document VQA, chemical formulas. Reports 86.0 on olmOCR-Bench and 72.2 on ParseBench.

glm-ocr

GLM-OCR

0.9B from Z.ai specialized in document parsing and structured information extraction, across text, formula, table, and complex multilingual layouts.

lightonocr-2:1b

LightOnOCR-2

1B end-to-end document conversion to text or Markdown; the lightonocr-2-bbox:1b variant adds bounding-box detection in the same pass.

glm-4.6v-flash

GLM-V 4.6 Flash

Lightweight vision-language model with strong OCR in 32 languages: document understanding, screenshots, charts, plus native function calling.

qwen3-vl · gemma4 · qwen3.8 · muse-glimmer

General-purpose multimodal

Any vision model in the catalog runs through VlmOcr, useful when an agent already holds a VLM for chat, reasoning, or tool use.

Real workloads, real volumes.

Mailroom automation

Scan, OCR, classify, route. On-device throughput keeps the mailroom running even when the network does not.

Invoice & receipt processing

Extract vendor, line items, totals, tax. The invoice use case shows the full pipeline.

Digital archiving

Scans become searchable PDFs and indexed text; the archiving use case pairs OCR with PDF/A.

Healthcare records

Patient charts, lab reports, scanned forms. Supports HIPAA programs, since data never leaves the box.

Legal & contracts

Old scanned contracts, hand-annotated agreements, seals and stamps; seal recognition is purpose-built for this.

Scientific publishing

Multi-column papers, formulas as LaTeX, charts as data, layout analysis for section structure.

Industry-grade OCR. Zero per-page billing.

Download LM-Kit.NET Explore Document Intelligence