--- title: litert-ocr emoji: 📄 sdk: static app_file: index.html pinned: false license: apache-2.0 short_description: Photo, scan or PDF to text, Markdown and JSON, in-browser models: - litert-community/PP-OCRv6-Small-LiteRT custom_headers: cross-origin-embedder-policy: require-corp cross-origin-opener-policy: same-origin cross-origin-resource-policy: cross-origin --- # litert-ocr: photo, scan or PDF → text, Markdown and JSON Choose a photo, a scan or a PDF (or drop one, or paste a screenshot), and [litert-ocr](https://github.com/john-rocky/litert-ocr) reads it in this browser tab: every text line with its box, a PDF's page with a frame around each block, Markdown with headings and tables, and JSON. It runs PP-OCRv6 Small ([litert-community/PP-OCRv6-Small-LiteRT](https://huggingface.co/litert-community/PP-OCRv6-Small-LiteRT)) on LiteRT.js. Your files are not uploaded. The page downloads the library, its LiteRT.js runtime and pdf.js from jsDelivr and the model files from Hugging Face, once, and the browser keeps them. The same page without the Space's frame: https://mlboydaisuke-litert-ocr.static.hf.space/. Inside the frame, Chrome on a Galaxy S26 read more slowly. - This page's code: [demo/](https://github.com/john-rocky/litert-ocr/tree/main/demo) in john-rocky/litert-ocr (the same page is on [GitHub Pages](https://john-rocky.github.io/litert-ocr/)) - The library: `npm install litert-ocr`, [README](https://github.com/john-rocky/litert-ocr) - The examples: [examples/SOURCES.md](examples/SOURCES.md)