Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
sritcp wrote: Mon Jan 20, 2020 4:04 pmThe file opens with no problems!
And do you see the 4 buttons:
- (Zoom out)
+ "(Zoom in)
Open in Preview
Download
at the bottom of the PDF in SAFARI?
If yes, then Acrobat does not hook into your "webview".
Hi Klaus:
When move the cursor to the bottom of the screen in Safari (with pdf file open),
the image with 4 options pops up (see attached). So, it is not Acrobat.
I had mentioned in an earlier post that when I opened https://www.adobe.com/support/products/ ... xplain.pdf
in Safari, copied the URL and pasted it in the URL field of the browser widget, and changed from edit to run mode, LC crashed.
Does that happen to you, or are you able to load an pdf from the web without any problem?
I had a related issue yesterday. SpecialFolderPath preceeds the URL with a slash, so if you use "file://" in the URL you get three slashes at the front. This worked fine on Mac, Android, and in the iOS simulator (which uses Mac file paths) but failed on a real iPhone. To fix it I needed to use "file:" with no slashes. I'm loading an html file from disk into the browser widget but the general idea should be the same.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
I have tried the following:
1. "/Users/JohnDoe/MyData/A101.pdf"
2. "file:///Users/JohnDoe/MyData/A101.pdf"
3. "file:/Users/JohnDoe/MyData/A101.pdf"
4. Running each of the above through URLencode()
5. Running each through replace " " with "%20"
In all cases, LC9.5.1 on MacOS10.14.6 crashes.
* The problem pertains only to pdf files.
Setting the URL to an html page on the web, or setting the htmlText of widget "Browser" to a local html file works.
* The problem pertains only LC9.5.1
LC8.1 loads these same pdf files with no problem
* The problem pertains to my Mac, not Klaus's
This is annoying! This means there is something on my computer that is messing with pdf file loading. Acrobat Reader is not my default pdf loader; No Adobe program is running. I have Adobe Creative Cloud installed on my computer. May be there are some Adobe CC files running in the background which are causing this problem
Is there any way of debugging what actually happens between when the URL is set and LC crashes out?
sritcp wrote: Mon Jan 20, 2020 8:46 pm
I have tried the following:
1. "/Users/JohnDoe/MyData/A101.pdf"
2. "file:///Users/JohnDoe/MyData/A101.pdf"
3. "file:/Users/JohnDoe/MyData/A101.pdf"
4. Running each of the above through URLencode()
5. Running each through replace " " with "%20"
If you open the PDF in your browser, what URL does it show?
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Most likely it is Acrobat Reader which is being loaded by the (system) WebView used by LC - Safari does (and always has) done its own thing (i.e. WebViews you get in apps is not Safari - not necessarily even the same system 'WebKit' framework underneath!).
sritcp wrote: Mon Jan 20, 2020 9:32 pm
I did; it opened the Internet Plug-Ins window; no Adobe items. In fact, the only entry is "Dish Anywhere Player.plugin"!
By the way the terminal command only shows the plug-ins in the user library.
So, I did not see these Adobe plug-ins the first time.
I used the Finder to go to System Library/ internet plugins folder and there they were!
(I do wonder whether this problem will occur if a user of the app has these plugins installed on their computer? If so, that would put a serious crimp on using the browser widget in standalone apps)
Thanks everyone for your help! This one ran me around for a while!
By the way the terminal command only shows the plug-ins in the user library.
Correct, the terminal command Mark asked you to run opened the folder in the user library,
while the command i asked you to run should have opened the folder in the system library folder.
(I do wonder whether this problem will occur if a user of the app has these plugins installed on their computer? If so, that would put a serious crimp on using the browser widget in standalone apps)
Unfortunately this is currently the case, but as Mark mentioned there is already a report for it in the Quality Center which is already confirmed. https://quality.livecode.com/show_bug.cgi?id=22534
I´ve added the information about the .plugins to it.
You could add your e-mail adress there to get informed about the progress.