How to extract tables from screenshots offline: OCR or a vision model?
Use local OCR to copy words and numbers from a clear screenshot. If the cells must stay under the right headers, use a tool that reconstructs table layout. Use a vision model for a specific question about the image, but check any value you plan to reuse against the original.
Choose by what you want to get back
If the original app can export a CSV, use that instead of recovering data from pixels. If you only have a screenshot, keep the original and work on a crop that includes the headers, all rows you need and any footnotes or totals. For a single label or a paragraph, start with OCR, which turns visible writing into text. For a spreadsheet, start with table recognition; for a question about what a label points to, try a vision model.
For a few lines of text, start with Tesseract
With Tesseract and its English language data installed, tesseract receipt.png - -l eng tsv reads the local image and prints tab-separated results in the terminal. The TSV includes recognized text, bounding boxes and line and word indices. That’s useful for finding where a value came from, but these are OCR records, not the rows and columns of the receipt. Use the language data that matches the screenshot, and review the crop if text from neighboring columns runs together.
For cells and headers, keep a table-shaped result
PaddleOCR’s 3.6.0 documentation for PP-StructureV3 describes a table recognition pipeline that accepts a local image and can return table_res_list. A detected table’s pred_html represents its rows and cells in HTML, and cell_box_list helps locate the cells on the image. Use those positions to check which column a number belongs to. For offline use, prepare the packages and model files beforehand for every enabled component. The documentation lists local model directory options; leaving them unset can trigger a model download. A local image path alone doesn’t mean a first run is ready offline.
For a specific visual question, use a local vision model
A vision model can address a question that depends on layout, such as whether 27.00 is printed next to Subtotal or Total. For example, Ollama lists granite3.2-vision:2b, a document-vision model whose publisher documents English instructions and image input. Use an installed local model and a file on your computer, not a cloud endpoint or a public image URL. Ask for the exact printed label and say to mark it unreadable rather than guess. If you request JSON, valid syntax only tells you the shape is right, not that the label was read correctly.
Check the receipt line by line before pasting it
Fictional example: A-07 has quantity 2, unit price 7.50 and line total 15.00; B-12 has quantity 1, unit price 12.00 and line total 12.00. Compare row count, headers, each code and each number with the screenshot. Check that quantity × unit price equals each line total, then compare the sum of 27.00 with the printed total if there are no taxes or other adjustments. An unchanged total doesn’t catch a wrong item code or a dropped leading zero. Keep identifiers as text in the spreadsheet, and mark illegible values for review instead of letting the tool fill them in. Before using private material, verify this workflow offline with a non-sensitive sample.
Sources
- tesseract-ocr.github.io · DocumentationPublisher · tesseract-ocr.github.io↗
- tesseract-ocr.github.io · DocumentationPublisher · tesseract-ocr.github.io↗
- www.paddleocr.ai · DocumentationPublisher · www.paddleocr.ai↗
- Ollama · DocumentationPublisher · docs.ollama.com↗
- Ollama · DocumentationPublisher · ollama.com↗
- Hugging Face · DocumentationPublisher · huggingface.co↗
- Ollama · DocumentationPublisher · docs.ollama.com↗