PDF Toolkit
unlistedby duck-lint
Run the pdf-toolkit CLI from Obsidian and track runs via manifests.
PDF Toolkit (Obsidian Plugin)
Desktop-only Obsidian wrapper around the pdf-toolkit CLI.
This plugin is intentionally thin: Obsidian provides a small UI (option modals + job panel), while the CLI remains the contract for all real work (outputs + manifest.json).
Why this exists
I built the CLI to keep PDF prep local-first (no subscriptions, no uploading documents to random tools).
This plugin exists to make that same CLI workflow usable inside Obsidian with minimal friction, while keeping the CLI as the stable contract.
Design choices:
- CLI-first contract (the CLI is the source of truth; the plugin just calls it)
- Outputs stay in-vault under a per-run folder
- Audit trail via CLI-written
manifest.jsonper run - Lean run history stored via Obsidian plugin data (kept small + bounded)
- Outputs stay in-vault under
<run-id>/+ manifest per run
What it does
- Runs
pdf-toolkitas a subprocess (Obsidian Desktop / Electron only). - Writes outputs inside the vault under:
pdf-toolkit_Output/<run-id>/(configurable) - Reads the CLI-written
manifest.jsonas the authoritative record of what happened. - Shows a Jobs panel with recent runs, status, and stdout/stderr tails.
Commands (Command Palette)
- Render active PDF to images...
- Rotate active PDF pages...
- Split active PDF into parts...
- Split spreads + crop images in folder...
- Open Jobs panel
Typical scan/OCR prep flow
- Open the PDF in Obsidian
- Run Render active PDF to images...
- Run Split spreads + crop images in folder... and select the rendered image folder
- Outputs are written to
pdf-toolkit_Output/<run-id>/with amanifest.jsonper run
Requirements
- Obsidian Desktop (this plugin spawns subprocesses; mobile is not supported)
- A working
pdf-toolkitinstallation (eitherpdf-toolkit.exeorpython -m pdf-toolkit)
Install (manual / dev)
This repo is set up for local development (not packaged for the community store).
- Build:
npm i
npm run build
- Copy these files into your vault:
main.jsmanifest.jsonstyles.css(optional)
Target folder:
<your-vault>/.obsidian/plugins/pdf-toolkit/
- Restart Obsidian (or reload plugins) and enable PDF Toolkit.
Configuration (Obsidian Settings → Community Plugins → PDF Toolkit)
CLI command
Prefer an explicit per-vault path (no PATH assumptions).
Option A: installed entrypoint (Windows example)
CLI command:C:\path\to\venv\Scripts\pdf-toolkit.exeCLI args prefix: (blank)
Option B: module invocation
CLI command:C:\path\to\venv\Scripts\python.exeCLI args prefix:-m pdf-toolkit
Output root folder (vault-relative)
Default: pdf-toolkit_Output
All runs go to:
<outputRoot>/<run-id>/
Default verbosity
Maps to CLI flags:
- quiet →
--quiet - normal → (no flag)
- verbose →
--verbose
Reveal output folder after success
If enabled, the plugin opens the run output folder in your OS file explorer.
Run artifacts
Each run produces:
- A run folder:
pdf-toolkit_Output/<run-id>/... - A CLI-written
manifest.jsoninside that folder - A job entry stored via Obsidian plugin data (recent runs only; kept bounded)
The job record includes:
- command args
- status + exit code
- input path (when relevant)
- output folder + manifest path
- last chunk of stdout/stderr (useful for debugging without scrolling a terminal)
Troubleshooting
-
“Set the CLI command path…” You haven’t configured
CLI commandyet (Settings → PDF Toolkit). -
Command runs in terminal but not in Obsidian Use an explicit
CLI commandpath (don’t rely on PATH). If usingpython -m pdf-toolkit, make sure the Python you point at haspdf-toolkitinstalled. -
Nothing happens / no output Open the Jobs panel → check stderr tail + exit code. Also try setting verbosity to verbose to surface more CLI logging.
Development notes
-
The plugin uses small “option modals” for the handful of knobs needed in practice.
-
The CLI remains the contract to keep behavior consistent across:
- direct terminal usage
- scripts/automation
- Obsidian UI calls
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.