Export snapshot
Ken Ray
kray at sonsothunder.com
Mon Mar 7 23:52:28 EST 2005
On 3/7/05 5:25 PM, "Sarah Reichelt" <sarahr at genesearch.com.au> wrote:
>>>> If you are using OS X, put whatever it is on a card and try to print
>>>> the card, with a dialog box of course... you can click "Save as PDF"
>>>> from there (or "Preview" and use the Preview program to save it, if
>>>> pre-X.3).
>>>>
>>>>>> IS there a way to save as a pdf by chance?
>>>
>>> I was hoping there was a way to do it without user intervention. What
>>> I'm
>>> putting together is an app that will pick up email orders from my Miva
>>> Merchant store, generate a mailing label, pick up the actual pdf
>>> files to be
>>> printed and send that all on to my fulfillment center where they will
>>> produce and ship the item to the customer. They would like everything
>>> in pdf
>>> format.
> Could you AppleScript Preview to create the pdf?
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
HTH,
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list