Re:Printing to PDF from Safari
Re:Printing to PDF from Safari
- Subject: Re:Printing to PDF from Safari
- From: johnnylundy <email@hidden>
- Date: Wed, 9 Aug 2006 07:24:03 -0400
I did this recently and could only do it with GUI scripting, as the
"PDF" button seems to be nonstandard.
"Enable access for Assistive Devices" must be checked in Universal
Access.
The document opens in Preview.
You could put a "delay 1" before the last "activate" line if your
script is stopping in Preview.
activate application "Safari"
tell application "System Events"
tell process "Safari"
keystroke "p" using command down
repeat until exists sheet 1 of window 1
end repeat
click button 4 of UI element 4 of sheet 1 of window 1
end tell
end tell
activate application "Safari"
Regards,
Johnny
On Aug 8, 2006, at 3:16 PM, email@hidden
wrote:
Can someone explain to me how to script Safari to create a PDF from
the print dialog
I.e. I have the page opened in Safari, and I want to save the page as
a PDF using a script
as if I had entered command-P and clicked the PDF button and entered
a file name in the
save as PDF dialog.
Jim Brandt
_______________________________________________
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