Scripting PDF files

Ken Ray kray at sonsothunder.com
Wed Oct 29 01:40:56 EST 2003


Here's a way from our friends over at the SuperCard list (modified for
Rev use, of course)... seems to work for text files and images (watch
the line breaks):

on mouseUp
  answer file "Select a file:"
  if it <> "" then
    put it into tSrcPath
    put tPath & ".pdf" into tDestPath
    put "/System/Library/Printers/Libraries/convert" into tConvertApp
    get shell(tConvertApp && "-f" && tSrcPath && "-o" && tDestPath &&
"-j application/pdf 2>&1")
  end if
end mouseUp

If you check the results from the shell() it may have error messages in
it, but it seems to still create the PDF.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> J. Landman Gay
> Sent: Tuesday, October 28, 2003 10:45 PM
> To: Revolution Mailing List
> Subject: Scripting PDF files
> 
> 
> OS X has a "Save as PDF" option in the print dialog. Does 
> anyone know of 
> a way to automate this, so a script could save a printout as 
> a PDF? Or 
> is there any other way to create a PDF?
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the use-livecode mailing list