Import PDFs ?
Brian Yennie
briany at qldlearning.com
Wed Jan 28 02:49:13 EST 2009
Tim,
Reading the PDF into a custom property is handy if you want to "carry"
it around in your stack, but you'll actually need it on disk to
display it. A couple of options:
1) (MacOS X) set the fileName of player 1 to "Users/Daddy/Desktop/HRV
feedback.pdf"
2) (MacOS X) : get shell("open 'Users/Daddy/Desktop/HRV feedback.pdf'")
If the file is in a custom property and you want to write it out, you
can use "put URL into ..." syntax and write it out to the user's temp
folder (see specialFolderPath()).
Hope that helps!
> I think I got the script right:
>
> put URL ("binfile:Users/Daddy/Desktop/HRV feedback.pdf") into xxxVar
> set the savePDF1 of this card to xxxVar
> answer the result
>
> The result is empty, anyway. And there is a customKey of the card
> called "savePDF1" I can't be sure until I know the right script to
> display the PDF.
>
> I can't figure out how to write a script to display the imported PDF.
>
> I tried to do it with a player and struck out. I tried to set the
> source to "the savePDF1 of this card." That seemed not to work.
>
> A little (more) help? I'm on a Mac. This doesn't need to work on
> other platforms.
>
> It would be better if I could display the imported PDF with Preview
> or Adobe Reader. I'm on a laptop with a smallish screen and I need
> more control over size, zoom, etc. than a player seems to offer.
>
> Retrospective and prospective thanks.
>
> Tim Miller
More information about the use-livecode
mailing list