Ukrainian scanned PDFs to Markdown for RAG and LLMs
Most document-to-text tools are tuned for English. A scanned Ukrainian invoice or court decision often comes back as Latin look-alike gibberish, or with its tables lost. This guide shows a pipeline that keeps Cyrillic text, headings and tables, and shows exactly what it does and does not do - every output below is from a real run on 6 November 2026. Update, 7 November 2026. The first run showed…
A Python script is presented that converts scanned PDFs and other documents into Markdown format, preserving tables, headings, and text in Cyrillic. The script uses the Document to Markdown for AI tool, which has been updated to correctly handle table formatting and OCR language settings for Ukrainian text. The tool supports a wide range of input formats, including PDF, scanned PDF, PNG/JPG/TIFF, DOCX/DOC, XLSX/XLS, PPTX/PPT, ODT/ODS/ODP, RTF, and HTML.
The converted Markdown output is organized with one record per document, tables presented as rows of cells, and optional chunks with their nearest headings. The script allows for specifying the OCR mode and languages, with a focus on using only the languages present in the scanned document to improve OCR accuracy. The pricing for the tool is based on a pay-per-event model, with charges for both text and OCR pages.
The quality of the OCR is dependent on the quality of the input scan, with clean 300 dpi scans producing better results. The script can be run locally or through the Apify MCP server for use with AI agents such as Claude and Cursor.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.