Scripting PDF files

Ken Ray kray at
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
Web Site: 

> -----Original Message-----
> From: use-revolution-bounces at 
> [mailto:use-revolution-bounces at] 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
> HyperActive Software           |
> _______________________________________________
> use-revolution mailing list
> use-revolution at 
>> revolution

More information about the Use-livecode mailing list