Back to portfolio

Open-source project · Phase 1

SalExtract

Turn native or scanned PDF invoices into structured, auditable data—entirely on your own infrastructure.

Download on GitHub Source code · Setup guide · Documentation
LeoWorks / Product 02Document intelligence
SalExtractLocal invoice data extraction

About the product

What is SalExtract?

SalExtract is a deterministic invoice extraction engine designed for on-premise use. It reads embedded PDF text when available, applies OCR locally to scanned or low-text pages, normalizes the results, and stores a traceable audit record without sending document data to the internet.

  • Private by designPDF processing, OCR, and storage stay inside your environment.
  • Deterministic rulesExplicit labels and regular expressions make extraction behavior reviewable and testable.
  • Evidence-rich outputEvery field includes its raw value, normalized value, confidence, page, method, and evidence.
Platform
.NET · Windows OCR
Release stage
Phase 1
Distribution
GitHub source
Publisher
LeoWorks / Leo R. Widodo

Processing flow

From PDF to structured result

A transparent pipeline validates each file, extracts content with the appropriate local method, and retains the evidence needed for review.

  1. 01

    Validate & fingerprint

    Validate extension, PDF signature, file size, and page count, then calculate SHA-256 for traceability.

  2. 02

    Extract text locally

    Use PdfPig for embedded text and PDFium with Tesseract (Indonesian and English) for OCR fallback.

  3. 03

    Normalize fields

    Apply deterministic rules to supplier, invoice number, date, total, and currency values.

  4. 04

    Store the audit trail

    Return Completed or Review status and persist the full result as JSON in local SQLite.

Phase 1 capabilities

Built for reliable invoice intake

01

Native PDF extraction

Reads embedded text per page with PdfPig for fast, accurate processing.

02

Local OCR fallback

Processes scanned pages locally with PDFium rendering and Tesseract OCR.

03

Five normalized fields

Extracts supplier name, invoice number, invoice date, total invoice, and currency.

04

REST API

Provides versioned POST and GET endpoints for extraction workflows and integrations.

05

Auditable results

Records SHA-256, timings, warnings, source method, confidence, page, and evidence.

06

Operational safeguards

Includes PDF signature validation, upload limits, rate limiting, safe filenames, and optional API keys.

Explore SalExtract

Ready to build a private invoice extraction workflow?