• 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: 10.4 Print Options (Save as PDF)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.4 Print Options (Save as PDF)


  • Subject: Re: 10.4 Print Options (Save as PDF)
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 07 Sep 2006 18:10:31 -0400
  • Thread-topic: 10.4 Print Options (Save as PDF)

on 2006-09-07 2:56 PM, Kevin Dolan at email@hidden wrote:

> I am trying to get a FileMaker Pro database to print a report as a pdf by
> automating the ³PDF Services² options.  I¹ve searched Apple¹s documentation
> and other links on the web but only found how to add scripts to the PDF
> Services menu not how to automate a (print with options ³Save as PDF²)
> solution.  Has anyone found a solution to automating the (command + P)
> options?

The PDF Services options in the Print dialog are provided by the system, not
by any particular application. They are a grievous hack which completely
ignores compliance with Apple's own accessibility API. This problem
therefore exists in all applications that rely on the system Print dialog,
and Apple really should solve this problem.

To accomplish your goal, you must use GUI Scripting, and even then you must
resort to significant trickery. A couple of solutions were posted to this
list around August 16, 2005. Search this mailing list's archives.

I believe the shortest solution was from Scott Babcock:

tell application "TextEdit" to activate
tell application "System Events"
    -- open the Print sheet
    keystroke "p" using command down
     -- let the sheet draw
    delay 1
    -- set focus to the PDF button
    repeat 5 times
        keystroke tab
    end repeat
    -- open the menu
    keystroke space
    -- let the menu draw
    delay 1
    -- select Save PDF as PostScript
    key code 125
    key code 125
    keystroke space
end tell

All solutions follow this model. They are entirely dependent on how the
system Print dialog is configured -- which can change from version to
version of Mac OS X.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >10.4 Print Options (Save as PDF) (From: Kevin Dolan <email@hidden>)

  • Prev by Date: Re: GUI scripting for Illustrator: Trouble!
  • Next by Date: Re: Power Supply
  • Previous by thread: 10.4 Print Options (Save as PDF)
  • Next by thread: 10.4 Print Options (Save as PDF)
  • Index(es):
    • Date
    • Thread