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