Displaying PDF - Help! Urgent!!
chris at carroll-davis.co.uk
Wed Sep 14 04:04:01 EDT 2005
Thanks for the help on this.
Gordon - your code seems to work beautifully! And Ken's point about
the web link is also satisfied because if there is no app to display
the PDF, Windows brings up a prompt to d/l software anyway.
Thanks again - a real life-saver!!
On 13 Sep 2005, at 18:17, Gordon Tillman wrote:
> 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>.
> on mouseUp
> local tPdfFile
> 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
> "10" then
> openMac tPdfFile
> else if the platform is "Win32" then
> get the shortFilePath of tPdfFile
> replace "/" with "\" in it
> if the systemVersion contains "Windows 4" then
> openWin4 it
> else if the systemVersion contains "NT" then
> openWin5 it
> end if
> end if
> end mouseUp
> on openMac pPdfDoc
> -- /usr/bin/open
> get shell("/usr/bin/open '" & pPdfDoc & "'" )
> end openMac
> on openWin4 pPdfDoc
> -- cmd /c
> get shell("cmd /c" && pPdfDoc )
> end openWin4
> on openWin5 pPdfDoc
> -- start
> put shell("start" && pPdfDoc )
> end openWin5
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode