Skip to main content

kakemono for Python

Convert PDF papers and books (a local file or an arXiv id) into clean, readable HTML, Word documents, Markdown, LaTeX or EPUB books, from Python. The conversion is done by the kakemono Rust library, bundled in the wheel: no poppler, mupdf or other system dependency.

pip install kakemono
import kakemono

html = kakemono.convert("paper.pdf")                       # friendly mode, one self-contained page
html = kakemono.convert("1706.03762", mode="medium")       # an arXiv id or URL works too
pages = kakemono.convert_all("paper.pdf")                  # {"hard": ..., "hard-95": ..., "medium": ..., "friendly": ...}
kakemono.to_docx("paper.pdf", "paper.docx")               # a Word document (also returns its bytes)
text = kakemono.to_markdown("paper.pdf", "paper.md")       # Markdown, pictures in paper_assets/
tex = kakemono.to_latex("paper.pdf", "paper.tex")          # LaTeX, pictures in paper_assets/
book = kakemono.to_epub("paper.pdf", "paper.epub")         # an EPUB book (also returns its bytes)
doc = kakemono.analyze(open("paper.pdf", "rb").read())     # the structure: blocks in reading order
Mode What you get
hard Each page redrawn as SVG/PNG, with a hidden selectable text layer
hard-95 The same pages, with visible HTML text placed as in the PDF
medium Pages and columns kept, text reflowed
friendly One responsive column with themes, contents, a phone layout and a book view

Options of convert and convert_all: tables, equations ("mathml" or "image"), page_image ("svg", "svg-only", "png"), embed_fonts, scale and jobs. They match the command-line options described in the main README.

to_docx takes tables, equations, scale and jobs. Formulas whose structure is clear become Word equations (editable in Word), the others pictures; rebuilt tables become Word tables. With save_images=True the pictures are also written as files to image_dir (default <name>_assets, next to the document).

to_markdown takes the same options, plus image_dir (default <name>_assets, next to the file) and inline_images. Formulas whose structure is clear become LaTeX between $$, tables pipe tables. Without a path, or with inline_images=True, the pictures are embedded as data URIs.

to_latex takes tables, equations, scale, jobs and image_dir, and returns a LaTeX document that compiles with pdfLaTeX, XeLaTeX or LuaLaTeX: sections, tabular tables, LaTeX math. LaTeX cannot embed pictures, so they are written to image_dir next to the file; without a path, only the source is returned.

to_epub takes tables, equations, scale and jobs, plus max_math_width_em (displayed formulas wider than this, in multiples of the text size, become pictures; default 20), cover (the first page as the cover, on by default) and modified (the date recorded in the book, YYYY-MM-DDThh:mm:ssZ; by default, now). It returns an EPUB 3 book with one chapter per top-level section, a table of contents, MathML formulas and the pictures inside.

The GIL is released during a conversion, so several PDFs can be converted in parallel threads.

MIT license.

Metadata

Release files for kakemono 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kakemono 0.9.0
File Size Uploaded Provenance Actions
kakemono-0.9.0.tar.gz 1.9 MB With provenance Details for kakemono-0.9.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for kakemono 0.9.0
File Actions
kakemono-0.9.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for kakemono-0.9.0-cp39-abi3-win_amd64.whl
kakemono-0.9.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for kakemono-0.9.0-cp39-abi3-manylinux_2_28_aarch64.whl
kakemono-0.9.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for kakemono-0.9.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
kakemono-0.9.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for kakemono-0.9.0-cp39-abi3-macosx_11_0_arm64.whl
kakemono-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for kakemono-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 42.2 MB

Release files / kakemono-0.9.0.tar.gz

Download URL kakemono-0.9.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
76af32502adac1bcba9fb3b6ec7166b500880bb302c8bc4d1c85a20795ff8db9
BLAKE2b-256 checksum
How to use checksums
25fa66336444aa3c95156ff8982ca1dcb6f33b1f310c8d5d9541d370d486fad5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / kakemono-0.9.0-cp39-abi3-win_amd64.whl

Download URL kakemono-0.9.0-cp39-abi3-win_amd64.whl
Size 7.7 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0e33ca5c168592d2cc8e769c498b47509ec2986e4b7949ce2de1813ccf1d5d83
BLAKE2b-256 checksum
How to use checksums
91705ccca121c84dce9230cf4c7d074ce2b130441862237f5ad5863b6dc36c4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / kakemono-0.9.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL kakemono-0.9.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 8.4 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
005a3f30c04a52191862c0aedbf21de928201c27a6663c7fcc80440826713c5d
BLAKE2b-256 checksum
How to use checksums
f457301b96b02a1805d4f86f70a4e273e4cf65979fcae9827af3c9e7d51cab7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / kakemono-0.9.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL kakemono-0.9.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 8.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
fd56179891fe718c218c16110878f60c87c5a245afb297319d3b5f638a29ca81
BLAKE2b-256 checksum
How to use checksums
1757233015bbf95dd82bbc7c852eaeb693063d25237b333796f07e6f7fd46921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / kakemono-0.9.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL kakemono-0.9.0-cp39-abi3-macosx_11_0_arm64.whl
Size 7.5 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
093618c55fdfa4ab6815cd1d7e0612582cd6eb8f41f64a4ea6b99b5eb0713733
BLAKE2b-256 checksum
How to use checksums
20ca9aed390e2975bed64879bf57937039077fda0fb7ee0222b3fec7947bb8f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / kakemono-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL kakemono-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 8.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
cb84fca4164cc9c40f5e1d386b44407b9fa8f56d331396dca0a699e33cff9bf3
BLAKE2b-256 checksum
How to use checksums
6afd445797beb764dc1150e44abd63b07b5cc5f93ece70335e5e56babf77932f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for kakemono 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for kakemono-0.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page