PDF deep linking to text selection spanning multiple pages

Use case or problem

Obsidian’s PDF deep linking feature is great. However, currently Obsidian does not allow us to copy a link to a text selection that spans multiple pages (see below).

It is very common that a range of text that we want to mention in our notes (by linking) crosses the page border, but the current feature does not allow us to do that.

Single page :white_check_mark:

Multiple pages :x:

“Copy link to selection” option is not shown when the selection spans multiple pages.

Proposed solution

Extend the current PDF link syntax [[file.pdf#page=<PAGE>&selection=<SELECTION>]] and allow it to link to cross-page selections.

In my opinion, the following would be the most natural candidate:

[[file.pdf#page=<PAGE A>-<PAGE B>&selection=<SELECTION>]]
  • <PAGE A>: the page number that the selection begins on.
  • <PAGE B>: the page number that the selection ends on.
  • <SELECTION>: four comma-separated integers that follow the same rule as the current one, except that the first two indicate the starting position of the selection within <PAGE A>, and the last two indicate the ending position within <PAGE B>.

Current workaround (optional)

None

Related feature requests (optional)

None on this forum.

In fact this FR was originally inspired by a FR that sent to my plugin PDF++.

Basically, PDF++ converts a link to PDF text selection to a highlight when the PDF file is opened. Since Obsidian does not support linking to cross-page text selections, PDF++ cannot highlight cross-page sentences (which is very common).

Once linking to cross-page text selections is implemented in the Obsidian core, PDF++ will able to support cross-page highlighting and this would be massively benefit users.

However it will also be very helpful for other users who don’t use PDF++.

5 Likes

This will elevate the usability of PDFs in Obsidian to another level.

1 Like

Please implement this obsidian team!!

I wonder if there would be a way to omit the page number on the page from the link, if they allow cross page linking?