Importing print job details
You can import print jobs that have been tracked by external or third party systems into PaperCut MF. This could be because the external system is not easily tracked directly, or to import data that was previously tracked for logging and reporting purposes.
Job details can be imported using the server-command scripting tool (process-job command, see Server commands (server-command)) or using the web servicesWeb services are a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. APIApplication Programming Interface (API) is a set of routines, protocols, and tools for building software and applications. An API expresses a software component in terms of its operations, inputs, outputs, and underlying types, defining functionalities that are independent of their respective implementations, which allows definitions and implementations to vary without compromising the interface. (api.processJob call, see The XML Web Services API). To import multiple jobs in a batch, run the command/call multiples times (e.g. via a script or program).
The server-command and web services call accept a single argument (string) containing all the job details. Each field is specified as a name-value pair separated by an equals sign (i.e. name=value), and fields are separated by commas.
For example, to process a job and specify the user, printer server and printer name (the minimum required details):
user=bob,server=papercut,printer=My Printer
If any fields contain a comma, surround the name-value pair with quotation marks ("). E.g. for a printer named Library, rear:
user=bob,server=papercut,"printer=Library, rear"
Spreadsheet applications such as Excel with automatically add quotation marks as above when saving a document in CSV format.If any fields contain quotation marks, escape them by adding another quotation mark, i.e. two in a row. E.g. for a printer named "John Smith" Library:
user=bob,server=papercut,printer=""John Smith"" Library
The names of all the available fields are listed in the table below.
Field | Required | Description | Default |
---|---|---|---|
user | Yes | The username of the user associated with the job. | N/A |
server | Yes | The name of the server the job was submitted to. | N/A |
printer | Yes | The name of the printer or 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. the job was submitted to. | N/A |
time | No | The time the job was submitted/printed. This is formatted as an ISO8601 simple date-time: yyyyMMddTHHmmss. E.g. "20091224T133602" represents the 24th of December 2009 at 13:36:02 (1:36 pm, local time). | (current time) |
cost | No | The cost of the job. If the cost is not set it is automatically calculated as for a normal job (based on the job details and configuration of the printer, user etc.). | (auto) |
total-pages | No | The total number of pages in the job. | 1 |
total-color-pages | No | The total number of color pages in the job. | (same as total-pages) |
copies | No | The number of copies in the job. | 1 |
document-name | No | The document name. | (empty) |
duplex | No | TRUE or FALSE to indicate if the job is duplex (printed on both sides) | FALSE |
grayscale | No | TRUE or FALSE to indicate if the job is grayscale (no color) | FALSE |
job-type | No | The type of job to import. Options include: COPY, FAX, PRINT, SCAN. | |
paper-size-name | No | The name of a standard paper size, e.g. "Letter" or "A4". | (empty) |
paper-width-mm | No | The width of the paper in millimeters. Determined automatically if using paper-size-name. | (empty) |
paper-height-mm | No | The height of the paper in millimeters. Determined automatically if using paper-size-name. | (empty) |
document-size-kb | No | The size of the document's 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. in kilobytes. | 0 |
invoice | No | TRUE to mark the job as invoiced, FALSE to mark as not invoiced. The default value is determined automatically, as for a regular job. | (auto) |
comment | No | A comment to be associated with the job. | (empty) |
client-machine | No | The hostname of the client machine the job was submitted from. | (empty) |
client-ip | No | The IP address of the client machine the job was submitted from. | (empty) |
shared-account | No | The name of the shared accountA shared account is an account that is shared by multiple users. For example, in business, shared accounts can be used to track printing costs by business unit, project, or client. Organizations like legal firms, engineering firms, or accounting offices often have long lists of accounts, projects, clients, or matters. In a school or university, shared accounts can be used to track printing by departments, classes, or subjects. to charge this job to. Sub-accounts can be selected using a backslash, i.e. "parent\child". | (empty) |