Install

One pip command on macOS and Linux. Rust users can install it with Cargo instead.

With pip

Terminal
pip install khmerpdf

The package is called khmerpdf on PyPI. It installs a Python library you import as khpdf and a command called khpdf. It needs Python 3.9 or newer and nothing else: ready-built wheels are published for

Windows. There is no ready-built Windows wheel yet. pip install khmerpdf still works, but it builds khpdf from source, so install Rust from rustup.rs first.

Check that it works:

Terminal
khpdf --version

With Cargo

If you have Rust 1.88 or newer, install the command line directly from GitHub:

Terminal
cargo install --git https://github.com/MoriartyPuth/khpdf

This builds one small binary with no system dependencies. To use khpdf as a Rust library, see Rust.

From source

Terminal
git clone https://github.com/MoriartyPuth/khpdf.git
cd khpdf
cargo build --release      # the binary is target/release/khpdf
cargo test

The browser demo and the Python package build from the same repository; see Browser demo and the README.