Embedding a pdf file which is stored outside the vault

Hello everyone,

There are two magnificent tricks that I would like to combine. Is there a way to do it ? I detailed them below:

  • Since the new 10.8 release, we can embed a pdf file directly in a note (with page number, etc…). That is fantastic and I thank all the devs and the community for it.

    In order to embed a pdf file, you just have to write [[myfile.pdf]] only if “myfile.pdf” is in your vault. It is also possible to add #page=i at the end of “myfile.pdf” such as [[myfile.pdf#page=3]] to directly render the page number 3. Impressive.

  • Another useful trick is to open a pdf file which is stored outside the vault through the current default pdf viewer of your OS. For instance, writing and clicking on the link below will open it.

    [Tang2017](file:///Users/name/Bibliography/tang2017.pdf)

I already use the latter for accessing my biliography pdf files. Indeed, I use Zotero to manage my bibliography (lots and lots of pdf) that is outside my note vault (respectively managed by Obsidian). I also used the Citation plugin which allows me to synchronize my bibliography to my notes. That gives me automatically access to all my bibliography entries and write them down as a “Citation Template” in a note with a simple shortcut.

For instance, I chose my “Citation Template” to be:

[ @{{citekey}}](file://{{entry.files.[0]}})

(without the space - I can’t remove it without triggering the link). Hence, by using the adequate shortcut of the citation plugin, this little trick allows me to write down a link that open the pdf file stored in my Zotero Bibliography directly in the note. That is already really helpful for my work.

But it could be really awesome if I could find a way to directly embed the pdf file (as the former trick from the release) without storing it manually in my vault. For example something like:

[[@ citekey_in_Zotero]](file:///path/to/the/file)

And when moving the mouse on it, it will trigger the embedded pdf file. That could also allows me to put page number, etc…

Any ideas would be greatly appreciated.

9 Likes

I would like to be able to embed remote PDFs as well. I note that the following syntax works to embed images located outside the vault:

![Remote Image](file:///Users/timj/Desktop/Image.jpg)

But the same syntax does not work for remote PDFs:

![Remote PDF](file:///Users/timj/Desktop/File.pdf)

Is this something that is on the roadmap?

Note: Feature request submitted here.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.