Common UNIX Printing System Sweet phần 4 doc

68 284 0
Common UNIX Printing System Sweet phần 4 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

< previous page page_162 next page > Page 162 Printer Operations IPP provides several operations that act on printer objects exclusively. Table 9.16 lists them. TABLE 9.16 Printer Operation Codes Code Name Description 0×000A Get-Jobs Get a list of print jobs. 0×000B Get-Printer-Attributes Get the attributes for a printer. 0×0010 Pause-Printer Temporarily stop a printer. 0×0011 Resume-Printer Resume printing on a printer. 0×0012 Purge-Jobs Cancel all jobs on a printer. 0×0013 Set-Printer-Attributes Change printer attributes. 0×0015 Get-Printer-Supported-Values Get supported printer attributes for the specified document format. 0×0022 Enable-Printer Allow new print jobs to be submitted to a printer. 0×0023 Disable-Printer Prevent new print jobs from being submitted to a printer. The Get-Jobs Operation The Get-Jobs operation returns a list of print jobs for the printer. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) The requested-attributes (1setOf type2 keyword) attribute can also be included to potentially limit the number of attributes returned, where each keyword represents an attribute name or group. The requesting-user-name (name(127)) attribute can be used to limit the list to those jobs submitted by that username. The limit (integer (1:MAX)) attribute can limit the maximum number of jobs that are returned. Finally, the which-jobs (type2 keyword) attribute specifies which jobs you are interested in. A value of completed means that you want information on completed print jobs, whereas a value of not-completed means that you want information on jobs that are pending, pending-held, processing, or processing- stopped. CUPS also supports a printer-uri value of ipp://ServerName/, which will return jobs for all printers and classes. < previous page page_162 next page > < previous page page_163 next page > Page 163 The Get-Printer-Attributes Operation The Get-Printer-Attributes operation returns the current printer attributes. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) The requested-attributes (1setOf type2 keyword) attribute can also be included to potentially limit the number of attributes returned, where each keyword represents an attribute name or group. The Pause-Printer Operation The Pause-Printer operation puts the specified printer object in the stopped state. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) For CUPS this operation must be initiated by a POST to the /admin resource, which will normally also require administrative authentication. The Resume-Printer Operation The Resume-Printer operation puts the specified printer object in the idle or processing states, depending on the existence of pending print jobs. Each request must contain atleast the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) For CUPS this operation must be initiated by a POST to the /admin resource, which will normally also require administrative authentication. The Purge-Jobs Operation The Purge-Jobs operation cancels all print jobs on the specified printer object. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) < previous page page_163 next page > < previous page page_164 next page > Page 164 For CUPS this operation must be initiated by a POST to the /admin resource, which will normally also require administrative authentication. CUPS will also purge the job history when using this operation. The Set-Printer-Attributes Operation The Set-Printer-Attributes operation sets the values of any read/write attribute on the specified printer object. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) Printer attributes that should be set must follow in the printer attribute group. CUPS does not currently support this operation. The Get-Printer-Supported-Values Operation The Get-Printer-Supported-Values operation returns the supported printer attribute values. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) CUPS does not support this operation. The Enable-Printer Operation The Enable-Printer operation sets the printer-is-accepting attribute for the specified printer object to true. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) For CUPS this operation must be initiated by a POST to the /admin resource, which will normally also require administrative authentication. Also see the identical (but earlier) operation CUPS-Accept-Jobs. < previous page page_164 next page > < previous page page_165 next page > Page 165 The Disable-Printer Operation The Disable-Printer operation sets the printer-is-accepting attribute for the specified printer object to false. Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) For CUPS this operation must be initiated by a POST to the /admin resource, which will normally also require administrative authentication. Also see the identical (but earlier) operation CUPS-Reject-Jobs. Summary IPP printer objects manage a single printer or class of printers. Each object has an associated state and collection of print jobs destined for that printer. Every printer object has a common set of required attributes as well as several optional printer-specific attributes. Printers that are served by CUPS have several additional extension attributes that define how the printer object is connected to the device or other printers. IPP provides many operations to control printer objects. These operations control the state of the printer object as well as default values for some printer attributes. < previous page page_165 next page > < previous page page_166 next page > Page 166 This page intentionally left blank. < previous page page_166 next page > < previous page page_167 next page > Page 167 CHAPTER 10 Job Objects < previous page page_167 next page > < previous page page_168 next page > Page 168 This chapter describes the attributes and operations provided for IPP job objects. What Is a Job Object? A job object represents one or more documents that are queued for printing on a printer object. A job object can also have subscription objects associated with it. Each job object is always in one of the seven states shown in Table 10.1. Pending jobs are printed using the priority values and order they were submitted. TABLE 10.1 Job States Value Name Description 3 pending The job is waiting to be printed. 4 pending-held The job is waiting to be printed once the hold condition is satsified. 5 processing The job is currently being processed or printed. 6 processing-stopped The job was stopped while it was being processed or printed. 7 canceled The job was cancelled by a user or administrator. 8 aborted The job was aborted by the system due to a processing error. This is different than the processing-stopped state because a stopped job can always be restarted. 9 completed The job was completely processed and printed successfully. Jobs are also associated with a username, which can be authenticated. This allows the enduser to list and cancel their own jobs, or an administrator to list and cancel all jobs. Required Attributes Each job includes several required attributes, which are listed in Table 10.2. TABLE 10.2 Required Job Attributes Name Type Description attributes-charset charset The character set used for the job attributes-natural-language naturalLanguage The language used for the job job-id integer (1:MAX) The job object number job-name name(MAX) The name or title of the job job-originating-user-name name(MAX) The owner of the job job-printer-up-time integer(1:MAX) The current printer-up-time value for the printer < previous page page_168 next page > < previous page page_169 next page > Page 169 job-printer-uri uri The URI for the printer object to which this job belongs job-state type1 enum The current job state job-state-reasons 1setOf type2 keyword Detailed reason codes for the job job-uri uri The URI for the job object time-at-completed integer(MIN:MAX) The printer-up-time when the job was completed, aborted, or cancelled time-at-creation integer(MIN:MAX) The printer-up-time when the job was created time-at-processing integer(MIN:MAX) The printer-up-time when the job was processed The attributes-charset Attribute The attributes-charset attribute specifies the character set to use for the job and request. The attributes-natural-language Attribute The attributes-natural-language attribute specifies the language to use for the job and request. The job-id Attribute The job-id attribute is used to identify a print job. The job-name Attribute The job-name attribute specifies the name or title of the job. The job-originating-user-name Attribute The job-originating-user-name attribute specifies the owner of the job. This is a mirror of the requesting- user-name attribute provided in the original Create-Job, Print-Job, or Print-URI operations. The job-printer-up-time Attribute The job-printer-up-time attribute provides the current printer-up-time value for the printer associated with the job. < previous page page_169 next page > < previous page page_170 next page > Page 170 The job-printer-uri Attribute The job-printer-uri attribute provides the URI for the printer object associated with the job. The job-state Attribute The job-state attribute specifies the current job state, which can be one of the values listed in Table 10-1. The job-state-reasons Attribute The job-state-reasons attribute is an array of reason keywords that describes a detailed reason for the current job state. Table 10.3 lists the supported reason strings. TABLE 10.3 Job State Reason Strings String Description none There is no reason for the current state. aborted-by-system The job was aborted by the system and placed in the aborted state. compression-error One or more documents contain an error in the compressed data. document-access-error The specified URI cannot be accessed. document-format-error One or more documents contain errors that prevent them from being printed. job-canceled-at-device The job was cancelled at the device. job-canceled-by-operator The job was cancelled by the printer operator. job-canceled-by-user The job was cancelled by the user. job-completed-successfully The job was completed successfully. job-completed-with-errors The job completed with some errors. job-completed-with-warnings The job completed with some warnings. job-data-insufficient No document data has been received. job-hold-until-specified The job is currently held due to a job-hold-until attribute. job-incoming The document files are currently being received from the client. job-interpreting The job is currently being interpreted/RIPd. job-outgoing The job is currently being sent to the printer. job-printing The job is currently printing. job-queued The job has been queued for printing. job-queued-for-marker The job is ready to print but the printer needs ink/marker/toner. job-restartable The job can be restarted. job-transforming The job is being transformed into a different format. < previous page page_170 next page > < previous page page_171 next page > Page 171 printer-stopped The printer is stopped. printer-stopped-partly The printer-state-reasons attribute contains the stopped-partly reason. processing-to-stop-point The job has been cancelled but is printing any remaining pages on the printer that have already been processed. queued-in-device The job has been queued on the output device. resources-are-not-ready One or more resources (media, fonts, and so forth) are not available to print the job. service-off-line The job is being held because the printer is offline. submission-interrupted One or more document files were not received in full. unsupported-compression One or more documents in the job are compressed using an unknown algorithm. unsupported-document-format One or more documents are in an unsupported format. The job-uri Attribute The job-uri attribute provides the URI for the job object. For CUPS the job-uri will look like ipp://ServerName/jobs/JobID where ServerName is the name of the server and JobID is the value of the job-id attribute. The time-at-completed Attribute The time-at-completed attribute specifies the printer-up-time when the job was completed, aborted, or cancelled. For CUPS the time-at-completed value is the Unix time value in seconds since January 1, 1970. The time-at-creation Attribute The time-at-creation attribute specifies the printer-up-time when the job was created. For CUPS the time-at-completed value is the Unix time value in seconds since January 1, 1970. < previous page page_171 next page > [...]... The multiple-document-handling Attribute The multiple-document-handling attribute specifies how to handle copies of documents Essentially this attribute controls whether copies are collated CUPS supports the multiple-documents-collated-copies and multiple-document-uncollated-copies values The number-of-documents Attribute The number-of-documents attribute provides the total number of document files... and job-id (integer) or job-uri (uri) requesting-user-name (name) last-document (boolean) document-uri (uri) The document-uri attribute specifies the URL for the remote document file The IPP response will contain a success or failure code for the document The last-document attribute specifies whether this document file is the last document in the job < previous page page_185 next page > < previous page... attribute specifies which pages in the job to print The page ranges in the set must be unique and apply to all documents in the job For example, if you specify a page-ranges attribute with a value of 1 4, pages 1 4 will be printed in each document and not just the first 4 pages of the first document CUPS prints page ranges in ascending order, so specifying a page-ranges attribute with the values 7–8... inch when printing text files page-bottom integer (0:MAX) The bottom margin in points when printing text files page-label text(MAX) A label to show at the top and bottom of each printed page page-left integer (0:MAX) The left margin in points when printing text files page-right integer 0:MAX) The right margin in points when printing text files page-set type2 keyword The pages to print in each document... keyword | name The media size, type, or source multiple-document-handling type2 keyword How to handle copies of documents number-of-documents integer (0:MAX) The number of document files in the job number-of-intervening-jobs integer (0:MAX) The number of jobs that are scheduled to print before this one number-up integer (1:MAX) The number of document pages to place on each output page orientation-requested... job object The Send-Document Operation The Send-Document operation adds a single file to an existing print job Each request must contain at least the following attributes in the operation group: attributes-charset (charset) attributes-natural-language (naturalLanguage) printer-uri (uri) and job-id (integer) or job-uri (uri) requesting-user-name (name) last-document (boolean) The document file immediately... last-document (boolean) The document file immediately follows the IPP request data in the HTTP POST The IPP response will contain a success or failure code for the document The last-document attribute specifies whether this document file is the last document in the job The Send-URI Operation The Send-URI operation adds a single remote file to an existing print job Each request must contain at least the following... empty print job 0×0006 Send-Document Add a single file to an existing print job 0×0007 Send-URI Add a single URI to an existing print job 0×0008 Cancel-Job Cancel a print job 0×0009 Get-Job-Attributes Get the attributes for a print job 0×000C Hold-Job Hold a print job 0×000D Release-Job Release a print job for printing 0×000E Restart-Job Restart the printing of a print job 0×00 14 Set-Job-Attributes Change... printer-up-time when the job entered the processing state For CUPS the time-at-completed value is the Unix time value in seconds since January 1, 1970 Optional Attributes Most of the optional attributes are job template attributes used when submitting print jobs Table 10 .4 lists the optional job attributes TABLE 10 .4 Optional Job Attributes Name Type Description copies integer (1:MAX) The number of copies for... human-readable text messages concerning the current status of the job CUPS does not provide this attribute The job-document-access-errors Attribute The job-document-access-errors attribute provides a list of human-readable text message concerning any access errors that were encountered when retrieving a remote document submitted using the Print-URI or Send-URI operations CUPS 1.1 does not provide this attribute . all documents in the job. For example, if you specify a page-ranges attribute with a value of 1 4, pages 1 4 will be printed in each document and not just the first 4 pages of the first document. CUPS. the multiple-documents-collated-copies and multiple-document-uncollated-copies values. The number-of-documents Attribute The number-of-documents attribute provides the total number of document files. media size, type, or source multiple-document-handling type2 keyword How to handle copies of documents number-of-documents integer (0:MAX) The number of document files in the job number-of-intervening-jobs

Ngày đăng: 08/08/2014, 21:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan