Export snapshot

Monte Goulding monte at sweattechnologies.com
Tue Mar 8 00:04:11 EST 2005


>
> Actually, if you only care about OS X, this will create a PDF for you:
>
> function stsMakePDF pSrcPath,pDestPath
>  switch (the platform)
>  case "MacOS"
>    if isOSX() then
>      set the cursor to watch
>      put "/System/Library/Printers/Libraries/convert" into tConvertApp
>      get shell(tConvertApp && "-f" && q(pSrcPath) && "-o" && q(pDestPath)
> && "-j application/pdf")
>      if it = "" then
>        return "OK"
>      else
>        return "Error : " & it
>      end if
>    else
>      return "Error : stsMakePDF only works on Mac OS X."
>    end if
>    break
>  default
>    return "Error : stsMakePDF only works on Mac OS X."
>    break
>  end switch
> end stsMakePDF
>
> function isOSX
>  set the itemDel to "."
>  return (item 1 of the systemVersion >=10)
> end isOSX
>
> function q what
>  return quote & what & quote
> end q

As usual Ken always coming up with the goods!

I'm coming in late on the thread. What's the source file here? HTML? If so I 
think Chipp uses a command line HTML to PDF converter on windows which could 
fit into this function nicely ;-)

Cheers

--

Monte Goulding
Sweat Technologies

InstallGadget - How to create an installer in 10 seconds
Download now from: http://www.sweattechnologies.com/InstallGadget 



More information about the use-livecode mailing list