Re: TIFF to PDF conversion
Re: TIFF to PDF conversion
- Subject: Re: TIFF to PDF conversion
- From: John Cochrane <email@hidden>
- Date: Mon, 11 Jun 2007 23:07:38 +1000
Hi Nuke,
Here is a handler which is based on a script I got from this list.
It works for TIFF, JPEG, PICT, GIF and I think RTF as well.
on convertToPDF(thePOSIXFilePath)
try
set terminalCommand to ""
set convertCommand to "/System/Library/Printers/Libraries/./convert "
if text item -4 of thePOSIXFilePath is "." then
set newFileName to (text items 1 thru -5 of thePOSIXFilePath &
".pdf") as string
else
set newFileName to thePOSIXFilePath & ".pdf"
end if
set terminalCommand to convertCommand & "-f " & "\"" &
thePOSIXFilePath & "\"" & " -o " & "\"" & newFileName & "\"" & " -j
\"application/pdf\"" & " ; rm " & quoted form of thePOSIXFilePath
do shell script terminalCommand
tell application "Finder" to update file (POSIX file newFileName)
end try
end convertToPDF
John Cochrane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden