Automator print to pdf safari




















Improve this answer. Whacko Whacko 1 1 bronze badge. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 5. Hot Network Questions. Question feed. It is a virtual printer for OS X which does what the "Save As PDF" method does when print through your normal printer except every print job passed through it results in a pdf output.

Once you install it then you could create shell or AppleScripts using the lp command. For example, once the virtual printer is setup you could print test. To do this using an AppleScript you would use the following code:. I am not sure if you can change that path but you could retrieve the file in your script and move it. First, the lp command cannot print.

I think there are some other third party apps which will allow you to do this though. Even if you don't find it very useful to build a script via the lp command and still want to involve GUI scripting then having a virtual printer should save you some steps.

I typed up the code below with the assistance of Automator recording an action, and then dragging the specific action out of the "Watch Me Do" window in order to get the Applescript.

If you want to print a PDF from an application other than Safari, you might have to run through the same process and tweak this Applescript around the Print dialogue, since each program might have a different Print GUI.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 13 years, 2 months ago. Active 4 years, 9 months ago. Viewed 9k times. Here's the options I've explored so far: Automator actions. Simply add the appropriate run script action to your workflow and enter your script code or shell commands.

How to use AppleScript scripts. You can easily import Automator workflows into Shortcuts.



0コメント

  • 1000 / 1000