Validating page counts using hardware checks
PaperCut provides accurate tracking of printer usage with the combination of up-front spool fileA print spool file is generated when a user sends a document to a printer. The print spool stores the print job information, and sits in a print queue until it is retrieved and printed by a printer. analysis and post-job hardware verification of the jobs. PaperCut tracks printer usage in the following ways:
-
accurate up-front page count and cost calculations; and
-
verification of the number of printed pages after the job is completed.
Up-front page count and cost calculations
Before the job is sent to the printer, PaperCutanalyzes the printer spool file on the server to determine the job attributes, including the page count, color/grayscale, duplex, paper-size, etc. This up-front analysis allows PaperCut:
-
To calculate the job cost and determine up-front whether the user has enough credit to print.
-
To display the job details (e.g. the cost and page count) to the user in the print confirmation screens and Release Stations.
-
To apply filtersFilters allow you to control attributes of the print settings by either forcing a particular attribute or denying a a print job that does not meet specific criteria. There are two types of print filters: conversions and restrictions. and policy rules to print jobs (e.g. to disallow non-duplex jobs, or to enforce print policyPrint policies allow you to remind users via popup to print duplex, route large jobs to dedicated high-volume printers, discourage users from printing emails, discourage printing web pages in color, and print policies can be implemented in PaperCut using advanced scripting. using the advanced printer scripting).
After the job is queued for printing, PaperCut logs this print job information and charges the usage to the user.
Verification of the number of printed pages after the job is completed
PaperCut MF validates page counts using hardware checks after a print job has been processed. If the job is sent to the printer but it does not print completely (e.g. if the user cancels the job at the printer), then print job hardware checks allow PaperCut to determine the actual number of pages printed. The hardware check counts the number of pages only and does not analyze the job attributes, such as, the number of color/grayscale pages, or the actual page size. These checks are performed at the hardware-level by communicating with the printer via SNMPSimple Network Management Protocol (SNMP) is a component of the Internet Protocol Suite as defined by the Internet Engineering Task Force (IETF). It consists of a set of standards for network management, including an application layer protocol, a database schema, and a set of data objects. Devices that typically support SNMP include routers, switches, servers, workstations, printers, modem racks and more. (Simple Network Management Protocol).
If there is a discrepancy between the up-front page count and the hardware count, you can choose whether you want to use the:
-
hardware check page count
For more information about these options, see Configuring hardware checks below.
Causes for differences in page counts
The printer can report a difference to the PaperCut server's spool file analysis for a variety of reasons:
The user cancels the job at the printer's panel - e.g. LCD screen or cancel button.
The printer goes into an error state (e.g. out of toner) after the job has partially printed. The administrator can then cancel the job at the printer.
The print job might have become corrupted, causing the printer to print 100's of pages of junk (e.g. PostScript code) instead of the user's document!
Configuration "strangeness", such as, the devices double-counting large pages or counting the blank page at the end of a duplex job. Most of these corner-cases have been worked around, however, like all things in Computing, some are bound to show up again!
Requirements
PaperCut's hardware checks use the SNMP protocol to query the page counters of the printer. This is a network protocol supported by most network printers. To support hardware checks the following is required:
A network printer that supports the SNMP protocol.
SNMP enabled in the printer (also ensure the "public" SNMP community is enabled).
The network/firewall allows SNMP UDP packets from the print serverA print server is a system responsible for hosting print queues and sharing printer resources to desktops. Users submit print jobs to a print server rather then directly to the printer itself. A print server can be a dedicated server but on many networks this server also performs other tasks, such as, file serving to the printers. SNMP uses UDP port 161.
Some additional configuration of the printer queues might be required. See installation instructions in Configuring hardware checks.
Only PaperCut should send jobs to the printer. If a job from another print server is sent, the resulting statistics might be unreliable
How hardware checks work
The Printer SNMP standard allows querying of printer status and page count information over SNMP. PaperCut makes use of this information to verify the number of pages printed for each print job. This works as follows:
Before the print job is sent to the printer PaperCut confirms the printer is idle (i.e. not printing).
A snapshot of the page counters is retrieved using SNMP.
PaperCut waits for the job to complete by querying the printer status and page counts. If the printer is in error (e.g. out of paper), then PaperCut continues to wait until the printer error is resolved and the job completes printing.
Once the job is completed and the printer is idle, another snapshot of the page counts is taken.
The total pages printed is calculated using the differences between the initial and the post-job snapshot.
Configuring hardware checks
Printer hardware checks are not enabled by default in installations of PaperCut. Enabling the checks requires some configuration within PaperCut and also some additional configuration of the operating system's printer queues. You can enable/disable hardware checks at the individual printer queue level, or alternatively you can apply the settings to multiple printers using the Copying printer settings.
Enabling hardware checks
To enable the print job hardware checks:
Click the Printers tab.
The Printer List page is displayed.
Select a printer.
The Printer Details - Summary page is displayed.
In the Advanced Configuration area, select the Enable print job hardware check check box.
In When a difference in page counts is detected, select how to handle a difference in page counts between the printer and PaperCut MF:
Show differences in the log status. Do not adjust
The page count differences are recorded against the print job, but no adjustments are made to the page counts or job costs. This is the default option when hardware checks are enabled.
This mode is useful when you want to use the hardware check information to validate refund request by users. In this case the administrator can verify that a user's job did not complete printing and then refund the job.
The hardware check information is displayed in the print log status and also in the refund screens.
Apply differences and adjust the print cost automatically
In this mode, the hardware check information is also recorded on the print jobs as described above. However, any differences in page count and costs are automatically applied to the job.
For example, if a user printed a 5 page document costing $0.50, and they canceled the job after only 3 pages were printed, the job cost would be reduced to $0.30 and the user would be refunded $0.20.
In rare situations, the hardware check can report an increased number of pages. For example, this might happen when a print job is corrupted and prints out 100's of pages of "junk" instead of what the user printed. In this case, the hardware check reports an increased number of pages resulting in an increased cost. By default, PaperCut does not apply the adjustments to the job if the cost would increase.
If you would prefer to apply the differences even if the cost is increased, select Always apply cost adjustments.
Tip:To enable the hardware page counts quickly on multiple printers, use the Copy settings to other printers action available on the left of screen.
Click OK.
On Windows print servers, you must also configure the printer to use a PaperCut TCP/IP Port. For instructions see Windows printer queue configuration.
On Windows print servers, this setting can take up to 2 minutes to take effect. You can speed this up by restarting the PaperCut Print ProviderA Print Provider is a monitoring service installed on a secondary print server to allow PaperCut to control and track printers. This monitoring component intercepts the local printing and reports the use back to the primary Application Server. service.
Windows printer queue configuration
To perform printer hardware checks, configure the Windows printer queues to use the PaperCut TCP/IP Port type. This port works the same as the Standard TCP/IP Port that ships with Windows. The PaperCut TCP/IP Port allows PaperCut MF to perform the page count checks before and after printing the job.
To configure an existing printer queue to use a PaperCut TCP/IP Port
-
Open the Printers list
-
Right-click the printer; then select Printer Properties or Properties
-
Select the Ports tab.
-
Click Add Port.
-
Select PaperCut TCP/IP Port. (Note: if this port is not displayed in the list of available port types, then see Why is the PaperCut TCP/IP Port not available to be chosen in port selection on Windows?.)
-
Click New Port.
-
Enter the printer IP address and port name.
-
Click Add Port to save the new port.
-
Click Close on each dialog window.
-
This printer is now configured to use the new port. Delete the previous port if it is no longer in use by other printers.
To create a new printer queue to use a PaperCut TCP/IP Port:
-
Open the Printers list
-
Click Add a Printer.
-
Choose to add a Local printer.
-
When prompted for the printer port, select Create a new port.
-
Select the PaperCut TCP/IP Port option; then click Next.
-
Enter the printer IP address and port name.
-
Click Add Port to save the new port.
-
Complete the Add Printer wizard as normal choosing the drivers, etc.
Novell, Linux and Mac printer queue configuration
When using Novell, Linux or Mac there is no additional configuration of the operating system required for hardware checks to be enabled. This function is controlled through the PaperCut Admin web interface and comes into affect automatically shortly after the hardware checks are enabled. On Linux or Mac, the hardware checking is supported for the CUPSCommon User Printing System (CUPS) is a printing system for Unix operating systems that allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer. backends of socket, ipp and lpd.
Changing the SNMP community string
By default, the hardware checks use the SNMP community string of "public". For a basic level of security, one can change the SNMP community string that is used. This must also be set in the configuration of the printer.
Open the file [app_dir]/providers/print/[platform]/print-provider.conf in a text editor such as Notepad.
Locate the line SNMPCommunity= and enter the new community string on the right-hand-side of the equals line. For example:
SNMPCommunity=secretcommunity
Reviewing hardware check results
Hardware check results are recorded in PaperCut on the Job Log page. When a hardware check is recorded, the Checked status is displayed in the Status column of the print logs as shown below.
To see the basic details of the hardware check, hover your mouse over the Checked status.
When the hardware check detects a difference, click the Checked status link to see more detailed information.
To manually apply hardware checks to a print job (if this is not configured to apply automatically):
-
Click the Checked status.
-
Review the hardware check information.
-
Click Apply Differences. This applies the page counts and any cost differences to the print log.
Known limitations
Hardware-level page count checks are not enabled by default. Sites should carefully consider these limitations and known issues before implementing:
Hardware-level checks slow down printing a little (a few seconds between each job). The system needs to take a count snapshot before and after a job. The start/end of a job is detected by the printer entering an idle state and stabilization on some devices can take a few seconds (printing => idle). This process adds a small delay between each job.
Copier functions that delay printing such as printing to a "Mailbox" will prevent PaperCut from detecting the print job as it is expected that the print job is printed imediately.
Not all devices support SNMP and even some devices that do, do not support the ability to check page counts at the hardware level. Most major MPF/MFD devices support SNMP, however, smaller printer brands might not. Make sure you test this option across your device type(s) once enabled.
On Windows, install/configure a different Printer Port to support this level of device integration. Care has been taken to emulate the behavior of the Standard TCP/IP Port, however, some drivers might complain if a non-default port is selected. Although this is rare, it can cause issues with some drivers. Always test the printer after changing the printer port. The development team is looking at ways to remove the dependency on a custom port, however, at the current time this method has proven to be the most reliable.
The use of non-PaperCut hold/release functionality on printers and copiers can cause inaccurate hardware validation as it appears that the job never prints, or at least in a timely fashion. It is recommended to use PaperCut based Release Stations where required: (see Hold/release queues & Print Release Stations
If you have many printers it's very time consuming to use the Windows GUI to change the ports! We have not found a reliable way to script this process. We recommend you first test on a representative sample of your devices for a few days, then roll the port change out across your fleet.
Troubleshooting
The "Checked" status is not displayed on any print logs
-
Verify that the printer supports SNMP and that SNMP v1 or v2 is enabled in the printer's Admin web interface.
-
Ensure that your networks and firewalls allow SNMP traffic (i.e. UDP port 161) between your print server and printers.
-
If using a Windows print server, check that the printer is configured to use the PaperCut TCP/IP Port. See Windows printer queue configuration
-
Verify that hardware checks are enabled in PaperCut. See Configuring hardware checks.
-
You can test that PaperCut can query SNMP data from the printer by running the following in a command prompt or terminal/shell:
Windows:
[app-path]\providers\print\[platform]\pc-print-monitor.exe -p -h [printer-ip]
Mac/Linux/Novell:
[app-path]/providers/print/[platform]/pc-print-monitor -p -h [printer-ip]
If SNMP data can be retrieved, some basic status information is printed. If not, an error is displayed.
-
If you are still unable to diagnose the problem, then send the following log files in a support request:
Windows:
[app-path]\providers\print\[platform]\print-monitor.log* [app-path]\providers\print\[platform]\print-provider.log*
Mac/Linux/Novell:
[app-path]/providers/print/[platform]/print-provider.log*
Why is the "Checked" status missing on some print logs?
-
An intermittent networking problem between the print server and printer might have stopped the SNMP page counts from being retrieved. E.g. the network was briefly interrupted while PaperCut was waiting for the print job to finish printing.
-
If the job is deleted from the print queueA print queue displays information about documents that are waiting to be printed, such as, the printing status, document owner, and number of pages to print. You can use the print queue to view, pause, resume, restart, and cancel print jobs. while in progress PaperCut cancels any hardware checks and the Checked status is not displayed in the print log. To avoid this, it is recommended to fix any problems (e.g. out of paper, etc) at the printer and then allow the document to finish printing. This allows PaperCut to retrieve the page counts from the printer after the job completes. Delete the job from the queue only if it stays stuck even after the printer error is resolved.
Why is the PaperCut TCP/IP Port not available to be chosen in port selection on Windows?
-
A possible reason why the PaperCut TCP/IP Port is not available is because the port was unable to be installed due to a Security Policy disabling the installation of unsigned drivers. A solution for this is to change the Security Policy for the unsigned driver installation behavior to either allow unsigned driver installations or to warn but allow their installation.