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

Re: printing PDF files


  • Subject: Re: printing PDF files
  • From: email@hidden
  • Date: Tue, 10 Nov 2009 08:11:08 -0800

Just to clarify:

keystroke "p" using command down

Would replace the line:

click button "Print" of window "Print"

And with some Adobe products there are options to

  set the user interaction level  to never interact

and to

 print document 1 without print dialog

Something similar may be in the dictionary for the version of Acrobat you're using. I'd try both.

HTH,

ES


On Nov 10, 2009, at 7:36am, email@hidden wrote:

David,

I'm kind of surprised you need GUI scripting to print a PDF, what version of Acrobat are you using?

I've found that it can be more reliable to use GUI keyboard commands rather than mouse click, so something like

keystroke "p" using command down

Also, I've noticed that Adobe doesn't always follow the same conventions as other developers in their dialogs, which make them less reliable for GUI scripting.

Using PreFab's UI Browser is a big help.

prefabsoftware.com/uibrowser/

HTH,

ES



On Nov 10, 2009, at 6:39am, David DuBois wrote:

I am trying to write a folder action that will print any pdf that is dropped into it. It basically works except that I cannot get it past the print dialog, even with a systems event to press the print key. If I use the system event by itself with an open print dialog, it will press the print key, but when I include it in a larger script, it stops working.

What I have is basically:

on adding folder items to this_folder after receiving added_items
  tell application "Finder"
      try
          repeat with this_item in added_items
              set PDFname to the name of file this_item
              tell application "Adobe Acrobat Professional"
                  activate
                  open PDFname
                  print PDFname without shrink to fit
                  tell application "System Events"
                      tell process "Acrobat"
                          click button "Print" of window "Print"
                      end tell
                  end tell
                  close document PDFname saving no
              end tell
          end repeat
      end try

  end tell
end adding folder items to

Any suggestions?
_______________________________________________
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

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ 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
References: 
 >printing PDF files (From: David DuBois <email@hidden>)
 >Re: printing PDF files (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: printing PDF files
  • Next by Date: Month Names
  • Previous by thread: Re: printing PDF files
  • Next by thread: Re: printing PDF files
  • Index(es):
    • Date
    • Thread