blob: 6459b806df10d8c84e0667d7a1ffeabcd479ed58 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001<html>
2<head>
3<title>javax.print.attribute.standard package</title>
4<!--
5Copyright 2000-2003 Sun Microsystems, Inc. All Rights Reserved.
6DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7
8This code is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License version 2 only, as
10published by the Free Software Foundation. Sun designates this
11particular file as subject to the "Classpath" exception as provided
12by Sun in the LICENSE file that accompanied this code.
13
14This code is distributed in the hope that it will be useful, but WITHOUT
15ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17version 2 for more details (a copy is included in the LICENSE file that
18accompanied this code).
19
20You should have received a copy of the GNU General Public License version
212 along with this work; if not, write to the Free Software Foundation,
22Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23
24Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
25CA 95054 USA or visit www.sun.com if you need additional information or
26have any questions.
27-->
28</head>
29<body bgcolor="white">
30Package javax.print.attribute.standard
31contains classes for specific printing attributes.
32The parent package,
33<A HREF="../package-summary.html">
34javax.print.attribute</A>,
35provides classes and interfaces that describe the types of Java
36Print Service attributes and how they can be collected into attribute
37sets.
38<P>
39An attribute represents a printing feature
40that a print service can provide.
41For each attribute,
42a print service either does or does not support the attribute.
43For each possible value of a supported attribute,
44a print service either does or does not support the value.
45<P>
46The API requires every print service
47to support certain attributes;
48other attributes are optional
49and the service can choose whether or not to support them.
50Each attribute has a set of values that it accepts. The API
51requires every print service to support certain values for
52certain attributes;
53other attribute values are optional
54and the service can choose whether or not to support them.
55These support requirements are recorded in the documentation
56for each attribute class.
57<P>
58Package javax.print.attribute.standard
59contains standard printing attributes
60and standard printing attribute values
61that are widely used in the printing domain.
62A print service vendor
63can provide new vendor-specific printing attributes
64in addition to the standard ones.
65A vendor can also provide
66vendor-specific extensions (subclasses)
67of the standard printing attributes --
68for example,
69to provide additional vendor-specific values
70for an existing standard attribute.
71Of course,
72if a vendor wants clients
73to be able to use any added or extended attributes,
74the vendor must publish the new attribute classes.
75<P>
76Many of the standard attribute classes extend one of
77the abstract syntax classes of the javax.print.attribute package.
78These abstract syntax classes each represent a
79different type. The <a href="../EnumSyntax.html">
80EnumSyntax</a> class, for example, represents a type-safe
81enumeration. The abstract syntax class provides a wrapper for the attribute
82value.
83<p>
84If an attribute class extends <code>EnumSyntax</code>, and the value of the
85attribute is an IPP-compatible value, the attribute's <code>toString</code>
86method returns the IPP string representation of the attribute value, such as
87"processing-stopped" for the
88<a href="JobState.html">JobState</a> attribute. However, because the
89<code>EnumSyntax</code> class is extensible, vendors can define their own
90attribute values. If an attribute uses the <code>EnumSyntax</code> class
91and is set to one of these vendor-defined values then the <code>toString</code>
92 method will not return the IPP string representation of the value.
93<p>
94A printing client application
95will typically not need to use
96all the printing attribute classes
97in package javax.print.attribute.standard,
98just the ones that pertain to the application.
99<P>
100The attribute classes in package javax.print.attribute.standard
101are based on the Internet Printing Protocol (IPP) attributes
102as defined in the Internet RFC document,
103<I>RFC 2911 Internet Printing Protocol/1.1: Model and Semantics</I>
104dated September 2000.
105See <a HREF="http://www.ietf.org/rfc/rfc2911.txt">RFC 2911</a>
106for more information.
107The descriptive text for each attribute class
108was taken largely from the above documents.
109The above authors' contribution to the API
110is gratefully acknowledged.
111
112<H3>Attribute Organization</H3>
113There are five kinds of printing attributes:
114doc attributes,
115print request attributes,
116print job attributes,
117print service attributes,
118and supported-values attributes.
119
120<H4>Doc Attributes</H4>
121Doc attributes specify the characteristics of an individual doc
122and the print job settings to be applied to an individual doc.
123A doc attribute class implements interface
124<A HREF="../DocAttribute.html">DocAttribute</A>.
125A doc attribute can appear in a
126<a href="../DocAttributeSet.html">
127DocAttributeSet</a>.
128
129<H4>Print Request Attributes</H4>
130Print request attributes
131specify the settings to be applied to a whole print job
132and to all the docs in the print job.
133A print request attribute class implements interface
134<A HREF="../PrintRequestAttribute.html">
135PrintRequestAttribute</A>.
136A print request attribute can appear in a
137<a href="../PrintRequestAttributeSet.html">
138PrintRequestAttributeSet</a>.
139
140<P>
141Some attributes are doc attributes
142but not print request attributes
143and may only be specified at the doc level.
144Some attributes are print request attributes
145but not doc attributes
146and may only be specified at the Print Request level.
147Some attributes are both doc attributes
148and print request attributes
149and may be specified either at the doc level
150or at the Print Request level.
151<P>
152When specified at the doc level,
153an attribute applies just to that one doc.
154When specified at the Print Request level,
155an attribute applies to the whole job,
156including all the docs in the job.
157However, an attribute specified at the doc level
158overrides an attribute in the same category
159specified at the Print Request level.
160
161<H4>Print Job Attributes</H4>
162Print job attributes report the status of a Print Job.
163A print job attribute class implements interface
164<A HREF="../PrintJobAttribute.html">PrintJobAttribute</A>.
165A print job attribute
166can appear in a <A HREF="../PrintJobAttributeSet.html">
167PrintJobAttributeSet</A>.
168<P>
169Some attributes are both print request attributes
170and print job attributes;
171a client may include such attributes in a Print Request
172to specify characteristics for the ensuing Print Job,
173and those attributes then also appear
174in the Print Job's attribute set.
175Some attributes are print job attributes
176but not print request attributes;
177the print service itself
178adds these attributes to the Print Job's attribute set.
179
180<H4>Print Service Attributes</H4>
181Print service attributes report the status
182of a print service.
183A print service attribute class implements interface
184<A HREF="../PrintServiceAttribute.html">
185PrintServiceAttribute</A>.
186A print service attribute
187can appear in a <A HREF="../PrintServiceAttributeSet.html">
188PrintServiceAttributeSet</A>.
189
190<H4>Supported-Values Attributes</H4>
191A supported-value attribute
192indicates the legal values for another attribute
193that a print service supports.
194A supported-values attribute class implements interface
195<A HREF="../SupportedValuesAttribute.html">
196SupportedValuesAttribute</A>.
197However, supported-values attributes
198never appear in attribute sets,
199so there is no restricted <A HREF="../AttributeSet.html">
200AttributeSet</A>
201subinterface for them.
202<P>
203
204<H4>Attribute Table</H4>
205The table below lists all the printing attributes.
206The table shows the tagging interfaces
207each attribute class implements
208in addition to interface <A HREF="../Attribute.html">
209Attribute</A>,
210thus indicating how each attribute is used in the API.
211For each doc attribute and print request attribute,
212the column marked "SupportedValuesAttribute"
213lists the supported-values attribute class, if any,
214with which a print service
215indicates the supported values for that attribute category.
216<P>
217<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Lists all printing attributes as described in above text">
218<TR BGCOLOR="#E5E5E5">
219<TH VALIGN="bottom">Attribute Class</TH>
220<TH VALIGN="bottom">Doc<BR>Attribute</TH>
221<TH VALIGN="bottom">Print<BR>Request<BR>Attribute</TH>
222<TH VALIGN="bottom">Print<BR>Job<BR>Attribute</TH>
223<TH VALIGN="bottom">Print<BR>Service<BR>Attribute</TH>
224<TH VALIGN="bottom">SupportedValuesAttribute</TH>
225</TR>
226<TR><TD><A HREF="Compression.html">Compression</A></TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
227<TR><TD><A HREF="DocumentName.html">DocumentName</A></TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
228<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
229<TR><TD><A HREF="Copies.html">Copies</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD><A HREF="CopiesSupported.html">CopiesSupported</A></TD></TR>
230<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
231<TR><TD><A HREF="JobHoldUntil.html">JobHoldUntil</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
232<TR><TD><A HREF="JobImpressions.html">JobImpressions</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD><A HREF="JobImpressionsSupported.html">JobImpressionsSupported</A></TD></TR>
233<TR><TD><A HREF="JobKOctets.html">JobKOctets</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD><A HREF="JobKOctetsSupported.html">JobKOctetsSupported</A></TD></TR>
234<TR><TD><A HREF="JobMediaSheets.html">JobMediaSheets</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD><A HREF="JobMediaSheetsSupported.html">JobMediaSheetsSupported</A></TD></TR>
235<TR><TD><A HREF="JobName.html">JobName</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
236<TR><TD><A HREF="JobPriority.html">JobPriority</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD><A HREF="JobPrioritySupported.html">JobPrioritySupported</A></TD></TR>
237<TR><TD><A HREF="JobSheets.html">JobSheets</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
238<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
239<TR><TD><A HREF="MediaSize.html">MediaSize</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
240<TR><TD><A HREF="MultipleDocumentHandling.html">MultipleDocumentHandling</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
241<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>&nbsp;</TD><TD><A HREF="NumberUpSupported.html">NumberUpSupported</A></TD></TR>
242<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
243<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
244<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
245<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
246<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
247<TR><TD><A HREF="RequestingUserName.html">RequestingUserName</A></TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
248<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
249<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>&nbsp;</TD><TD>&nbsp;</TD></TR>
250<TR><TD><A HREF="DateTimeAtCompleted.html">DateTimeAtCompleted</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
251<TR><TD><A HREF="DateTimeAtCreation.html">DateTimeAtCreation</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
252<TR><TD><A HREF="DateTimeAtProcessing.html">DateTimeAtProcessing</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
253<TR><TD><A HREF="JobImpressionsCompleted.html">JobImpressionsCompleted</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
254<TR><TD><A HREF="JobKOctetsProcessed.html">JobKOctetsProcessed</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
255<TR><TD><A HREF="JobMediaSheetsCompleted.html">JobMediaSheetsCompleted</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
256<TR><TD><A HREF="JobMessageFromOperator.html">JobMessageFromOperator</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
257<TR><TD><A HREF="JobOriginatingUserName.html">JobOriginatingUserName</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
258<TR><TD><A HREF="JobState.html">JobState</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
259<TR><TD><A HREF="JobStateReasons.html">JobStateReasons</A><BR>Contains zero or more --</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
260<TR><TD>-- <A HREF="JobStateReason.html">JobStateReason</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
261<TR><TD><A HREF="NumberOfDocuments.html">NumberOfDocuments</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
262<TR><TD><A HREF="NumberOfInterveningJobs.html">NumberOfInterveningJobs</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
263<TR><TD><A HREF="OutputDeviceAssigned.html">OutputDeviceAssigned</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
264<TR><TD><A HREF="ColorSupported.html">ColorSupported</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
265<TR><TD><A HREF="PagesPerMinute.html">PagesPerMinute</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
266<TR><TD><A HREF="PagesPerMinuteColor.html">PagesPerMinuteColor</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
267<TR><TD><A HREF="PDLOverrideSupported.html">PDLOverrideSupported</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
268<TR><TD><A HREF="PrinterIsAcceptingJobs.html">PrinterIsAcceptingJobs</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
269<TR><TD><A HREF="PrinterInfo.html">PrinterInfo</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
270<TR><TD><A HREF="PrinterLocation.html">PrinterLocation</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
271<TR><TD><A HREF="PrinterMessageFromOperator.html">PrinterMessageFromOperator</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
272<TR><TD><A HREF="PrinterMakeAndModel.html">PrinterMakeAndModel</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
273<TR><TD><A HREF="PrinterMoreInfo.html">PrinterMoreInfo</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
274<TR><TD><A HREF="PrinterMoreInfoManufacturer.html">PrinterMoreInfoManufacturer</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
275<TR><TD><A HREF="PrinterName.html">PrinterName</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
276<TR><TD><A HREF="PrinterState.html">PrinterState</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
277<TR><TD><A HREF="PrinterStateReasons.html">PrinterStateReasons</A><BR>Contains zero or more --</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
278<TR><TD>-- <A HREF="PrinterStateReason.html">PrinterStateReason</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
279<TR><TD>-- <A HREF="Severity.html">Severity</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
280<TR><TD><A HREF="QueuedJobCount.html">QueuedJobCount</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD ALIGN="center">X</TD><TD>&nbsp;</TD></TR>
281<TR><TD><A HREF="ReferenceUriSchemesSupported.html">ReferenceUriSchemesSupported</A></TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
282</TABLE>
283<P>
284Please note: In the javax.print APIs, a null reference parameter to methods
285is incorrect unless explicitly documented on the method as having a meaningful
286interpretation. Usage to the contrary is incorrect coding and may result
287in a run time exception either immediately or at some later time.
288IllegalArgumentException and NullPointerException are examples of
289typical and acceptable run time exceptions for such cases.
290<P>
291@since 1.4
292</body>
293</html>