PaperCut Print Script of the Month #13 Select Release Account

PaperCut print script of the Month

Like most days I was sat at work enjoying my coffee while listening to a random playlist on Spotify when my VOIP phone rings. It was one of our valued resellers who wanted us to throw some ideas at them to meet a client’s requirements. What he wanted to do was set up a way that delegated print release could be optional for the students, and the PaperCut Shared Accounts would still be charged. There was a catch with this one where the users doing the releasing would be teaching assistants who move between classes.

At first, it seemed like it could be almost impossible to do this and make it optional. After about 15 minutes we decided that a PaperCut print script might be able to handle this and not get in the way of the workflow too much. Take a couple of minutes to digest this scenario and go and get your coffee before we start working it out.


First, we need to work out what we want to do, and that is to present a list of users to any account in a group, and once selected let that user release the job.
Let’s start by creating an array that will store the users we will show in the popup and set the group that this will apply to.

All good so far, Now we know we will want to show a popup so we might as well set a couple of variables to hold the popup message and the title.

As we only want this window to appear for the student’s group we will want to check inputs.user.isInGroup() and if it isn’t the group we want we will need to leave the script.

To display our prompt we are going to use actions.client.promptForChoice(), It will accept a message and an Array of choices which will return the selected value when the user clicks on OK.

If we just used this, the popup would show the document information, and a generic title so let’s set some options like hiding the job details, showing our title and setting the default choice to none.

We now need to go back and update our actions.client.promptForChoice() method to include the options we want.

All that is left to do now is work out how we are going to enable the other user account to release the job. To achieve this we are going to change the user that owns the print job. Usually, this would cause a problem with reporting if you wanted to know which user was sending the job but luckily for this case, it doesn’t matter as the shared account will be billed.
So what is this magical method? actions.job.changeUser(), If you plan to use this make sure the users exist and if you intend to let the users manually type in the name make sure you check the input is not longer than 50 characters.

So back to the script, we will check that the response is not “none” then change the user that owns the job to whatever the value of the response happens to be.

That is it for this month and as always the complete PaperCut print script is below.

We can help you with print scripts! You can find out more about what we offer here. So, if you have your own requirements for a print script and you don’t have the time or in-house experience to make it then simply contact us.

Get in touch today |

Latest News from Jonathan Bennetts

How do you bulk delete printers in PaperCut?

We get asked fairly often if it's possible to quickly delete printers from Pap...

Written by: Jonathan Bennetts


Automate Balance Updates in PaperCut

A few days ago one of our resellers came to us with an interesting problem. T...

Written by: Jonathan Bennetts



Selectec have proved to be a great company to partner with. I have worked with Selectec for 7 years now, and am always impressed with their professionalism and eagerness to help. Both with sales and technical support, Selectec have always strived to give any information that I need, and gone above and beyond when I’ve needed a little extra help. I can’t recommend them highly enough.

Jon Farquharson Abbey Business Group
Back to Top ↑