• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: TIFF to PDF conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Applescript apps and Parental Control
  • Next by Date: create new field definitons in FileMaker
  • Previous by thread: Re: TIFF to PDF conversion
  • Next by thread: INDESIGN CS2: Pasting a Master Page Object or Clipboard Contents to Replace Text
  • Index(es):
    • Date
    • Thread