| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| <html> | |
| <head> | |
| <title>javax.print.attribute.standard package</title> | |
| <!-- | |
| Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. | |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
| This code is free software; you can redistribute it and/or modify it | |
| under the terms of the GNU General Public License version 2 only, as | |
| published by the Free Software Foundation. Oracle designates this | |
| particular file as subject to the "Classpath" exception as provided | |
| by Oracle in the LICENSE file that accompanied this code. | |
| This code is distributed in the hope that it will be useful, but WITHOUT | |
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| version 2 for more details (a copy is included in the LICENSE file that | |
| accompanied this code). | |
| You should have received a copy of the GNU General Public License version | |
| 2 along with this work; if not, write to the Free Software Foundation, | |
| Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
| Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
| or visit www.oracle.com if you need additional information or have any | |
| questions. | |
| --> | |
| </head> | |
| <body bgcolor="white"> | |
| Package javax.print.attribute.standard | |
| contains classes for specific printing attributes. | |
| The parent package, | |
| <A HREF="../package-summary.html"> | |
| javax.print.attribute</A>, | |
| provides classes and interfaces that describe the types of Java | |
| Print Service attributes and how they can be collected into attribute | |
| sets. | |
| <P> | |
| An attribute represents a printing feature | |
| that a print service can provide. | |
| For each attribute, | |
| a print service either does or does not support the attribute. | |
| For each possible value of a supported attribute, | |
| a print service either does or does not support the value. | |
| <P> | |
| The API requires every print service | |
| to support certain attributes; | |
| other attributes are optional | |
| and the service can choose whether or not to support them. | |
| Each attribute has a set of values that it accepts. The API | |
| requires every print service to support certain values for | |
| certain attributes; | |
| other attribute values are optional | |
| and the service can choose whether or not to support them. | |
| These support requirements are recorded in the documentation | |
| for each attribute class. | |
| <P> | |
| Package javax.print.attribute.standard | |
| contains standard printing attributes | |
| and standard printing attribute values | |
| that are widely used in the printing domain. | |
| A print service vendor | |
| can provide new vendor-specific printing attributes | |
| in addition to the standard ones. | |
| A vendor can also provide | |
| vendor-specific extensions (subclasses) | |
| of the standard printing attributes -- | |
| for example, | |
| to provide additional vendor-specific values | |
| for an existing standard attribute. | |
| Of course, | |
| if a vendor wants clients | |
| to be able to use any added or extended attributes, | |
| the vendor must publish the new attribute classes. | |
| <P> | |
| Many of the standard attribute classes extend one of | |
| the abstract syntax classes of the javax.print.attribute package. | |
| These abstract syntax classes each represent a | |
| different type. The <a href="../EnumSyntax.html"> | |
| EnumSyntax</a> class, for example, represents a type-safe | |
| enumeration. The abstract syntax class provides a wrapper for the attribute | |
| value. | |
| <p> | |
| If an attribute class extends <code>EnumSyntax</code>, and the value of the | |
| attribute is an IPP-compatible value, the attribute's <code>toString</code> | |
| method returns the IPP string representation of the attribute value, such as | |
| "processing-stopped" for the | |
| <a href="JobState.html">JobState</a> attribute. However, because the | |
| <code>EnumSyntax</code> class is extensible, vendors can define their own | |
| attribute values. If an attribute uses the <code>EnumSyntax</code> class | |
| and is set to one of these vendor-defined values then the <code>toString</code> | |
| method will not return the IPP string representation of the value. | |
| <p> | |
| A printing client application | |
| will typically not need to use | |
| all the printing attribute classes | |
| in package javax.print.attribute.standard, | |
| just the ones that pertain to the application. | |
| <P> | |
| The attribute classes in package javax.print.attribute.standard | |
| are based on the Internet Printing Protocol (IPP) attributes | |
| as defined in the Internet RFC document, | |
| <I>RFC 2911 Internet Printing Protocol/1.1: Model and Semantics</I> | |
| dated September 2000. | |
| See <a HREF="http://www.ietf.org/rfc/rfc2911.txt">RFC 2911</a> | |
| for more information. | |
| The descriptive text for each attribute class | |
| was taken largely from the above documents. | |
| The above authors' contribution to the API | |
| is gratefully acknowledged. | |
| <H3>Attribute Organization</H3> | |
| There are five kinds of printing attributes: | |
| doc attributes, | |
| print request attributes, | |
| print job attributes, | |
| print service attributes, | |
| and supported-values attributes. | |
| <H4>Doc Attributes</H4> | |
| Doc attributes specify the characteristics of an individual doc | |
| and the print job settings to be applied to an individual doc. | |
| A doc attribute class implements interface | |
| <A HREF="../DocAttribute.html">DocAttribute</A>. | |
| A doc attribute can appear in a | |
| <a href="../DocAttributeSet.html"> | |
| DocAttributeSet</a>. | |
| <H4>Print Request Attributes</H4> | |
| Print request attributes | |
| specify the settings to be applied to a whole print job | |
| and to all the docs in the print job. | |
| A print request attribute class implements interface | |
| <A HREF="../PrintRequestAttribute.html"> | |
| PrintRequestAttribute</A>. | |
| A print request attribute can appear in a | |
| <a href="../PrintRequestAttributeSet.html"> | |
| PrintRequestAttributeSet</a>. | |
| <P> | |
| Some attributes are doc attributes | |
| but not print request attributes | |
| and may only be specified at the doc level. | |
| Some attributes are print request attributes | |
| but not doc attributes | |
| and may only be specified at the Print Request level. | |
| Some attributes are both doc attributes | |
| and print request attributes | |
| and may be specified either at the doc level | |
| or at the Print Request level. | |
| <P> | |
| When specified at the doc level, | |
| an attribute applies just to that one doc. | |
| When specified at the Print Request level, | |
| an attribute applies to the whole job, | |
| including all the docs in the job. | |
| However, an attribute specified at the doc level | |
| overrides an attribute in the same category | |
| specified at the Print Request level. | |
| <H4>Print Job Attributes</H4> | |
| Print job attributes report the status of a Print Job. | |
| A print job attribute class implements interface | |
| <A HREF="../PrintJobAttribute.html">PrintJobAttribute</A>. | |
| A print job attribute | |
| can appear in a <A HREF="../PrintJobAttributeSet.html"> | |
| PrintJobAttributeSet</A>. | |
| <P> | |
| Some attributes are both print request attributes | |
| and print job attributes; | |
| a client may include such attributes in a Print Request | |
| to specify characteristics for the ensuing Print Job, | |
| and those attributes then also appear | |
| in the Print Job's attribute set. | |
| Some attributes are print job attributes | |
| but not print request attributes; | |
| the print service itself | |
| adds these attributes to the Print Job's attribute set. | |
| <H4>Print Service Attributes</H4> | |
| Print service attributes report the status | |
| of a print service. | |
| A print service attribute class implements interface | |
| <A HREF="../PrintServiceAttribute.html"> | |
| PrintServiceAttribute</A>. | |
| A print service attribute | |
| can appear in a <A HREF="../PrintServiceAttributeSet.html"> | |
| PrintServiceAttributeSet</A>. | |
| <H4>Supported-Values Attributes</H4> | |
| A supported-value attribute | |
| indicates the legal values for another attribute | |
| that a print service supports. | |
| A supported-values attribute class implements interface | |
| <A HREF="../SupportedValuesAttribute.html"> | |
| SupportedValuesAttribute</A>. | |
| However, supported-values attributes | |
| never appear in attribute sets, | |
| so there is no restricted <A HREF="../AttributeSet.html"> | |
| AttributeSet</A> | |
| subinterface for them. | |
| <H4>Attribute Table</H4> | |
| The table below lists all the printing attributes. | |
| The table shows the tagging interfaces | |
| each attribute class implements | |
| in addition to interface <A HREF="../Attribute.html"> | |
| Attribute</A>, | |
| thus indicating how each attribute is used in the API. | |
| For each doc attribute and print request attribute, | |
| the column marked "SupportedValuesAttribute" | |
| lists the supported-values attribute class, if any, | |
| with which a print service | |
| indicates the supported values for that attribute category. | |
| <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Lists all printing attributes as described in above text"> | |
| <TR BGCOLOR="#E5E5E5"> | |
| <TH VALIGN="bottom">Attribute Class</TH> | |
| <TH VALIGN="bottom">Doc<BR>Attribute</TH> | |
| <TH VALIGN="bottom">Print<BR>Request<BR>Attribute</TH> | |
| <TH VALIGN="bottom">Print<BR>Job<BR>Attribute</TH> | |
| <TH VALIGN="bottom">Print<BR>Service<BR>Attribute</TH> | |
| <TH VALIGN="bottom">SupportedValuesAttribute</TH> | |
| </TR> | |
| <TR><TD><A HREF="Compression.html">Compression</A></TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="DocumentName.html">DocumentName</A></TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="Chromaticity.html">Chromaticity</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="Copies.html">Copies</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD><A HREF="CopiesSupported.html">CopiesSupported</A></TD></TR> | |
| <TR><TD><A HREF="Finishings.html">Finishings</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobHoldUntil.html">JobHoldUntil</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobImpressions.html">JobImpressions</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD><A HREF="JobImpressionsSupported.html">JobImpressionsSupported</A></TD></TR> | |
| <TR><TD><A HREF="JobKOctets.html">JobKOctets</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD><A HREF="JobKOctetsSupported.html">JobKOctetsSupported</A></TD></TR> | |
| <TR><TD><A HREF="JobMediaSheets.html">JobMediaSheets</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD><A HREF="JobMediaSheetsSupported.html">JobMediaSheetsSupported</A></TD></TR> | |
| <TR><TD><A HREF="JobName.html">JobName</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobPriority.html">JobPriority</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD><A HREF="JobPrioritySupported.html">JobPrioritySupported</A></TD></TR> | |
| <TR><TD><A HREF="JobSheets.html">JobSheets</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="Media.html">Media</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="MediaSize.html">MediaSize</A></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="MultipleDocumentHandling.html">MultipleDocumentHandling</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="NumberUp.html">NumberUp</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD><A HREF="NumberUpSupported.html">NumberUpSupported</A></TD></TR> | |
| <TR><TD><A HREF="OrientationRequested.html">OrientationRequested</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PageRanges.html">PageRanges</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PresentationDirection.html">PresentationDirection</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterResolution.html">PrinterResolution</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrintQuality.html">PrintQuality</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="RequestingUserName.html">RequestingUserName</A></TD><TD> </TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="SheetCollate.html">SheetCollate</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="Sides.html">Sides</A></TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="DateTimeAtCompleted.html">DateTimeAtCompleted</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="DateTimeAtCreation.html">DateTimeAtCreation</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="DateTimeAtProcessing.html">DateTimeAtProcessing</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobImpressionsCompleted.html">JobImpressionsCompleted</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobKOctetsProcessed.html">JobKOctetsProcessed</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobMediaSheetsCompleted.html">JobMediaSheetsCompleted</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobMessageFromOperator.html">JobMessageFromOperator</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobOriginatingUserName.html">JobOriginatingUserName</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobState.html">JobState</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="JobStateReasons.html">JobStateReasons</A><BR>Contains zero or more --</TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD>-- <A HREF="JobStateReason.html">JobStateReason</A></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="NumberOfDocuments.html">NumberOfDocuments</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="NumberOfInterveningJobs.html">NumberOfInterveningJobs</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="OutputDeviceAssigned.html">OutputDeviceAssigned</A></TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="ColorSupported.html">ColorSupported</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PagesPerMinute.html">PagesPerMinute</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PagesPerMinuteColor.html">PagesPerMinuteColor</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PDLOverrideSupported.html">PDLOverrideSupported</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterIsAcceptingJobs.html">PrinterIsAcceptingJobs</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterInfo.html">PrinterInfo</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterLocation.html">PrinterLocation</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterMessageFromOperator.html">PrinterMessageFromOperator</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterMakeAndModel.html">PrinterMakeAndModel</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterMoreInfo.html">PrinterMoreInfo</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterMoreInfoManufacturer.html">PrinterMoreInfoManufacturer</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterName.html">PrinterName</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterState.html">PrinterState</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="PrinterStateReasons.html">PrinterStateReasons</A><BR>Contains zero or more --</TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD>-- <A HREF="PrinterStateReason.html">PrinterStateReason</A></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD>-- <A HREF="Severity.html">Severity</A></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| <TR><TD><A HREF="QueuedJobCount.html">QueuedJobCount</A></TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">X</TD><TD> </TD></TR> | |
| <TR><TD><A HREF="ReferenceUriSchemesSupported.html">ReferenceUriSchemesSupported</A></TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR> | |
| </TABLE> | |
| <P> | |
| Please note: In the javax.print APIs, a null reference parameter to methods | |
| is incorrect unless explicitly documented on the method as having a meaningful | |
| interpretation. Usage to the contrary is incorrect coding and may result | |
| in a run time exception either immediately or at some later time. | |
| IllegalArgumentException and NullPointerException are examples of | |
| typical and acceptable run time exceptions for such cases. | |
| <P> | |
| @since 1.4 | |
| </body> | |
| </html> |