Install¶
KurdPDF needs Python 3.14 or newer. Every dependency (PyMuPDF, uharfbuzz, zimankit, python-docx, rich, Pillow) installs from wheels; there is nothing to compile.
With uv (recommended)¶
uv installs Python 3.14 for you if it is missing.
curl -LsSf https://astral.sh/uv/install.sh | sh # once; Windows: see the uv docs
uv tool install kurdpdf # the kurdpdf command, in its own environment
kurdpdf --version
uv tool upgrade kurdpdf # later, for a new release
Run it once without installing: uvx kurdpdf book.pdf.
As a library in your own project¶
uv init my-kurdish-tool && cd my-kurdish-tool # new project with pyproject.toml
uv add kurdpdf # or: uv add 'kurdpdf[lexicon]' for Parquet word lists
uv run python -c "from kurdpdf import KurdPDF; print(KurdPDF('book.pdf').extract().pages[0].best_text()[:200])"
In a plain virtual environment¶
uv venv --python 3.14 # creates .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install kurdpdf
With pipx or pip¶
With Docker¶
docker run --rm -p 127.0.0.1:8765:8765 -v kurdpdf-data:/data ghcr.io/kanilabs/kurdpdf # web page
docker run --rm -v "$PWD:/work" ghcr.io/kanilabs/kurdpdf book.pdf --format txt,docx # command line
Tesseract is included; see Playground for the word list, atlas and OCR model.
From source¶
git clone https://github.com/kanilabs/kurdpdf.git && cd kurdpdf
uv sync # creates .venv with the locked versions and the dev tools
uv run kurdpdf --help
uv run pytest # tests
Fonts for the exported files¶
DOCX, ODT, RTF, HTML, LaTeX and EPUB name Sahel for Kurdish text and Manrope for Latin
text (--font NAME changes the Kurdish one). Install them so Word, LibreOffice and LaTeX show the
text as intended; otherwise the application substitutes another font. Both are free (SIL Open
Font License): Sahel from github.com/rastikerdar/sahel-font, Manrope from Google Fonts. On Linux,
copy the .ttf files to ~/.local/share/fonts and run fc-cache -f. The web page uses the same
fonts when they are installed and lets you pick others.
AI coding agents¶
kurdpdf skill install copies the ckb-pdf-to-text skill into ~/.claude/skills (Claude Code)
and ~/.agents/skills (Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and other agents), so
they know how to diagnose and convert Kurdish PDFs in every project. See AI agents.
After installing¶
KurdPDF ships no fonts, no glyph atlas, no word list and no OCR model. Each one is optional and improves a different case:
| What | Needed for | Set up with |
|---|---|---|
| Glyph atlas | PDFs whose text layer is wrong (C2, and checking C1) | kurdpdf atlas build --font DIR with Unicode Kurdish fonts you have the right to use |
| Word list | look-alike letters (ک/ك, ی/ي, ە/ه) | kurdpdf lexicon import FILE |
Tesseract and a ckb model |
scanned pages, opaque fonts | see ocr.md |
Legacy fonts (Ali-K, Ali-A, Zanest, the Halabja family) need none of these: their tables ship with the package.
User data goes in the platform's data folder (~/.local/share/kurdpdf on Linux,
~/Library/Application Support/kurdpdf on macOS, %LOCALAPPDATA%\kurdpdf on Windows):
atlas.json.gz, lexicon-ckb.tsv.gz and tessdata/. The environment variables
KURDPDF_ATLAS, KURDPDF_LEXICON and KURDPDF_TESSDATA point elsewhere.
Settings can go in a config file; see kurdpdf manual, section "Config file".
License note¶
KurdPDF is GPL-3.0-or-later. PyMuPDF is AGPL-3.0: if you run KurdPDF as a network service, you must also meet the AGPL terms for PyMuPDF.