Sorry for the confusion. It is an IOS app but I am probably just not understanding sorry.
Jamie
PDF Viewer
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: PDF Viewer
Ahh... that's what I though. Take a look at my first post in this thread. If you do a copy file like yo did. It puts the file into the engine folder of the app container. It's best to copy it to the documents folder. Then just read it from there.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
Re: PDF Viewer
Hi Tom,
OK, on iOS systems this is the same as the ENGINE folder, but for crossplatform reasons
we should get used to use specialfolderpath("resources")
Read up the definition of this folder in the dictionary.
But I see this is obviously some version of LC 8, maybe another yet undiscovered bug of that DEVELOPER preview?
Jamie, can you try this with version 7.x to be sure?
Best
Klaus
It will end up in -> specialfolderpath("resources") as I wrote a couple of times!quailcreek wrote:If you do a copy file like yo did. It puts the file into the engine folder of the app container.
OK, on iOS systems this is the same as the ENGINE folder, but for crossplatform reasons
we should get used to use specialfolderpath("resources")

Read up the definition of this folder in the dictionary.
But I see this is obviously some version of LC 8, maybe another yet undiscovered bug of that DEVELOPER preview?

Jamie, can you try this with version 7.x to be sure?
Best
Klaus
Re: PDF Viewer
Hello,
Thank you both for your help. It is very much appreciated. I have tried using version 7.1.1. However still no luck. This is the code I have on the card
And this is the code I have on the button...
Thanks
Jamie
Thank you both for your help. It is very much appreciated. I have tried using version 7.1.1. However still no luck. This is the code I have on the card
Code: Select all
global sBrowserId
on openCard
browserOpen
end openCard
on browserOpen
-- We pass the windowId of the stack to revBrowser
-- so that it can determine which window to place the
-- browser object into
put the windowid of this stack into tWinID
-- Open the browser, using the windowId and initial url
put revBrowserOpen(tWinID,"") into sBrowserId
-- Set some basic properties for the browser
revBrowserSet sBrowserId, "showborder","true"
revBrowserSet sBrowserId, "rect",rect of image "browser image"
end browserOpen
on browserClose
revBrowserClose sBrowserId
end browserClose
Code: Select all
global sBrowserId
on mouseUp
put specialfolderpath("resources") & "/TEST.pdf" into tPDFFile
browserSetURL tPDFFile
end mouseUp
the browserSetURL handler is implemented in the card script
on browserSetURL tPDFFile
## Set the url to be displayed to the given url
revBrowserSet sBrowserId, "url", ("file://" & tPDFFile)
end browserSetURL
Jamie