Import PDFs ?

SparkOut SparkOutYNY at gmail.com
Wed Jan 28 07:34:14 EST 2009



Timothy Miller-2 wrote:
> 
> On Jan 27, 2009, at 3:53 PM, SparkOut wrote:
> 
> 
>> You can import the PDF files to your stack by:
>> put URL ("binfile:<the-path/name-of-your-file.pdf>") into
>> <thePDFStorageProperty>
> 
>>
>> On a Mac you should be able to display the pdf in a player, but on  
>> Windows
>> even with QT enabled it won't render a pdf document. A workaround is  
>> to
>> write out the file to a temporary location:
>> put <thePDFStorageProperty> into URL("binfile:<temporarypath/ 
>> name.pdf>")
>> and launch it, or use a revBrowser object to display within Rev.
> 
> 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
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 
If you're looking to use the external Adobe Reader then yes, writing out the
file to a temp location and launching it would be the answer.

Try:

put the savePDF1 of this card into URL ("binfile:" &
specialFolderPath("Temporary") & "/tmpFileName.pdf")
launch document specialFolderPath("Temporary") & "/tmpFileName.pdf"

That works fine on my Windows system.

The only thing I would be uncertain of in your import is to know what the
Mac path for the home directory needs to be (whether it needs a slash
between "binfile:" and "Users/...") but you will be familiar enough with the
paths I guess.
You could test: if there is a file "Users/Daddy/Desktop/HRV feedback.pdf"
then... go ahead and read it in. 

HTH (blatantly stealing Jan's signoff!)
-- 
View this message in context: http://www.nabble.com/Import-PDFs---tp21696797p21704859.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the Use-livecode mailing list