This is for android.
I have a pdf file called sample.pdf saved in specialFolderPath("documents"). I want to display it in the app. I suppose I have to use the browser widget.
But, when I script:
set the url of widget "browser" to specialFolderPath("documents") & "/sample.pdf"
-or-
set the url of widget "browser" to specialFolderPath("documents") & "sample.pdf"
Either way (forward slash or not) it crashes the app. Is that how I am supposed to do it? Any other way to display it?
Thanks!
Mobile Browser Widget Crashes
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Mobile Browser Widget Crashes
a) Does your PDF display in the browser widget if you run the code in the IDE?
b) try
In the IDE this will at least test that there's nothing wrong with your path/filename or the PDF itself in relation to the widget. You could then try using "launch url" as above in the stack on Android.
Hopefully this can narrow down where the problem lies.
b) try
Code: Select all
launch url "file:" & specialFolderPath("documents") & "/sample.pdf"
Hopefully this can narrow down where the problem lies.
Re: Mobile Browser Widget Crashes
It worked! Can't thank you enough.