MCPcopy Index your code
hub / github.com/akaalias/obsidian-extract-pdf-highlights

github.com/akaalias/obsidian-extract-pdf-highlights @0.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.4 ↗ · + Follow
31 symbols 46 edges 6 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Extract your PDF text-highlights into Obsidian

This plugin allows you to extract highlighted and underlined text from your PDFs into a markdown file in your Obsidian vault.

How it works

After you've installed and activated the plugin:

  1. Drop your highlighted PDF into your Obsidian vault
  2. Open the PDF in Obsidian
  3. Click the "PDF" icon in the left sidebar

Demo with default settings

Simple

Demo with all optional settings turned on

Settings

Optional settings

  • Include page number (Default: off)
  • Include highlight color (Default: off)
  • Create links (Default: off)

Backlog

The list of features and improvements for this plugin.

ICEBOX

  • [ ] Refactor pdfjs import to not overload Obsidian worker (Ideas from @lishid?)
  • [ ] Record demo video, quick-start walk-through for new users

TODO

  • [ ] Auto-create notes from links with highlight/annotation as quote with backlink to source PDF
  • [ ] Group highlights by highlight color (Optional)
  • [ ] Add progress bar/modal to show "Processed Page 5/10 (50%)" or similar for longer PDFs
  • [ ] Fix missing space after newline (Very complex)

DOING

...

DONE

  • [x] Show highlight color (Optional)
  • [x] Auto-link list items (Optional)
  • [x] Refactor/extract PDF from main.ts
  • [x] Add Page-number to each highlight (Optional)
  • [x] Sort highlights by position in document and page (Mandatory)
  • [x] Extract unsorted list of HIGHLIGHT annotations
  • [x] Extract unsorted list of TEXT annotations
  • [x] Extract unsorted list of UNDERLINE annotations
  • [x] Decide if to integrate with existing Highlights Plugin

Contribute

I'd love to hear from you, so please check out the Contribution page to get in touch!

Major Thanks

This plugin stands on the shoulders of Joseph Devietti and his 2012 pull-request for PDFJS.

Core symbols most depended-on inside this repo

processPDFHighlights
called by 1
src/main.ts
generateFinalMarkdown
called by 1
src/main.ts
saveHighlightsToFile
called by 1
src/main.ts
appendHighlightsToFile
called by 1
src/main.ts
loadSettings
called by 1
src/main.ts
getColorTagForAnnotation
called by 1
src/main.ts
fetchRawAnnotationsFromPDF
called by 1
src/PDFAnnotationsManager.ts
flattenAnnotationsByPosition
called by 1
src/PDFAnnotationsManager.ts

Shape

Method 21
Class 10

Languages

TypeScript100%

Modules by API surface

src/main.ts15 symbols
src/PDFAnnotationsManager.ts9 symbols
src/ExtractPDFHighlightsPluginSettingsTab.ts4 symbols
src/ExtractPDFHighlightsPluginSettings.ts3 symbols

For agents

$ claude mcp add obsidian-extract-pdf-highlights \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page