rodyager / RWTS-PDFwriter

An OSX print to pdf-file printer driver
GNU General Public License v2.0
838 stars 79 forks source link

Automator Folder Action #51

Open andesco opened 2 weeks ago

andesco commented 2 weeks ago

I have found a great solutions to this:

The files are saved in /var/spool/pdfwriter/. Unfortunately, the security restrictions imposed by macOS on printer drivers mean that it is not possible to change this location. RWTS-PDFwriter wiki

By using Automator to create a Folder Action, you can monitor your <username> folder for new files and automatically move them to a different folder.

  1. Open Automator and create a new Folder Action

  2. Choose folder: Other… Hit shift-command-period (⇧⌘ . ) to view hidden files and folders. Select your username folder: /var/spool/pdfwriter/username\ \ Folder Action receives files and folders added to: 📁 username

  3. Add the Move Finder Items action to the workflow.

  4. Set the destination to your preferred folder: \ \ Move Finder Items To: 📁 Documents

  5. Save the Folder Action.

The Folder Action will look like this example:

Folder Action in Automator
andesco commented 2 weeks ago

(This is not a true Issue but perhaps the “issue” is that this helpful tip is not documented in the readme or wiki.)

rodyager commented 2 weeks ago

Not quite sure how this is superior to the solution that the printer driver offers of creating an alias to /var/spool/pdfwriter/ in the location of your choice with a nice PDF folder icon by simply clicking on the appropriate button in the Printer Driver utility or during the installation process. [Well, you currently only get the nice icon if you do this step after you print your first document using the Printer Driver, but I am planning to fix that soon.]

The reason I haven’t gone your path is because I can’t offer your solution programatically.

Rod

On 11 Nov 2024, at 7:21 am, Andrew E. @.***> wrote:

I have found a great solutions to this:

The files are saved in /var/spool/pdfwriter/. Unfortunately, the security restrictions imposed by macOS on printer drivers mean that it is not possible to change this location. RWTS-PDFwriter wikihttps://github.com/rodyager/RWTS-PDFwriter/wiki

By using Automatorhttps://support.apple.com/en-ca/guide/automator/welcome/mac to create a Folder Actionhttps://support.apple.com/en-ca/guide/automator/aut7cac58839/mac, you can monitor /var/spool/pdfwriter/ for new files and automatically move them to a different folder.

  1. Open Automator and create a new Folder Action

  2. Select the YourUserName folder using the PDFwriter shortcut:

Folder Action receives files and folders added to: 📁 username

  1. Add the Move Finder Items action into the workflow.

  2. Set the destination to any folder:

Move Finder Items To: 📁 Documents

  1. Save the Folder Action.

The Folder Action will look like the example below. (YourUserName is shown as username in this example.)

Screenshot.2024-11-10.at.2.57.15.PM.png (view on web)https://github.com/user-attachments/assets/2ff052f2-bc44-4a53-b9b5-4608ebfd1670

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/51, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADIJTM77AEBTZBTW3H3Z7655NAVCNFSM6AAAAABRQROMEGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2DONRQGEZDGMA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

andesco commented 2 weeks ago

@rodyager, it is superior for those users who do not want to use a subfolder named <YourUserName> and an alias.

You may not be inclined to offer this programmatically (including a Folder Action workflow) but it may help to document this alternative.

andesco commented 2 weeks ago

15 suggests that @mckenfra was able to accomplish this programatically.