Four output formats
DOCX, plain text, Markdown and HTML. Page breaks are preserved as page breaks in each format.
A self-hosted Flask app that runs OCR over a PDF and gives you back DOCX, TXT, Markdown or HTML. Runs on your own machine; nothing is sent anywhere.
You upload a PDF in a browser. Poppler renders each page to an image, an OCR engine reads the image, and the recognised text is written to the format you picked. It is a single-user, self-hosted tool — there is no authentication and no rate limiting, deliberately, so it belongs on a private network or behind an authenticating proxy. The threat model says exactly what it does and does not protect you from.
git clone https://github.com/fabriziosalmi/pdf-ocr.git
cd pdf-ocr
cp .env.example .env && docker compose up --buildCompose refuses to start until SECRET_KEY is set, so the quickstart shows how to generate one first. Then open http://localhost:8011.
docker run -d -p 8011:8011 \
-e SECRET_KEY="$(python -c 'import secrets; print(secrets.token_hex(32))')" \
-v "$PWD/uploads:/app/uploads" \
--read-only --tmpfs /tmp --cap-drop ALL --security-opt no-new-privileges \
ghcr.io/fabriziosalmi/pdf-ocr:v0.5.1Those hardening flags are not decoration — see Deployment for what each one is doing and why a bare docker run gives you less than you might assume.