Help with automating printing with different preferences

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I apologize if this forum is not the right place to ask for this help.
I am looking to hire a consultant who knows Hazel & applescript/Mac Automator to help me accomplish this:
Big Picture:
We are going to use network scanners (Raven Pro in this example) and high-speed printers with multiple output functions (single/double side, stapling, hole-punching, etc.) to replace our big office copier(s).
Here's how it will work (at least in my mind), unless there's a better way:
-I will create multiple folders on the "control mac" or "printer mac" as I will call it (already done/workin), with each folder designed to receive a file from the scanner, and each folder will be set to print the received Finder Item in a different way;
-scanner will be set up with multiple network destinations (the various folders discussed above) for scanning pdf's into, and it uses the SMB stuff built into Mac (already have this working / know how to do this);
-each folder will print in different ways & to different printers. For instance, when a file is scanned / added to a particular folder, it will print (then, thereafter, delete the file) using different commands/instructions/whatever:
---files in folder A will print 1 copy, 1-sided to Printer A
---files in folder B will print 1 copy, 2-sided to Printer A
---files in folder C will print 3 copies, 1-sided to Printer A, stapled
---files in folder D will print 6 copies, 2-sided to Printer A, stapled
---files in folder E will print 5 copies, 2-sided to Printer A, stapled, each copy set hole-punched
(so on & so forth, for as many print configurations I need)

We will have lots of these print preference combos. I can do just about all of this now using Automator (without even using Hazel), EXCEPT FOR figuring out how to have Automator print with different print settings as described above. This is what i am looking to hire someone for - a person who knows Hazel/Automator/Applescript could probably crack this code for me easily.

The Raven Pro scanner can have as many "network" folder destinations as I want (i.e., folders as explained above), with each folder printing the file in the proscribed way based on the folder the pdf was scanned into, then deleting the PDF file (so the Mac hard drive storage doesn't get consumed within a week...).

We are basically replacing our traditional office copiers with distributed scanners & printers (printers being much more easily maintained than traditional copiers).
Thoughts? Anybody interested? I posted this job on www.upwork.com as well today. Just thought I would come to the experts here in the Hazel forum, since we use Hazel in limited fashion for other things.
patrick@elder.law
 
Posts: 1
Joined: Wed Jan 29, 2020 12:07 pm

I think you want someone adept with scripting (AppleScript). You might want to find an AppleScript specific forum and ask there. I feel like the Hazel aspect of it is more straightforward once you have the script(s) in place.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hi Patrick,

I did something similar, I have two sites (Home Office & Office Office!!) I need to print drawings sometimes and rather than wait to get into the office I set up folders, just like you want to automate the process.

You need to install CUPS (Print service) for this to work. I always use the CUPS version of printer drivers, because honestly the Apple AirPrint versions are crap.

See here;
https://www.cups.org
and here;
https://help.hikeup.com/portal/en/kb/articles/enabling-cups-printer-interface-for-mac


I intend to add more folders, depending on what I want to do, but for now I will keep it simple. I have as I said, 8 different folders, 4 of each are in two separate physical locations;

I set up 8 folders, as follows;
CasaP - Brother J6920 A3 1 Copy
...
CasaP - Brother J6920 A3 6 Copies
Office - Xerox 7800 A3 1 Copy
Office - Xerox 7800 A3 6 Copies
Office - Xerox 7800 A4 1 Copy

Importantly, to make this work remotely, these folders can be in either Dropbox or iCloud, so when the the relevant machine sees the file, it runs the Hazel rule. I can drop a pdf into the office folder from home and viola, everything is printed by the time I get into the office.

I only added the relevant rules for each location...

For each folder I have the following rules;
Image

Then I use lpr to do the heavy lifting in an embedded script;
Code: Select all
lpr $1 -P Brother_MFC_J6920DW -#1 -o landscape -o fit-to-page -o media=A4

Make sure to change the path to
Code: Select all
/bin/zsh
if using a recent version of MacOS.
Also, you can see I called the printer name specifically, this might be helpful if you have two or more printers and want to print to the non default system printer (envelopes / labels etc.)

You can find more details re the print options here (Once CUPS is Installed);
http://localhost:631/help/options.html

Works like a treat, and it's pretty simple to replicate once you have one folder set up (just drag the rule to the next folder and rename / edit it)

Let me know how you got on.
hibernian56
 
Posts: 2
Joined: Sat May 18, 2013 11:12 am


Return to Support