PaperCut
Contents
Installing the Client
Macintosh
Run the installer on smb://patterson.hampshire.edu/it/UserSupport/Papercut/PaperCut 17.0.6 Client/mac/client-local-install
After install, a login window will appear. This is optional. If you do log in though, DO NOT tell PaperCut to remember your credentials.
In order to force the client to load for each user and keep said users (who don't always know what's best for them) from quitting the client, a login hook will need to be established. After installation completes, log into the Admin account and navigate to "Applications" -> "PCClient" ctrl+click on the icon and choose "Show Package Contents." In "Contents" -> "Resources" run the file "install-login-hook.command" follow the prompts in the terminal window.
You can copy over the config.properties file from smb://patterson.hampshire.edu/it/UserSupport/Papercut/PaperCut 17.0.6 Client/config.properties
Or alternatively, the config.properties file should have the following options already set (with one adjustment you'll need to make, below):
minimized=Y noquit=Y server-ip=192.33.12.94 server-name=salmoneus server-port=9191 user=guest
You will want to change the user=guest
line as follows:
user=papercutSRVC
Add a printer with:
- System Preferences -> Print and Fax
- Click that tiny little plus icon at the bottom of the list of printers
- Address: papercut.hampshire.edu
- Protocol: Internet Printing Protocol - IPP
- Queue: printers/LO_*
- Name: papercut.hampshire.edu
- Location: <blank>
- Print Using: Select Software...
- Ricoh MP c2500 PS for 3rd floor and APL, Ricoh MP 6500 PS for left and right
Windows
Install client from \\patterson.hampshire.edu\it\UserSupport\Papercut\PaperCut 17.0.6 Client\win\client-local-install.exe
The config.properties file should have the following options already set:
minimized=Y noquit=Y server-ip=192.33.12.94 server-name=salmoneus server-port=9191
Add the following line:
user=papercutSRVC
Or, alternatively, just copy over config.properties from: \\patterson.hampshire.edu\it\UserSupport\Papercut\PaperCut 17.0.6 Client\config.properties
Set up a printer by:
- Start -> Devices and Printers -> Add a printer
- Network Printer -> "The printer I want isn't listed"
- Select a shared printer by name -> http://papercut.hampshire.edu:631/printers/LO_*
- Driver -> Ricoh MP c2500 PS for 3rd floor and APL, Ricoh MP 6500 PS for left and right
Ubuntu
Make sure you have Java 5.0+ installed.
To connect to Balder:
- server: balder
- type: windows share
- share: private
- domain name: administration
Copy files at \\balder.hampshire.edu\private\papercut-client\client\linux to /usr/local/papercut/client
Run the following to change permissions of the files:
cd /usr/local/papercut/client chmod 755 ./pc-client-linux.sh
To trigger on login:
- Open Startup Applications.
- Click 'Add'
- Navigate to /usr/local/papercut/client
- Choose 'pc-client-linux.sh'
- Name it whatever you want (PaperCut client)
The config.properties file should have the following options already set:
auth-ttl-default=0 auth-ttl-values=0 minimized=Y noquit=Y server-ip=192.33.12.94 server-name=salmoneus server-port=9191 user=guest
Set up a printer by:
- Open 'Printers'
- Click 'Add'
- Enter URI: "ipp://papercut.hampshire.edu:631/printers/LO_3rd_Floor_BW"
- Choose 'Generic' -> 'PostScript' -> 'PostScript Printer Foomatic/Postscript [en] (recommended)'
- Airport Lounge driver: ???
Adding a Printer to the PaperCut Server
- Add the printer via the CUPS interface
- First create a tunnel to the PaperCut server with
ssh -NL 8080:127.0.0.1:631 YOURUSERNAME@papercut
- Browse to http://localhost:8080/admin
- Click
Add Printer
- At this point you will be prompted for your LDAP username and password. A warning may appear that your password will be sent in clear text but remember that it will be sent in the clear to localhost:8080 which is a secure tunnel to papercut:631 so don't worry about it.
- Choose
AppSocket/HP JetDirect
- Enter the path to the printer (e.g.
socket://loxx4260-1.hampshire.edu:9100
) - Enter the Name, Description and Location of the printer and click
Share This Printer
- Under
Or Provide a PPD File
clickChoose File
and select a PPD- A PPD can be found on
\\patterson\it\papercut client 14.x\Xerox xxx PPDs\xxx.ppd
for Xerox WorkCentre printers
- A PPD can be found on
- Click
Query Printer for Default Options
- First create a tunnel to the PaperCut server with
- Enable the printer for use with PaperCut
- SSH to the PaperCut server
- Run
sudo /home/papercut/providers/print/linux-x64/configure-cups
- You will be prompted to set the status of each CUPS printer for use with PaperCut. You want to
(L)eave
most of them enabled which you can do by just pressing Enter. You want to enable your new printer by typing "e" and enter.
- You will be prompted to set the status of each CUPS printer for use with PaperCut. You want to
- Verify printer addition
- Log into https://salmoneus.hampshire.edu:9192/admin with your own username or with
admin
/ieRe1che
- Select the printer and scroll down to "Advanced Configuration" Check the box for "Unauthenticated printer (enable popup authentication)." Scroll down to the bottom of the page and click "Apply."
- Add the default printing script to the printer (just copy it from another printer like LO_1st_Floor_Left)
- Log into https://salmoneus.hampshire.edu:9192/admin with your own username or with
Printer URIs
ipp://papercut.hampshire.edu:631/printers/CSC_3rd_Floor_313
ipp://papercut.hampshire.edu:631/printers/LO_1st_Floor_APL
ipp://papercut.hampshire.edu:631/printers/LO_1st_Floor_Left
ipp://papercut.hampshire.edu:631/printers/LO_1st_Floor_Right
ipp://papercut.hampshire.edu:631/printers/LO_3rd_Floor_HU
Scripting
New Normal Script with Duplex and Color discouraged
/* cakDS@hampshire.edu and glIT@hampshire.edu and regIT@hampshire.edu 2/2/17 This script promts users to convert their print job to Duplex if it would save them money and us paper */ function printJobHook(inputs, actions) { if(!inputs.job.isAnalysisComplete) { return; } var isDuplex = false; //Edit the settings below according to your policy and environment. var DISCOURAGE_SIMPLEX_PRINTING = true; var DISCOURAGE_COLOR_PRINTING = true; // Show warning only if printing more than X pages. var SIMPLEX_WARNING_PAGE_LIMIT = 1; // Advanced Charging values. Update manually / contact papercut to find these values programmatically var BASE_COST = 0.50; var DUPLEX_DISCOUNT = 0.03; var GRAYSCALE_DISCOUNT = 0.45; var COST_COLOR_SIMPLEX = BASE_COST * inputs.job.totalPages; var COST_BW_SIMPLEX = (BASE_COST - GRAYSCALE_DISCOUNT) * inputs.job.totalPages; var COST_COLOR_DUPLEX = (Math.ceil(inputs.job.totalPages / 2) * BASE_COST) + (Math.floor(inputs.job.totalPages / 2) * (BASE_COST - DUPLEX_DISCOUNT)); var COST_BW_DUPLEX = (Math.ceil(inputs.job.totalPages / 2) * (BASE_COST - GRAYSCALE_DISCOUNT)) + (Math.floor(inputs.job.totalPages / 2) * ((BASE_COST - GRAYSCALE_DISCOUNT) - DUPLEX_DISCOUNT)); var BW_CONVERSION_SAVINGS_SIMPLEX = COST_COLOR_SIMPLEX - COST_BW_SIMPLEX; var BW_CONVERSION_SAVINGS_DUPLEX = COST_COLOR_DUPLEX - COST_BW_DUPLEX; // Test for grayscale printing if(!inputs.job.isColor) { BASE_COST = BASE_COST - GRAYSCALE_DISCOUNT; } var COST_SIMPLEX = inputs.job.totalPages * BASE_COST; // This is the PaperCut way //var COST_DUPLEX = (Math.floor(inputs.job.totalPages / 2) * ((BASE_COST - DUPLEX_DISCOUNT) * 2)) + ((inputs.job.totalPages % 2) * BASE_COST); // This is the way that makes sense var COST_DUPLEX = (Math.ceil(inputs.job.totalPages / 2) * BASE_COST) + (Math.floor(inputs.job.totalPages / 2) * (BASE_COST - DUPLEX_DISCOUNT)); var COST_SAVINGS = COST_SIMPLEX - COST_DUPLEX; var PAGE_SAVINGS = inputs.job.totalPages - Math.ceil(inputs.job.totalPages / 2); var PAGE_SAVINGS_TEXT = PAGE_SAVINGS + ' pages'; if(PAGE_SAVINGS == 1) { PAGE_SAVINGS_TEXT = '1 page'; } if(inputs.job.isDuplex) { isDuplex = true; actions.log.info("Fixed printing cost of duplexed " + inputs.job.totalPages + "-page document from " + inputs.utils.formatNumber(inputs.job.cost, 2) + " to " + inputs.utils.formatNumber(COST_DUPLEX, 2)); actions.job.setCost(COST_DUPLEX); } else { // Discourage users from printing too many pages in simplex. if( DISCOURAGE_SIMPLEX_PRINTING && inputs.job.totalPages > SIMPLEX_WARNING_PAGE_LIMIT ) { var htmlFormDuplex = "<html>" + " <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\"></script>" + " <div style='width:400px; height:210px; padding: 10px; color:#6F6F6F; background: url(http://%PC_SERVER%/scripting/print/recipes/images/treebg.png) no-repeat;'>" + " <div style='padding: 10px; font-weight: bold; font-size: 20px; text-align: center;'>" + " <img src='http://%PC_SERVER%/images/icons/24x24/warning.png'> " + " Duplex Printing Alert" + " <img src='http://%PC_SERVER%/images/icons/24x24/warning.png'>" + " </div>" + " <div style='font-size: 12px;'>" + " Did you know that this job will produce " + inputs.utils.formatNumber(inputs.job.environmentGramsCO2, 0) + "grams of CO<sub>2</sub> equiv.?" + " This is equivalent to leaving a 60W bulb on for <b>" + inputs.utils.formatNumber(inputs.job.environmentBulbHours, 1) + " hours</b>!" + " <br><br>" + " You could halve this impact, saving " + PAGE_SAVINGS_TEXT + " and <b>" + inputs.utils.formatCost(COST_SAVINGS) + "</b> by printing double-sided." + " </div>" + " <br/><br/>" + " <div style='font-size: 14px; font-weight: bold; text-align: center;'>" + " Do you want to print double-sided?" + " </div>" + " </div>" + "</html>"; var responseDuplex; // Display the message with custom dialog title and description (options). responseDuplex = actions.client.promptYesNo(htmlFormDuplex); if (responseDuplex == 'YES') { actions.log.debug('User chose to convert their job to duplex.'); actions.job.setCost(COST_DUPLEX); actions.job.convertToDuplex(); isDuplex = true; } else if (responseDuplex == 'NO') { actions.log.debug('User chose not to convert their job to duplex.'); } } else { actions.log .debug("Didn't offer to convert job to duplex as user is not " + 'running the client software.'); // don't display any more dialogs return; } } if (inputs.job.isColor) { // tantalize the user with how much cheaper it would be to print in BW var currentCost; var costBW; var costSavings; if (isDuplex) { currentCost = COST_COLOR_DUPLEX; costBW = COST_BW_DUPLEX; costSavings = BW_CONVERSION_SAVINGS_DUPLEX; } else { currentCost = COST_COLOR_SIMPLEX; costBW = COST_BW_SIMPLEX; costSavings = BW_CONVERSION_SAVINGS_SIMPLEX; } if(DISCOURAGE_COLOR_PRINTING) { var htmlFormColor = "<html>" + " <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\"></script>" + " <div style='width:400px; height:210px; padding: 10px; color:#6F6F6F; background: url(http://%PC_SERVER%/scripting/print/recipes/images/treebg.png) no-repeat;'>" + " <div style='padding: 10px; font-weight: bold; font-size: 20px; text-align: center;'>" + " <img src='http://%PC_SERVER%/images/icons/24x24/warning.png'> " + " Color Printing Alert" + " <img src='http://%PC_SERVER%/images/icons/24x24/warning.png'>" + " </div>" + " <div style='font-size: 12px;'>" + " Did you know that this job will cost " + inputs.utils.formatCost(currentCost) + " because you are printing in color?" + " If you convert this job to grayscale, it will only cost " + inputs.utils.formatCost(costBW) + "!" + " <br><br>" + " That means you'd save <b>" + inputs.utils.formatCost(costSavings) + "</b> by printing in grayscale." + " </div>" + " <br/><br/>" + " <div style='font-size: 14px; font-weight: bold; text-align: center;'>" + " Do you want to print in grayscale?" + " </div>" + " </div>" + "</html>"; var responseColor; // Display the message with custom dialog title and description (options). responseColor = actions.client.promptYesNo(htmlFormColor); if (responseColor == 'YES') { actions.log.debug('User chose to convert their job to grayscale.'); actions.job.setCost(costBW); actions.job.convertToGrayscale(); } else if (responseColor == 'NO') { actions.log.debug('User chose not to convert their job to grayscale.'); } } else { actions.log .debug("Didn't offer to convert job to grayscale as user is not " + 'running the client software.'); // don't display any more dialogs return; } } }
Normal Script
/* cakDS@hampshire.edu 9/20/12 This script promts users to convert their print job to Duplex if it would save them money and us paper */ function printJobHook(inputs, actions) { if(!inputs.job.isAnalysisComplete) { return; } //Edit the settings below according to your policy and environment. var DISCOURAGE_SIMPLEX_PRINTING = true; // Show warning only if printing more than X pages. var SIMPLEX_WARNING_PAGE_LIMIT = 1; // Advanced Charging values. Update manually / contact papercut to find these values programmatically var BASE_COST = 0.05; var DUPLEX_DISCOUNT = 0.04; var COST_SIMPLEX = inputs.job.totalPages * BASE_COST; // This is the PaperCut way //var COST_DUPLEX = (Math.floor(inputs.job.totalPages / 2) * ((BASE_COST - DUPLEX_DISCOUNT) * 2)) + ((inputs.job.totalPages % 2) * BASE_COST); // This is the way that makes sense var COST_DUPLEX = (Math.ceil(inputs.job.totalPages / 2) * BASE_COST) + (Math.floor(inputs.job.totalPages / 2) * (BASE_COST - DUPLEX_DISCOUNT)); var COST_SAVINGS = COST_SIMPLEX - COST_DUPLEX; var PAGE_SAVINGS = inputs.job.totalPages - Math.ceil(inputs.job.totalPages / 2); var PAGE_SAVINGS_TEXT = PAGE_SAVINGS + ' pages'; if(PAGE_SAVINGS == 1) { PAGE_SAVINGS_TEXT = '1 page'; } if(inputs.job.isDuplex) { actions.log.info("Fixed printing cost of duplexed " + inputs.job.totalPages + "-page document from " + inputs.utils.formatNumber(inputs.job.cost, 2) + " to " + inputs.utils.formatNumber(COST_DUPLEX, 2)); actions.job.setCost(COST_DUPLEX); } else { // Discourage users from printing too many pages in simplex. if( DISCOURAGE_SIMPLEX_PRINTING && inputs.job.totalPages > SIMPLEX_WARNING_PAGE_LIMIT ) { var htmlForm = "<html>" + " <div style='width:400px; height:210px; padding: 10px; color:#6F6F6F; background: url(http://%PC_SERVER%/scripting/print/recipes/images/treebg.png) no-repeat;'>" + " <div style='padding: 10px; font-weight: bold; font-size: 20px; text-align: center;'>" + " <img src='http://%PC_SERVER%/images/icons/24x24/warning.png'>" + " Duplex Printing Alert" + " <img src='http://%PC_SERVER%/images/icons/24x24/warning.png'>" + " </div>" + " <div style='font-size: 14px; font-weight: bold; text-align: center;'>" + " Please cancel and use double-sided printing instead!" + " </div>" + " <br><br>" + " <div style='font-size: 12px;'>" + " Did you know that this job will produce " + inputs.utils.formatNumber(inputs.job.environmentGramsCO2, 0) + "grams of CO<sub>2</sub> equiv.?" + " This is equivalent to leaving a 60W bulb on for <b>" + inputs.utils.formatNumber(inputs.job.environmentBulbHours, 1) + " hours</b>!" + " <br><br>" + " You could halve this impact, saving " + PAGE_SAVINGS_TEXT + " and <b>" + inputs.utils.formatCost(COST_SAVINGS) + "</b> by printing double-sided." + " </div>" + " </div>" + "</html>"; var response; // Display the message with custom dialog title and description (options). response = actions.client.promptPrintCancel( htmlForm, { 'dialogTitle': 'Policy Alert', 'dialogDesc': inputs.job.documentName, 'hideJobDetails': false } ); if(response == "CANCEL" || response == "TIMEOUT") { actions.job.cancel(); // don't display any more dialogs return; } } } }
Redirect Script
function printJobHook(inputs, actions) { // Change this: var newPrinter = "LO_1st_Floor_Left"; if (!inputs.job.isAnalysisComplete) { return; } actions.job.redirect(newPrinter); actions.client.sendMessage("The printer " + inputs.job.printerName + " is currently experiencing technical difficulties. Your print job has been printed on " + newPrinter + " instead."); }