Tianchen Hao57 downloadsLive-refont PDFs as you scroll, or export safely rewritten pages in a chosen font with local processing and backups.
Change the font inside a PDF from Obsidian without retyping it.
PDF Font Rewriter redraws safely replaceable PDF text in the font you choose. It is useful for papers, handouts, exported documents, and scanned PDFs that still have a searchable text layer.
By default it writes a new PDF next to the original. You can also choose Replace current PDF if you want the same file path to be updated after a successful rewrite.
For smoother reading, the plugin also includes an experimental Live Refont View. It opens a PDF in the plugin's own PDF.js view, plans each visible page with the local helper, erases approved original text pixels using a hidden textless render, and draws replacement text as you scroll. The original PDF remains the source of truth; exporting a rewritten PDF is still a separate action.
It does not try to guess everything. If a page is image-only, rotated, too uncertain, or unsafe to redraw cleanly, the plugin leaves that part unchanged.


.ttf or .otf file.When text is changed, the plugin either writes a rewritten PDF next to the original PDF or replaces the current PDF, depending on the save option you chose. In replace mode, it first saves a restore copy outside the vault, then overwrites the same PDF path only after conversion succeeds. If the selected pages cannot be changed safely, it does not keep an unchanged output PDF.
Obsidian users do not need Python or Python dependencies. The plugin installs its packaged desktop helper automatically.
Built-in fonts include Charis SIL, XCharter, TeX Gyre Pagella, EB Garamond, Inter, Noto Sans, Open Sans, Lato, Atkinson Hyperlegible, Andika, and OpenDyslexic.
PDF Font Rewriter runs locally on your computer. It reads the selected PDF and selected font, then writes the rewritten PDF into your vault or replaces the selected PDF if you choose that mode. Technical audit reports are stored in the plugin's local app-data folder, not next to your PDF.
When Replace current PDF is used, the plugin keeps the first restore copy for that PDF outside the vault so the original file can be restored from the command palette or the rewrite dialog.
The plugin does not upload PDFs, fonts, or audit reports to any remote service.
Network use is limited to downloading or updating the desktop helper from this repository's GitHub Releases. The built-in fonts are bundled with the plugin and do not need a separate download. The helper download is selected for your OS/CPU platform and verified with SHA-256 before installation.
PDF Font Rewriter is desktop-only. It does not support Obsidian mobile.
~/Library/Application Support/pdf-font-rewriter/bin/refont-helper%APPDATA%\pdf-font-rewriter\bin\refont-helper.exe~/.local/share/pdf-font-rewriter/bin/refont-helperThe plugin writes bundled fonts on demand into:
~/Library/Application Support/pdf-font-rewriter/fonts%APPDATA%\pdf-font-rewriter\fonts~/.local/share/pdf-font-rewriter/fontsThe same engine can be run directly as a Python CLI for development and advanced local use.
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python -m refont INPUT.pdf --font /path/to/Font.ttf
python -m refont INPUT.pdf --font /path/to/Font.ttf --dry-run
python -m refont INPUT.pdf --font /path/to/Font.ttf --pages 1-10,15 --verbose
CLI outputs default to INPUT_refonted.pdf and INPUT_refonted_audit.json.
For Chinese PDFs, pass a fallback explicitly when possible:
python -m refont chinese.pdf \
--font /path/to/LatinFont.ttf \
--cjk-fallback /path/to/NotoSansCJKsc-Regular.otf
On macOS the CLI also tries common system CJK fonts if --cjk-fallback is omitted.
The Obsidian plugin is a desktop UI shell in obsidian-plugin/. It calls a packaged helper binary built from this Python engine.
Build the local helper:
uv sync --extra package
uv run python packaging/build_helper.py --clean
uv run python packaging/install_local_helper.py
Prepare helper release assets:
uv run python packaging/prepare_helper_release.py --clean
Build the Obsidian plugin:
cd obsidian-plugin
npm install
npm run build
Release artifacts are separated:
obsidian-plugin/main.js, obsidian-plugin/manifest.json, obsidian-plugin/styles.cssrelease/helper/helper-manifest.json, release/helper/refont-helper-<platform>GitHub tag releases are handled by .github/workflows/release.yml. A release tag builds:
refont-helper-macos-arm64refont-helper-macos-x64refont-helper-windows-x64.exerefont-helper-linux-x64helper-manifest.jsonmain.js, manifest.json, and styles.cssApache-2.0. See LICENSE.
Bundled fonts are open-license fonts. Source and license details are in obsidian-plugin/fonts/README.md and obsidian-plugin/fonts/licenses/.