Mobile: External PDF Viewer

Use case or problem

In the mobile app (at least Android) one can’t open the PDF file with an external viewer. However this is necessary because the Obsidian viewer can’t zoom in.

Proposed solution

Similar to the desktop version, after a long tap on the file in the menu there should be an option for opening the file with the default app.

Alternatively, always open it with the default app or make a setting for that, see Change default behaviour to be able to open links to pdf local files in default app by left clicking (instead of with an option displayed by right clicking).

9 Likes

I’ll also note that the “share” context menu item for wiki links is not usable, since it sends a copy of the PDF to the other app, not the filesystem path. It’s pass-by-value, not pass-by-reference (as it should be). I want to be able to annotate PDFs in Xodo with my S-pen, and have the annotations get saved to the right place to be picked up by Syncthing.

1 Like

Also, iOS is probably a lost cause here, because of their draconian filesystem sandboxing. The ability to have multiple apps operate on the same set of files is care to why I abandoned by iphone experiment after a year of earnestly trying to make it work. I mean, I guess you can sort of have a limited version of that life if you put everything into iCloud, but I aint gonna.

1 Like

I can’t quite follow: Editing a PDF within a vault with a PDF Reader does work. (In my case the vault is considered local by iOS since it is synced via Obsidian Sync.)

Well, maybe I was too pessimistic. In my experience, iOS’s equivalent of Android’s intents system was all “call-by-value”-style–if you said you wanted to open a file in another app, what you really got was a copy of that file into the other app, and then you’d have to manually save it back to some place the first app could get at it again.

That is, except for images, where most apps used some official iOS API to access the photo roll.

Anyway, for Android, there’s probably just two different kinds of sharing/intent launch, and Obsidian devs used the by-value one rather than the by-reference (or by-path) one.

Or they’re using the “more privacy-friendly APIs, such as Storage Access Framework or the Media Store API.” Privacy-friendly they may be, but I don’t want handholding here. Obsidian does request scoped access to the particular vault directories I tell it to open.

Somehow you need to prompt the other app to do ACTION_OPEN_DOCUMENT instead of ACTION_GET_CONTENT, maybe. I don’t really know what I’m talking about, but the description sounds nice:

Instead of retrieving a copy of a file that you must import to your app (by using the ACTION_GET_CONTENT action), when running on Android 4.4 or higher, you can instead request to open a file that’s managed by another app by using the ACTION_OPEN_DOCUMENT action and specifying a MIME type.

I wasn’t theorizing: editing externally does work with sync on iOS - at least when using Obsidian sync. Can’t say for iCloud.

1 Like

Editing externally works for icloud. I can open PDF file on Goodreader; and the change reflects. But the main issue seems to be not just editing but also the viewer is terrible; no scroll view (only page by page), and not being able to access bookmarks.