Skip to content
Edit this page

Playground

In your browser

Open the playground

The playground is the web page of kurdpdf web itself: the same page editor (reorder, rotate, duplicate, merge pages from several PDFs, blank pages), the same converter with page images beside the text, fix checking, fonts and every export (PDF, a PDF per page, PNG or JPG pages, and the text as TXT, Markdown, DOCX, ODT, RTF, HTML, LaTeX, EPUB or JSON). KurdPDF runs inside the page (Python compiled to WebAssembly with Pyodide, PyMuPDF and HarfBuzz), so the PDF never leaves your computer: nothing is uploaded. The first visit downloads the engine, about 30 MB; the browser keeps it for later visits.

It reads what the installed KurdPDF reads (Unicode fonts, broken maps, presentation forms, legacy fonts such as Ali-K, Ali-A, Zanest and the Halabja family) with two differences:

  • No OCR. Tesseract does not run in a browser, so scanned pages come out empty. Use the local web page below or the command line for those.
  • No glyph atlas or word list. PDFs whose fonts need the atlas (class C2) read worse than in an install with them.

The playground is rebuilt from the current main branch, page and all, so it always matches kurdpdf web.

The local web page

The same page served by KurdPDF on your computer adds OCR, your glyph atlas and word list, and fonts installed on the computer. Start it in one of three ways.

With Docker

docker run --rm -p 127.0.0.1:8765:8765 -v kurdpdf-data:/data ghcr.io/kanilabs/kurdpdf

Open the address the container prints (http://127.0.0.1:8765/?token=…). The token is kept in the kurdpdf-data volume, so the address stays the same next time and can be bookmarked or installed as an app. The warning listening on 0.0.0.0 is about the inside of the container; -p 127.0.0.1:8765:8765 keeps it reachable from your computer only.

Or with Docker Compose, from a clone of the repository:

docker compose up -d
docker compose logs kurdpdf        # the address with its token

The same image is the whole command line. Mount the folder with your PDFs at /work:

docker run --rm -v "$PWD:/work" ghcr.io/kanilabs/kurdpdf book.pdf --format txt,docx
docker run --rm -v "$PWD:/work" ghcr.io/kanilabs/kurdpdf inspect book.pdf

Tags: latest and 0.1.0-style versions for releases, edge for the current main. Images are built for linux/amd64 and linux/arm64.

Word list, atlas and OCR in the container

Everything optional lives in the /data volume, as in the user data folder of a normal install:

What Where in /data How
Word list kurdpdf/lexicon-ckb.tsv.gz docker run --rm -v kurdpdf-data:/data -v "$PWD:/work" ghcr.io/kanilabs/kurdpdf lexicon import FILE
Glyph atlas kurdpdf/atlas.json.gz … ghcr.io/kanilabs/kurdpdf atlas build --font /work/fonts
Central Kurdish OCR model kurdpdf/tessdata/ckb*.traineddata see below

To put a model you have into the volume:

docker run --rm -v kurdpdf-data:/data -v "$PWD:/work" --entrypoint sh ghcr.io/kanilabs/kurdpdf \
  -c 'mkdir -p /data/kurdpdf/tessdata && cp /work/ckb.traineddata /data/kurdpdf/tessdata/'

Tesseract is installed with the Arabic and Persian models. No Central Kurdish model is included (there is no official one); without one, scanned pages are read with the Arabic model and the letters ڕ ڵ ۆ ێ ە come out wrong. See OCR.

With uv, no install

uvx kurdpdf web

This downloads KurdPDF into a cache, starts the page and opens it in your browser.

Installed

After uv tool install kurdpdf (see Install):

kurdpdf web                 # opens the page in your browser
kurdpdf web --keep-token    # the same address every time