Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

223.5. python3-pypdfium2-5.13.0

Python bindings to PDFium — render, read and edit a PDF from Python

5.13.0-1 · Apache-2.0 OR BSD-3-Clause · 0.1 SBU · 1008.9 KiB, 110 files · 42_graphics, 149 of 189 · ports/core/python-libs/python3-pypdfium2

Homepage: https://github.com/pypdfium2-team/pypdfium2

Depends on: python3, python3-pip, python3-setuptools, python3-setuptools-scm, python3-packaging, pkgconf, pdfium.

Required by (1): ocrmypdf.

Sources: python3-pypdfium2-5.13.0.tar.gz (267.2 KiB), ctypesgen-956523ebca0a5d6dcf93aa3eea2454e295470031.tar.gz (131.5 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install python3-pypdfium2'

build.sh:

ctg="$SRC_ROOT/ctypesgen"
SETUPTOOLS_SCM_PRETEND_VERSION=0 pip3 install --no-deps --no-index \
	--no-build-isolation --prefix="$ctg" "$SRC_ROOT/ctypesgen-$_ctypesgen"
export PATH="$ctg/bin:$PATH"
export PYTHONPATH="$(python3 -c 'import sysconfig, sys; print(sysconfig.get_path("purelib", vars={"base": sys.argv[1]}))' "$ctg")"

pdfium_ver=$(pkg-config --modversion libpdfium)
pdfium_build=${pdfium_ver#*.*.}
export GIVEN_FULLVER="$pdfium_ver"
export PDFIUM_PLATFORM="system-search:${pdfium_build%%.*}"
export PDFIUM_BINARY=/usr/lib/libpdfium.so
export PDFIUM_HEADERS=/usr/include/pdfium
pip3 install --ignore-installed --no-deps --no-index --no-build-isolation --root=$PKG --prefix=/usr .

Programs: pypdfium2.

Directories: /usr/lib/python3.14/site-packages/pypdfium2, /usr/lib/python3.14/site-packages/pypdfium2-5.13.0.dist-info, /usr/lib/python3.14/site-packages/pypdfium2_cfg, /usr/lib/python3.14/site-packages/pypdfium2_cli, /usr/lib/python3.14/site-packages/pypdfium2_raw, /usr/share/licenses/python3-pypdfium2.