obsidian-advanced-uri icon indicating copy to clipboard operation
obsidian-advanced-uri copied to clipboard

PDF navigation support

Open tristone13th opened this issue 2 years ago • 5 comments

Really appreciate this work, now Obsidian v1.3.7 supports copy selection in PDF as a link, Does obsidian-advanced-uri have any plan to support visiting a PDF selection block by a single URI? Thanks!

tristone13th avatar Aug 01 '23 05:08 tristone13th

What exactly should the advanced uri do, what the normal Obsidian one can't?

Vinzent03 avatar Aug 01 '23 06:08 Vinzent03

For example, when we select some texts in the PDF and right-click on it, it will pop up for a "Copy link to selection", if we click that and then paste it, we will get the following text:

[[Types_and_Programming_Language.pdf#page=397&selection=8,0,16,68]]

But it means nothing on the Web, it is meaningful only in Obsidian.

So how about supporting open this selection by visiting the following URI:

obsidian://advanced-uri?vault=_posts&openmode=true&filepath=Types_and_Programming_Language.pdf&page=397&selection=8,0,16,68

so I can click it on the web and open the PDF locally, that's really convenient for me.

tristone13th avatar Aug 01 '23 06:08 tristone13th

That's actually already possible, by using the text from the internal link and properly encoding the #,&,= symbols and using the filepath parameter. Though that's not very handy, so adding the parameters as well could make things easier. On the other side, I don't think you are going to write them manually, so only adding a copy to advanced uri button could be enough. What do you think?

Vinzent03 avatar Aug 05 '23 21:08 Vinzent03

On the other side, I don't think you are going to write them manually, so only adding a copy to advanced uri button could be enough. What do you think?

I think the requested feature is very useful, and this solution is enough.

wenlzhang avatar Aug 29 '23 07:08 wenlzhang

I second. Maybe adding a button when selecting range of text in obsidian which can export the selection as a URI link.

tristone13th avatar Jul 22 '24 07:07 tristone13th