README file from
GithubPDF Markup
Highlight, write notes, add text and draw on the PDFs in your vault, in a viewer inspired by macOS Preview. Everything you add is saved into the PDF file itself, as standard PDF annotations, so you don't need to link your highlights to a note.
(Versión en español: README.es.md.)
Status: early release (0.1.0). Highlights, text boxes and notes were tested on real papers. Drawing and comments on highlights come from pdf.js and are less tested here. Please keep a copy of PDFs you can't afford to lose (the plugin also makes a backup, see below).
What you can do
- Highlight text in 5 colors, and change the color of an existing highlight.
- Add text boxes anywhere on a page.
- Add notes: little yellow sticky notes you click to read or edit, like the notes in macOS Preview. They are written as standard PDF "Text" annotations.
- Draw with the pen tool.
- Autosave: changes are written into the PDF about 2 seconds after you stop editing, and when you close the tab. Press
Cmd/Ctrl+Sto save immediately. - Reopen a PDF later and your highlights and notes are still there. Notes made in other PDF apps are shown, and you can edit or delete them.
How to use it
- Open a PDF in your vault.
- Run the command "Open the current PDF in the markup viewer", or right-click the PDF in the file explorer and choose Open in PDF Markup.
- Pick a tool in the toolbar: select, highlight, text, draw or note. For highlights, pick a color first.
This plugin opens PDFs in its own viewer tab; it does not replace Obsidian's built-in PDF viewer. Features of the built-in viewer that are not part of this one (for example searching inside the PDF, or the outline panel) are not available in this tab.
Where your data goes
- Annotations are written into the PDF file in your vault. The PDF changes, so other apps that read PDF annotations (Preview, Acrobat, browsers...) can show them.
- Before the first save of each session, the original file is copied to
.obsidian/plugins/pdf-markup/backups/. Backups are not deleted automatically; remove them when you no longer need them. - The plugin makes no network requests and collects nothing. PDF rendering and editing happen locally.
Limitations
- Desktop only.
- Writing sticky notes rewrites the PDF with the
pdf-liblibrary. PDFs that can't be rewritten (for example encrypted ones) will still get their highlights, text and drawings saved, and the plugin will tell you the notes could not be written. - Large PDFs may pause for a moment while saving.
- Highlights are not linked to your notes. If you want that, use a plugin that stores highlights as links.
Works well with
Mendeley Integration, which can download a reference's PDF into your vault so you can mark it up here.
Development
npm install
npm run build # type-check + production build (main.js, styles.css)
npm run lint # Obsidian community review rules
npm test # unit tests for the note-writing logic
The viewer is built on pdf.js (Apache License 2.0), bundled into main.js together with pdf-lib (MIT). Their licenses are in THIRD_PARTY_LICENSES.md.
License
MIT. See LICENSE.