Re: PDF Viewer
Posted: Tue Feb 16, 2016 12:15 am
Sorry for the confusion. It is an IOS app but I am probably just not understanding sorry.
Jamie
Jamie
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
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.
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