Advanced Scripting increases the functionality of PaperCut beyond what the current interface provides. It's capabilities are probably best described by looking at some of the pre-built recipes:
Considerable effort has been made to make life easier to write a script. The scripting language used is the most popular scripting language, JavaScript. To get started we have provided over 20 complete best practice recipes to import and over 30 code snippets to use in your own scripts.
To modify scripts an inbuilt JavaScript editor is provided with syntax highlighting and clear error reporting if your script contains an error.
The power of scripts is nearly limitless with the number of input variables and possible actions provided. We know that only geeks would read this far down on a page about advanced scripting, so here's a diagram for you:
Color print jobs require user confirmation
Color printing is expensive so users should be encouraged to print in grayscale whenever they print in color.
No confirmation is required for grayscale jobs.
"Go Green" with environmental warnings
If a user attempts to print a large job, educate them with the organization's "Go Green" initiative. The
message displayed adapts to the job's duplex setting.
Confirm jobs with a high number of pages
Users printing jobs with many pages are asked via the client tool whether they meant to print such a large
document, giving them the opportunity to cancel. This can be useful for users who forget to enter a page range
when printing and instead send the whole document.
Route the job to the cheapest compatible printer (least-cost routing)
An organization has a fleet of compatible printers, each with different operating costs. This recipe calculates
the cost of the job on the candidate printers and redirects the job to the cheapest with the user's
confirmation.
Redirect color jobs to black & white printer with confirmation
Color printing is expensive so users should be encouraged to print in grayscale. When a job is color prompt
the user to send the job to a grayscale print queue.
Redirect large jobs with confirmation
A user printing a large job is requested to redirect the job to a printer dedicated for
large batch printing. Users will be asked to confirm the redirection via the client software.
Redirect large jobs without confirmation
Users printing jobs larger than the defined number of pages have their jobs automatically redirected to
another printer. This can be used to redirect
large jobs from slower or high cost printers to more efficient or faster high volume printers.
Charge printing during class time to the department
Members of the Students group get free printing to engineering lab printers during lab time (9:00am to 11:00am
weekdays).
Free printing during class time
Members of the Students group get free printing to science lab printers during lab time (2:00pm to 5:00pm
Mondays).
Inform user when printer is in error
If a user sends a print job to a printer that is in error (e.g. offline, paper jam, out of paper) they will be
informed via the client tool and given the opportunity to cancel and print to another printer.
Discounted printing for large print jobs
Reduce the cost per page when print jobs are larger than 100 pages. Any pages above 100 are charged at a 50%
discount.
Discount printing during off-peak
Encourage users to print during periods of low activity by offering a discount of 25% during the period before
8:00am and after 6:00pm.
Discount for staff
Staff are charged less for printing than other users. This recipe also demonstrates the use of debug logging.
Confirm printing emails in color (from Outlook)
Implement an organization wide policy to discourage printing of emails in color.
Users printing emails in color will be informed via the client software of the policy
and they will need to confirm their action.
Confirm printing of emails (from Outlook)
Implement an organization wide policy to discourage printing of emails. Users printing emails will be informed
via the client software of the policy and the print job's environmental impact.
Users will need to confirm their action.
Hold color jobs in a release queue
Color printing is expensive so users should be encouraged to print in grayscale. When a job is color the job
is held in a release queue and the user it notified. They must then release the job from one of the release
station interfaces. Grayscale jobs print as normal.
Hold jobs in a release queue during peak times
During peak hours printers can get very busy. When many users are printing sometimes people pickup other
peoples print job resulting in frustration and waste. This recipe enables the hold/release queue during the
peak hours of 9:00am to 6:00pm weekdays. When printing at off-peak times, users are not inconvenienced by
using a hold/release queue.
Require approval code
Users are required to enter a valid approval code to print their job. Approval codes are pre-defined and known
only by privileged users, e.g. teachers. Users who do not enter a valid approval code will have their jobs
canceled.
Bypass Hold/Release Queue for selected users
Selected users print very large batch jobs and it's frustrating to have to attend the printer twice: once for
release and then again later to collect the job. Selected users will be given the option to print direct
bypassing the Hold/Release queue.
Prompt for comment
The user is prompted via the a client popup to enter a comment about their print job.
This could be used to describe what is being printed or provide a justification for printing.
Copyright and attribution sampling and tracking
Sample of a percentage of all jobs printed between a given period checking copyright and attribution.
Users are prompted via the client software to see whether someone else holds the copyright to the job they are
printing. If so, they are prompted to attribute the work via title and author. This is then recorded in the
database so it can be extracted into Microsoft Excel via the CSV Print Job Log export report (stored
in Comment field).
Prompt for security classification
The user is prompted via the a client software popup for the document's security classification.
The classification is then associated with the job as a comment for reference and reporting.
Send email alert on disallowed printer access
IT Department is very protective of their new shiny printer and they are keen to catch any non-IT staff using
it. If anyone outside of IT is found using the printer, the job should be denied and the IT staff alerted via
email of the illegal use.
Trap and warn users if they print known problem documents
Some organization's have known problem documents such as large spreadsheets that if accidentally printed will
print thousands of pages. This recipe will check for a known problem document and alert the user and ask them
to confirm their actions.