Embed remote PDFs

Use case or problem

As a user with an extensive PDF library managed on my filesystem with 3rd-party tools (e.g., Zotero, DevonTHINK, etc.) outside of my Obsidian vaults, I would like to be able to embed the PDFs in Obsidian notes from their location on the filesystem.

Proposed solution

Enable the same syntax for PDFs that allows remote embedding of images, namely:

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

Current workaround (optional)

No known workaround.

Related feature requests (optional)

No known feature requests, though it is mentioned in this post.

Thanks!

16 Likes

Is this not more of a bug? As your post rightfully states, embedding an image from outside the vault works fine, while for some reason it does not work with pdfs.

PDFs don’t natively display like images. Although I can understand the reasoning behind calling this a bug, the code complexity of displaying a PDF makes this a completely new feature (from the software angle).

I understand, however, in-vault pdfs work right? So the whole embedding code, however complex, does work, just the link to a file outside the vault doesn’t

So in-vault PDFs display embedded?

Yes, they do (seems like it is using the internal chromium engine)

Even in Markdown preview?

What do you mean? If you mean the normal preview mode, then yes. And as far as I know, no plugin that I am using affects this.
Have you tried putting a pdf in your vauilt and embedding it? I am using 0.12.3 with the newest electron.

It looks like Obsidian’s parser treats anything file:// or remote (https://) as an img node automatically, while it does some filtering of files inside the vault (probably by extension, since renaming the .pdf to a .not file broke the embed preview). Detection by MIME type is possible, but a lot trickier. It sounds like they just need to add the same extension filtering to externally included files, which is less work than I was originally thinking (thank you for clarifying some of my confusion!).

1 Like

i think even batter than that would be a feature that treats zotero links as local pdfs in vault. It is so necessary

2 Likes