Displaying PDF - Help! Urgent!!
got at mindspring.com
Tue Sep 13 13:17:55 EDT 2005
Chris it's best to let the particular operating system decide the
best way to open a PDF doc (as well as other types of docs as well).
> Hello folks -
> I'm doing a quick 'n' dirty menu front-end for a CD and need to be
> able to display a multi-page PDF document. On Mac I'll just open
> it with "Preview" - but I need to know what is equivalent on PC.
> (I am a Windows dunce...)
> I have to do this tonight!! Gulp!
Here is a snippet of code for Mac OS X and Windows (95 through XP).
You may need to tweak it a bit but it will give you the idea - I
don't have any versions of Windows older than XP handy to check it on:
Bonjour IM with Gordon Tillman <gordy at gordy15>.
answer file "Select a PDF document"
put it into tPdfFile
if tPdfFile is empty then exit mouseUp
if the platform is "MacOS" and char 1 to 2 of the systemVersion is
else if the platform is "Win32" then
get the shortFilePath of tPdfFile
replace "/" with "\" in it
if the systemVersion contains "Windows 4" then
else if the systemVersion contains "NT" then
on openMac pPdfDoc
get shell("/usr/bin/open '" & pPdfDoc & "'" )
on openWin4 pPdfDoc
-- cmd /c
get shell("cmd /c" && pPdfDoc )
on openWin5 pPdfDoc
put shell("start" && pPdfDoc )
More information about the Use-livecode