+ Post New Thread
Results 1 to 5 of 5
How do you do....it? Thread, Papercut Scripting in Technical; Hi, In papercut I know you can add a header to put a username etc... onto work that had printed, ...
  1. #1
    clarky2k3's Avatar
    Join Date
    Nov 2007
    Location
    Northumberland
    Posts
    318
    Thank Post
    35
    Thanked 47 Times in 39 Posts
    Rep Power
    24

    Papercut Scripting

    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?

  2. #2

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,088
    Thank Post
    402
    Thanked 618 Times in 565 Posts
    Rep Power
    180
    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?

  3. #3

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,088
    Thank Post
    402
    Thanked 618 Times in 565 Posts
    Rep Power
    180
    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[i])) {
    return true;
    }
    }

    return false;
    }


  4. Thanks to Edu-IT from:

    clarky2k3 (13th March 2013)

  5. #4

    Join Date
    Nov 2011
    Posts
    60
    Thank Post
    6
    Thanked 3 Times in 3 Posts
    Rep Power
    6
    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...

  6. #5

    Join Date
    Nov 2011
    Posts
    60
    Thank Post
    6
    Thanked 3 Times in 3 Posts
    Rep Power
    6
    OK...I tried it, but still no printing of the watermark!

SHARE:
+ Post New Thread

Similar Threads

  1. Papercut scripting help
    By clareq in forum Network and Classroom Management
    Replies: 13
    Last Post: 29th January 2013, 08:24 PM
  2. PaperCut Scripting Competition
    By Dos_Box in forum Windows Server 2012
    Replies: 0
    Last Post: 4th December 2012, 08:55 AM
  3. Replies: 1
    Last Post: 21st February 2012, 10:54 AM
  4. Papercut Scripts
    By alonebfg in forum Green Computing
    Replies: 1
    Last Post: 5th October 2011, 03:58 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •