How does PaperCut NG work?

Before explaining how PaperCut NG works at a technical and end-user level, the reader should be familiar with the following key concepts.

Key Concepts

Print Server

A print server is a system responsible for hosting print queues and sharing printer resources to desktop clients/workstations. Users on the workstations submit print jobs to a print server rather then directly to the printer itself. A print server may be a dedicated server but on most networks this server may also perform other tasks such as file serving.

Print Queue

A print queue is first-in-first-out queue listing all jobs pending on a given printer.

Proxy Server

A proxy server is software used to connect to the Internet on behalf of a client on a network. The proxy server can also provide security by limiting access to web sites. It can also cache Internet content to reduce Internet costs and speed up connections.

A proxy server is only required to run the optional Internet Control module.

PaperCut NG Internet Control reads the proxy log files to determine a user's Internet usage.

User ID/Username

In a multi-user environment, users log on to a network or computer using a username and password. These are often managed by services such as Active Directory or LDAP. The username is known as the user's identity. PaperCut NG uses this identity to track printing.

Shared Account

A shared account is a PaperCut NG term used to represent an account (pool of funds or allocation group) accessible to multiple users. Accounts usually represent "work areas" and the term can be used interchangeably with terms such as Departments, Faculties, Projects, Clients, Client/Matter, or Cost Centers.

Client/Server Model

Client software is a small program that runs on each workstation and communicates with a server. The printing process on most networks works on a client/server model with clients (workstations) submitting jobs to a server. PaperCut NG also uses optional client software to help provide information to end-users. This also runs in a client/server model.

Application Server

An application server is a server program responsible for centrally processing “business logic” and providing services to end-users. PaperCut NG uses the application server model to provide a “business logic” unit for calculating user costs and providing a web browser interface to end-users.

Information Provider

A provider is a software component or program responsible for providing information to an Application Server. PaperCut NG uses providers to submit print queue/job information to its application server. This information provider is called the Print Provider. Another provider is the Internet Control Provider that monitors Internet proxy log files and reports usage to the application server. Other important providers included with PaperCut NG include user directory and authentication providers.

Web Application Interface

A web application is a software program that interacts with end-users via a web browser. Examples range from Google, Microsoft SharePoint, Hotmail, Internet banking and router management consoles. PaperCut NG provides a web-based interface for system administration and management. Web applications offer administration flexibility by allowing access from any location on the network and avoid the need for installation of separate software.

Understanding the print process flow

To help explain what PaperCut NG is and how it works we'll introduce the system by example. We'll start with a simple high school example:

The student's perspective (transparent quota control):

  1. Matt is a student at a local high school. He has logged onto the network using his username, matt.j.smith, and is surfing the Internet. He would like to print out a web page for his school assignment.

  2. The network administrator has allocated Matt a printing credit budget of $10.00 a month. He can see his current account balance of $4.50 in the PaperCut Client Tool window.

    The user client tool

    Figure 1.1. The user client tool

  3. Matt prints the web page. 5 pages come out of the printer.

  4. The network administrator has set a cost-per-page inside PaperCut on the printer at $0.10. Matt's 5 page document costs $0.50.

  5. Matt's account balance is now at $4.00. He may continue to print until his account drops to zero.

The teacher's perspective (allocation to accounts):

  1. John is a science and mathematics teacher at the same local high school.

  2. John needs to print out a presentation consisting of 122 page science worksheet for his next class.

  3. The network administrator has granted John access to charge to either his personal account or to either the Science Department or Math Department's shared accounts.

  4. John presses the Print button in the application.

  5. The PaperCut client tool displays a popup and presents John with information about the print jobs and requests an account selection. In this case accounts represent Departments but could also represent projects or other work areas.

  6. John selects the science department's shared account from the list.

    The User Client account selection popup

    Figure 1.2. The User Client account selection popup

  7. The print job is charged to the science department's account.

The technical perspective (behind the scenes):

  1. When the teacher, John, prints his 150 page print jobs, his workstation transfers the print job to the server and places it in the print queue.

    The Windows print queue

    Figure 1.3. The Windows print queue

  2. The PaperCut Print Provider intercepts the print job in the queue prior to printing and analyzes the information determining:

    1. Who printed the document

    2. The number of pages in the document

    3. Other information such as duplex, grayscale mode, paper size, etc.

  3. The Print Provider submits the job's information to the Application Server to process the “business logic”.

  4. The Application Server determines that John needs to select the account to charge. It notifies the Client Software on John's desktop.

  5. The Client Software displays the Popup requesting the account.

  6. After John selects the client account, the Application Server is notified of John selection.

  7. The Application Server charges the appropriate account, logs the job and instructs the Print Provider to transfer the document onto the printer.

Architecture Overview

PaperCut NG was developed using the latest software development strategies, a strong influence being Service Oriented Architecture (SOA). The Print Provider, Application Server and Client Software all communication uses XML based web services over HTTP.

PaperCut NG Architecture - an advanced configuration

Figure 1.4. PaperCut NG Architecture - an advanced configuration

A more detailed explanation of the architecture and how it relates to a multi-server installation can be found in subsequent sections.

For information on the Internet Control module architecture see the section called “How Internet Control works”.