RyotaUshio / obsidian-pdf-plus

The most Obsidian-native PDF annotation, viewing & editing tool ever. Comes with optional Vim keybindings.
https://ryotaushio.github.io/obsidian-pdf-plus/
MIT License
712 stars 15 forks source link

[Feature] Better support for cross-page text selections #116

Open RyotaUshio opened 6 months ago

RyotaUshio commented 6 months ago

Related issues: #87, #115

It will be definitely important, but I'm not sure how cross-page selections should be handled in general.

For example, if we copy a link to text spanning from page 1 to 2, what should the copied text look like? Especially, we will need a link for each individual page (I want to avoid adding a new link syntax like [[file.pdf#page=1-2]]), like so

> [!PDF|red] [[file.pdf#page=1&selection=...|file, page 1]], [[file.pdf#page=2&selection=...|file, page 2]]
> very very very long long long text spanning multiple pages

This is okay but does not look great.

N3C2L commented 6 months ago

Apology for deleting my last posts. I was just a bit desperate that I couldn't help.

But perhaps there is another method without having to make changes to the links themselves.

It would certainly save me at least 50 clicks or more per PDF file if there could be a cross-page annotation.

A cross-page annotation alone would be sufficient, which might behave like this:

If you were to highlight the bottom few lines of page 4 and then, in one go, the top lines of page 5, only the formats available for selection in the right-click menu could be those which you might set in a separate cross-page copy link format section (or a checkbox next to the existing formats for cross-page) in the PDF++ settings:

pdf pluss

This means that when you have selected a color with a copy link format via right-click, the selected cross-page copy link format will then be applied to both page 4 and page 5.

The advantage here is that you no longer have to perform the action twice (once for page 4 + once for page 5).

So, it simply performs the same copy link format as if you were to execute a copy link format action on page 4 and page 5 separately. But both actions with a single cross-page marking and a right-click afterward.

RyotaUshio commented 6 months ago

Hi, I'm sorry for not responding for a while. I've been a bit overwhelmed by all the things happening in my life recently and didn't have enough energy to discuss this issue and reply to all the other messages that I haven't been able to do (coding is much easier than writing text messages for me). I do appreciate your help and engagement in this project very much.

I will get back to you in detail later.