rodyager / RWTS-PDFwriter

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

Choose output folder for printed PDF files #15

Closed mckenfra closed 2 years ago

mckenfra commented 3 years ago

See discussion https://github.com/rodyager/RWTS-PDFwriter/issues/14

This pull request allows the user to choose the folder to send PDFs to after printing. It relies on the macOS Folder Actions functionality

After install of the printer driver, every different user who logs into the same machine can specify their own preferred folder where they want their printed PDFs to appear, by executing the following script:

/Library/Printers/RWTS/PDFwriter/choosefolder.sh

This script installs the necessary Folder Actions in the user's environment, and also creates a symbolic link to the user's chosen folder at the following path:

~/Library/Application\ Support/PDFwriter/pdfs

The Folder Action moves printed PDFs to this symbolic link, if it exists.

Note that you can see the installed Folder Actions by right-clicking on folder /var/spool/pdfwriter in Finder, and choosing Services -> Folder Actions Setup

Ideally instead of running a script a user could click a button somewhere to run the choosefolder.sh script, so it is more user-friendly. But that could be a possible future enhancement. Let me know if this works ok for you, I have only tested on macOS Mojave.

mckenfra commented 3 years ago

I've just pushed a commit that fixes issues on Big Sur that prevented the PDF files from being moved to the chosen folder.

Now tested and works perfectly on both Catalina and Big Sur

macmachado commented 2 years ago

I think the .pkg is not complete. the chose folder files are not there. I've have just installed it and did not find them. could you guys check it out, pls. Great job by the way!!!

mckenfra commented 2 years ago

@macmachado The choose folder feature will only be available once this pull request is merged and a new version is released.

@rodyager Did you have any thoughts/feedback on this pull request?

rodyager commented 2 years ago

The reason I haven’t released this is that it didn’t work for me, possibly because I was running one of the OSX Betas at the time and something might have been broken.

However, it is something I do want to fix. My current intention is to add a “Helper app” that gets installed in the Utilities folder which allows any user to “create" a folder which will be the print job destination. [They’ll actually be creating a symbolic link to /var/spool/pdfwriter/ ]

Just need to find the couple of hours that it will take.

Rod

On 2 Apr 2022, at 2:52 am, Francis McKenzie @.**@.>> wrote:

@macmachadohttps://github.com/macmachado The choose folder feature will only be available once this pull request is merged and a new version is released.

@rodyagerhttps://github.com/rodyager Did you have any thoughts/feedback on this pull request?

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/pull/15#issuecomment-1086072049, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADPKHBNWF7MJ6MLVIWDVC4LUNANCNFSM47NOLMIA. You are receiving this because you were mentioned.Message ID: @.***>

mckenfra commented 2 years ago

@rodyager Sorry to hear it wasn't working for you 😞 Did you make sure you did the build using all 3 commits from this pull request?

I have attached videos showing this feature working on Mojave, Catalina, Big Sur and Monterey. In each case, I ran the choosefolder.sh script beforehand and chose the Downloads folder as the destination for my printed PDFs.

You will see there is a slight delay after printing before the Folder Action kicks in and moves the PDF to the correct folder. You can also see that a little cogwheel icon appears in the menubar while the Folder Action is running.

https://user-images.githubusercontent.com/439593/162520471-03d8486a-a509-4a7c-8ae7-c5ce8e48ede3.mov

https://user-images.githubusercontent.com/439593/162520588-e8d75f30-c68a-49a8-8318-ab33888bf8b8.mov

https://user-images.githubusercontent.com/439593/162520660-093f0a02-1523-43f0-b8d6-de3d5218fd20.mov

https://user-images.githubusercontent.com/439593/162520782-0835da98-eaf7-47e9-8521-8f5a2790ba07.mov

reubn commented 2 years ago

This would be great to have

rodyager commented 2 years ago

I've now added a utility that allows you to create a folder (well, actually an alias) in the location of your choice, to which the output will be directed. Each users on the machine can make their own individual choice. The link to download the utility is near the top of the ReadMe.

rodyager commented 2 years ago

I’ve added a utility that lets each user choose a location for the output folder for their printed PDF files.

(See the link to download the utility near the top of the ReadMe on github.)

Rod

On 19 Jun 2022, at 7:15 pm, Reuben @.**@.>> wrote:

This would be great to have

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/pull/15#issuecomment-1159664075, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADNQJCF3YYEBIJ6OVRLVP3QMVANCNFSM47NOLMIA. You are receiving this because you were mentioned.Message ID: @.***>