Jump to content

Recommended Posts

Posted

Hi,

 

In papercut I know you can add a header to put a username etc... onto work that had printed, is there anyway this could just be for student users and not just anyone who prints to a certain printer?

Posted
Yes. I'll dig out the script we use and send it to you? It excludes certain user groups, not printers though, but to do that just don't run this script on that printer you want to exclude. Would that help?
Posted

You'd need to set your variables depending on your groups in AD.

 

/* Script 3 - watermarking */

var STUDENTS_GROUP = 'Students';

var STAFF_GROUP = 'Teaching Staff';

var STAFF_GROUP1 = 'Non-Teach Staff'

 

if (inputs.user.isInGroup(STUDENTS_GROUP)) {

/*

* The user is in the students group, set a watermark. If the printer has

* watermarking settings defined (e.g. font size, location on page) then

* they will be taken into account. The special replacements %user% and

* %date% will be replaced by the name of the user printing the job and the

* date and time the job was printed. For a full list of available

* replacements see the user manual section on watermarking.

*/

actions.job.setWatermark('Printed by %user% at %date%');

}

 

if (inputs.user.isInGroup(STAFF_GROUP) || inputs.user.isInGroup(STAFF_GROUP1)) {

/*

* The user is in the staff group, disable watermarking. This means that

* if there was a watermark defined on the printer it will be overridden.

*/

actions.job.setWatermark('');

}

 

 

}

 

 

function matchesAny(str, matchStrs, actions) {

if (str == null || matchStrs == null) {

return false;

}

 

for (var i in matchStrs) {

if (str.match(matchStrs)) {

return true;

}

}

 

return false;

}

 

 

  • Thanks 1
Posted
This sounds like something I would like to do....whereabouts does the scripting have to go? I guess you change the above script with the correct AD groups...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...