Replies: 1 comment
-
|
Have you tried Opening a file in another app directly (without any user interaction) isn't possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using reportLab to create a pdf-File. I am saving that pdf-File in the same directory as the script is running in.
After creating and saving the pdf-file I would really like to immediately open it in the ios-default-app, e.g. Preview, so I can easily share it with people nearby, e.g. Via airdrop with students in my class..
I tried webbrowser. Just opens it in the pythonista built-in preview, from which I can't share it.
I tried ui.Webview. Doesn't open it with the option to share it.
Then I stumbled over obc_util. Now that iis my approach:
The fp (filepath) is has correctly been encoded with
The final fp in the above function, right before I try to open it, results in something like:
Just: nothing happens, no error, no crash, no nothing... it just won't open in the ios-Preview.
I also changed it to file://private/... ( just to, not three slashes), but that made no difference.
What am I missing?
If i switch to the Files-App, navigate to the directory and open the file there, it neatly opens in the preview-App exactly as I want it to.
It is my learning goal now, to learn how to open files with native ios-apps from within pythonista. Is that possible at all?
Beta Was this translation helpful? Give feedback.
All reactions