Feature Request: Add Chapter Heading Detection in PDF Annotation Export


:memo: Feature Request: Add Chapter Heading Detection in PDF Annotation Export

Context
Currently, when DEVONthink exports PDF highlights (via Tools → Annotations → Export), the output includes only the page number and highlighted text, optionally with a note.
However, when reading structured documents such as books, research papers, or reports, highlights often lose their context once exported — it’s hard to know which chapter or section a highlight came from.

Request
Please consider adding an option to automatically include the chapter or section title (heading) for each highlight when exporting PDF annotations.


:white_check_mark: Example

Current output:

P.56  The market is not a neutral force.
Note: Important argument about capital logic.

Suggested output:

## Chapter 2: The Logic of Capital
P.56  The market is not a neutral force.
Note: Important argument about capital logic.


:brain: Possible Implementation Ideas

  1. Use PDF Outline / Bookmarks

    • Many PDFs include a structured outline (table of contents).

    • The app could match each annotation’s page number to the nearest outline item and use its title as the “chapter” label.

  2. Fallback to Text Detection (optional)

    • If the PDF has no outline, detect likely headings by font size, “Chapter/Section” patterns, or bold text on that page.

    • This could be a “Smart Heading Detection” toggle in export settings.

  3. Output Format

    • Add a simple setting:

      [✓] Include chapter/section titles from outline

    • Works for Markdown, RTF, or plain text export.


:light_bulb: Benefits

  • Provides context for each highlight, making exported summaries far more meaningful.

  • Improves integration with note-taking tools like Obsidian, DEVONthink notes, Notion, etc.

  • Ideal for researchers, students, and readers who annotate long structured documents.


:puzzle_piece: Technical Feasibility

Since DEVONthink already reads PDF metadata and annotations, this feature could use:

  • PDFDocument.outlineRoot (via PDFKit API) to get the outline tree.

  • Match annotation.pageIndex to the corresponding outline destination.

  • Insert the nearest chapter title above each group of highlights.

This would be a small but high-impact improvement for structured reading workflows.

Thanks for the suggestion, noted.

However, we prefer human generated requests as this a user forum. Especially as AI output is unnecessarily bloated and rarely useful and just needs reading time.

Thank you for your understanding.

5 Likes

Aside from the AI request, I can see this being useful. Related: I know it’s been brought up for years and was curious whether any additional thought has been giving to directly bookmarking PDFs in DT. That would be awesome, as I’d like to just make DT my PDF annotater. It’s got everything else I need. I just recently canceled my PDF Expert sub bc 1) too many subscriptions and 2) I don’t want to subscribe to a PDF reader. Their AI tools are trash so I don’t find it worthwhile to pay for the app for that purpose. Thanks for considering!

1 Like

:thinking:

Context menu

Data menu

Well color me stupid :joy:. Thanks @BLUEFROG !

No worries! :slight_smile:

Yeah, really don’t know how I missed that in the updates!

Sometimes it feels like there’s as much to miss as there is to notice :smiley:

I find it very useful to first select the titel of the chapter or section in the pdf and then use Add To > Table of Contents. That way the selection is automatically added to the TOC and I don’t have to rename the entry.

1 Like

Yes, that actually brings me to a question: I was messing with this for a few minutes yesterday and was wondering whether there is a keyboard shortcut to jump to the TOC inspector to change the name of the entry. I tried tab and variations thereof but didn’t find anything that worked. This would be super convenient.

Is it Tools > Inspectors that you are looking for?

(Shift-)Ctrl-Tab can be used to switch between item list, preview pane, inspectors and optionally sidebar if keyboard navigation is enabled. The Table of Contents inspector supports arrow keys for navigating and pressing Return/Enter starts renaming (in case of PDF documents only)

2 Likes

This is great! After disabling some global shortcuts I can now use the shortcuts in Tools > Inspectors and the Ctrl-Tab switching to do the naming from the keyboard only. Ok, the selection of text in the pdf still need to be done with the touchpad. I added a shortcut to Data → Add To → Table of Contents also using CustomShortcuts – Customize menu keyboard shortcuts .

One question, is it possible to rearrange the items in the Table of Contents via the keyboard?

1 Like

Only via drag & drop.

1 Like

Can one make it more obvious for the eye whether the focus is set to Sidebar, View, Preview, or Inspector? I get lost trying to use CTRL-Tab switching :sweat_smile:

There are also keyboard shortcuts for moving focus directly to interface elements. See Go > Move Focus to Inspector. Since there is usually no visual indication beyond the color of a selection changing, you might prefer that.

1 Like

Thanks! It would be great if the background color would change I think. But maybe that is undesirable for some reason also.

Nice. Did not know–or forgot–about that one. Thanks.

My Go > Move Focus to Sidebar option is grayed out. Anyone have an idea why? I’ve checked all the major apps I use and can’t locate this shortcut anywhere. Frustrating that Apple doesn’t have a way to see assigned shortcuts across the system.

Because you have Settings > General > Interface > Keyboard Navigation disabled.

1 Like