• 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: print
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: print


  • Subject: Re: print
  • From: Steven Majewski <email@hidden>
  • Date: Mon, 23 Feb 2004 16:50:12 -0500

On Feb 23, 2004, at 3:51 PM, Nelson Byrne wrote:

Apologies for bothering the list with such a stupid question.

How can I use AppleScript 1.9.3 (OS X.3.2) to print a PDF file?

Finder is scriptable and shows a print command in its Standard Suite, but Finder ignores it.

Preview opens it if I ask Finder to do so, and will print it if I click the right buttons, but Preview is not scriptable.

TextEdit will accept an AppleScript order to print it, but it comes out as textual garbage since TextEdit doesn't know PDF.

I can drag and drop the file on Printer Setup Utility and it prints just fine. PSU is scriptable, too - but telling PSU to print the file does not work - nothing happens, same as telling Finder to print it.




lpr seems to know what to do with .pdf & .ps files. You could use:

do shell script "lpr " & (quoted form of posix path of theFile )

but on a hunch, I tried telling Printer Setup Utility to 'open' the file, and that
seems to cause it to print. Why telling it to print doesn't work, I have no idea.

-- Steve Majewski
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >print (From: Nelson Byrne <email@hidden>)

  • Prev by Date: on synonyms and homonyms (Re: Efficiently using whose on Address Book users)
  • Next by Date: Re: can't make document
  • Previous by thread: print
  • Next by thread: Re: print
  • Index(es):
    • Date
    • Thread