Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option for displaying pdfs in different locations #7

Open
nift-d opened this issue Aug 6, 2021 · 5 comments
Open

option for displaying pdfs in different locations #7

nift-d opened this issue Aug 6, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@nift-d
Copy link

nift-d commented Aug 6, 2021

it would be nice to link pdfs that are not inside the vault but somewhere else on the filesystem. when I try to do that I get an error showing the url where the plugin tried to find the file and it shows the location of my attachments plus the url I told it to look up.
it would be great if I cloud flag the url as "external" or something like that...

@MSzturc MSzturc added the enhancement New feature or request label Mar 25, 2022
@MSzturc
Copy link
Owner

MSzturc commented Mar 25, 2022

I will have a look on this after i've decided how i implement mobile support. Specially on iOS it's not that easy to access files outside your vault

@kenandotfyi
Copy link

+1 for this. That would be really a killer function because Obsidian and other type of Cloud syncing do not work together very well. My use case was to store all my edited PDFs on my Google Drive and since they are always in sync with my Mac, I link them inside Obsidian for access. Therefore whenever I open a note I always have the actual version of that PDF with annotations, drawings etc. embedded into the note.

The problem here Is just the way the plugin takes the link path. Or default API that Obsidian provides is doing that probably. It is directly adding it to the end of a ghost path which is the vault itself. Normally with "file://" we can link documents from outside the vault. I'm not sure how much of an effort it is to implement but obviously there is a limitation for iOS here. Might not even possible due to security reasons anyway. But that would be really cool to have 🤤.

Thanks a lot for your efforts by the way.

@WizzardMaker
Copy link

+1

This feature would be awesome! It would really improve the workflow with all my external pdfs

@ShootingKing-AM
Copy link

ShootingKing-AM commented Nov 23, 2022

++1
Its okay if its only shows the file if available. Can show a small warning if the file is not available on mobile platforms for now.
My idea was, to have extra "url" like options, "ext_desktop_url" (optional "ext_ios_url", "ext_android_url") This plugin would be awesome with this feature.

@ShootingKing-AM
Copy link

Since the dev is not responding quick enough for me, made a hacky way for using pdfs at the other location taking clue from the code,

parameters.url = folderPath + "/" + parameters.url.substring(2, parameters.url.length);

workaround (hacky), for now, can be something like this

pdf
{
	"url": "../../../../Users/Dropbox/meow Dropbox/PYQ/meow.pdf"
}

instead of

pdf
{
	"url": "D:/Users/Dropbox/meow Dropbox/PYQ/meow.pdf"
}

On windows, at least the vault and the external pdf must be on the same drive for .. based directory traversing.

Maybe you can make a workaround of mobile devices by creating two such pdf links. (Don't know how user friendly your mobile OS is)

Eg.
Will open on desktop; error on mobile

pdf
{
	"url": "../../../../Users/Dropbox/meow Dropbox/PYQ/meow.pdf"
}

will open on mobile error on desktop

pdf
{
	"url": "../<mobile dropbox path>/meow.pdf"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants