Hello,
Using the examples found here:
I have been able to write a script to automatically share and unshare all of my network printers with all of my users (hundreds of printers for tens of thousands of users). I have run into one snag with it, though. I cannot figure out how to set the print quota on a printer. By default, when you make a printer 'public' (using the api example in the link above), the default is for unlimited printing. This is not desirable for me. I'd like to limit it to 15 pages per day (which is the default when you manually share a printer).
Just to give you an idea, here's my flow for our cloud printing structure:
Start of the day
create all network printers in CUPS
make all printers public
query cloud print api for printer ids and their key.
end of day - remove all network printers (effectively unsharing them with all of our users that have added the printer)
The reason we are setting this all up is that we have purchased a number of chromeboxes that we will be deploying all around so that users can visit a kiosk and print stuff. For them to be able to print to a specific printer, I will set up a URL redirect (to automatically redirect the user to the link where they can add the printer to their google account). At the end of the day, I need to revoke their access to that printer because I want to avoid a scenario where a user prints maliciously and continuously, wasting our resources.
Has anyone figured out a way to set the print quota? I have tried:
$params['quotaEnabled'] = 'true';
$params['maxQuota'] = '15';
$params['dailyQuotaIncrement'] = '15';
$params['currentQuota'] = '15';
None of those parameters made a difference, however. Thanks for any and all help.