img

PaperCut Print Script of the Month #12 Keyword(s) = Free Printing


As 1000’s of children march to school dressed as Maltida or a BFG we thought it a good idea to do something to honour Roald Dahl day.

This script shows off the ability to allow documents to be printed at zero cost depending on the file name. While we have gone with Roald Dahl book names, other applications could be invoice or statement depending on the customer’s needs.

The script is built around a few very simple concepts. Grab a cup of tea and we can begin.

First of all we can set an optional comment for the logs, this will help admins work out why a job ended up being zero cost.

After that we have an array, you may remember we went into details about arrays in SOTM#3. The array in question holds a list of keywords and in this instance the keywords are Rhald Dahl’s greatest stories.

Note – All of this depends on the file name being useful, not all applications publish the file name when the send a job to the print queue. It could be that the application you print from names all print jobs the same.

Last up we have the guts of the script. We tell the script to look at the jobname and if it matches any in the list add the comment. We used toLowerCase to work around any case sensitive problems with file names.

if everything matches up we set the cost to zero using the actions.job.setcost option.

That is it for this month and as always the complete print script is below. 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 | sales@selectec.com

Latest News from Ross Malyon
img

PaperCut Licence FAQs

Now that the new PaperCut licence model has settled in nicely, we have...

Written by: Ross Malyon

More
img

New PaperCut licence model for 2019

From time to time PaperCut like to shake things up a bit... It started with Pa...

Written by: Ross Malyon

More

img

Having dealt with Selectec for the past 8 years the service and support we get for PaperCut MF has been exceptional, support requests are met in a short timescale and dealing with the friendly and knowledgeable staff is always a pleasure

Phil Kelly Midshire Business Systems
This website works best using cookies which are currently disabled. We use cookies to help with our site analytics to improve our services.
Back to Top ↑