1/* 2 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26/** 27 * Package {@code javax.print.attribute.standard} contains classes for specific 28 * printing attributes. The parent package, <a href="../package-summary.html"> 29 * javax.print.attribute</a>, provides classes and interfaces that describe the 30 * types of Java Print Service attributes and how they can be collected into 31 * attribute sets. 32 * <p> 33 * An attribute represents a printing feature that a print service can provide. 34 * For each attribute, a print service either does or does not support the 35 * attribute. For each possible value of a supported attribute, a print service 36 * either does or does not support the value. 37 * <p> 38 * The API requires every print service to support certain attributes; other 39 * attributes are optional and the service can choose whether or not to support 40 * them. Each attribute has a set of values that it accepts. The API requires 41 * every print service to support certain values for certain attributes; other 42 * attribute values are optional and the service can choose whether or not to 43 * support them. These support requirements are recorded in the documentation 44 * for each attribute class. 45 * <p> 46 * Package {@code javax.print.attribute.standard} contains standard printing 47 * attributes and standard printing attribute values that are widely used in the 48 * printing domain. A print service vendor can provide new vendor-specific 49 * printing attributes in addition to the standard ones. A vendor can also 50 * provide vendor-specific extensions (subclasses) of the standard printing 51 * attributes -- for example, to provide additional vendor-specific values for 52 * an existing standard attribute. Of course, if a vendor wants clients to be 53 * able to use any added or extended attributes, the vendor must publish the new 54 * attribute classes. 55 * <p> 56 * Many of the standard attribute classes extend one of the abstract syntax 57 * classes of the {@code javax.print.attribute} package. These abstract syntax 58 * classes each represent a different type. The <a href="../EnumSyntax.html"> 59 * EnumSyntax</a> class, for example, represents a type-safe enumeration. The 60 * abstract syntax class provides a wrapper for the attribute value. 61 * <p> 62 * If an attribute class extends {@code EnumSyntax}, and the value of the 63 * attribute is an IPP-compatible value, the attribute's {@code toString} method 64 * returns the IPP string representation of the attribute value, such as 65 * "processing-stopped" for the <a href="JobState.html">JobState</a> attribute. 66 * However, because the {@code EnumSyntax} class is extensible, vendors can 67 * define their own attribute values. If an attribute uses the 68 * {@code EnumSyntax} class and is set to one of these vendor-defined values 69 * then the {@code toString} method will not return the IPP string 70 * representation of the value. 71 * <p> 72 * A printing client application will typically not need to use all the printing 73 * attribute classes in package javax.print.attribute.standard, just the ones 74 * that pertain to the application. 75 * <p> 76 * The attribute classes in package {@code javax.print.attribute.standard} are 77 * based on the Internet Printing Protocol (IPP) attributes as defined in the 78 * Internet RFC document, <i>RFC 2911 Internet Printing Protocol/1.1: Model and 79 * Semantics</i> dated September 2000. See 80 * <a href="http://www.ietf.org/rfc/rfc2911.txt">RFC 2911</a> for more 81 * information. The descriptive text for each attribute class was taken largely 82 * from the above documents. The above authors' contribution to the API is 83 * gratefully acknowledged. 84 * 85 * <h3>Attribute Organization</h3> 86 * There are five kinds of printing attributes: doc attributes, print request 87 * attributes, print job attributes, print service attributes, and 88 * supported-values attributes. 89 * 90 * <h4>Doc Attributes</h4> 91 * Doc attributes specify the characteristics of an individual doc and the print 92 * job settings to be applied to an individual doc. A doc attribute class 93 * implements interface <a href="../DocAttribute.html">DocAttribute</a>. A doc 94 * attribute can appear in a <a href="../DocAttributeSet.html"> 95 * DocAttributeSet</a>. 96 * 97 * <h4>Print Request Attributes</h4> 98 * Print request attributes specify the settings to be applied to a whole print 99 * job and to all the docs in the print job. A print request attribute class 100 * implements interface <a href="../PrintRequestAttribute.html"> 101 * PrintRequestAttribute</a>. A print request attribute can appear in a 102 * <a href="../PrintRequestAttributeSet.html">PrintRequestAttributeSet</a>. 103 * <p> 104 * Some attributes are doc attributes but not print request attributes and may 105 * only be specified at the doc level. Some attributes are print request 106 * attributes but not doc attributes and may only be specified at the Print 107 * Request level. Some attributes are both doc attributes and print request 108 * attributes and may be specified either at the doc level or at the Print 109 * Request level. 110 * <p> 111 * When specified at the doc level, an attribute applies just to that one doc. 112 * When specified at the Print Request level, an attribute applies to the whole 113 * job, including all the docs in the job. However, an attribute specified at 114 * the doc level overrides an attribute in the same category specified at the 115 * Print Request level. 116 * 117 * <h4>Print Job Attributes</h4> 118 * Print job attributes report the status of a Print Job. A print job attribute 119 * class implements interface <a href="../PrintJobAttribute.html"> 120 * PrintJobAttribute</a>. A print job attribute can appear in a 121 * <a href="../PrintJobAttributeSet.html">PrintJobAttributeSet</a>. 122 * <p> 123 * Some attributes are both print request attributes and print job attributes; a 124 * client may include such attributes in a Print Request to specify 125 * characteristics for the ensuing Print Job, and those attributes then also 126 * appear in the Print Job's attribute set. Some attributes are print job 127 * attributes but not print request attributes; the print service itself adds 128 * these attributes to the Print Job's attribute set. 129 * 130 * <h4>Print Service Attributes</h4> 131 * Print service attributes report the status of a print service. A print 132 * service attribute class implements interface 133 * <a href="../PrintServiceAttribute.html">PrintServiceAttribute</a>. A print 134 * service attribute can appear in a <a href="../PrintServiceAttributeSet.html"> 135 * PrintServiceAttributeSet</a>. 136 * 137 * <h4>Supported-Values Attributes</h4> 138 * A supported-value attribute indicates the legal values for another attribute 139 * that a print service supports. A supported-values attribute class implements 140 * interface <a href="../SupportedValuesAttribute.html"> 141 * SupportedValuesAttribute</a>. However, supported-values attributes never 142 * appear in attribute sets, so there is no restricted 143 * <a href="../AttributeSet.html">AttributeSet</a> subinterface for them. 144 * 145 * <h4>Attribute Table</h4> 146 * The table below lists all the printing attributes. The table shows the 147 * tagging interfaces each attribute class implements in addition to interface 148 * <a href="../Attribute.html"> Attribute</a>, thus indicating how each 149 * attribute is used in the API. For each doc attribute and print request 150 * attribute, the column marked "SupportedValuesAttribute" lists the 151 * supported-values attribute class, if any, with which a print service 152 * indicates the supported values for that attribute category. 153 * <table border=1 cellpadding=2 cellspacing=1 summary="Lists all printing 154 * attributes as described in above text"> 155 * <tr style="background-color:#E5E5E5"> 156 * <th valign="bottom">Attribute Class 157 * <th valign="bottom">Doc<br>Attribute 158 * <th valign="bottom">Print<br>Request<br>Attribute 159 * <th valign="bottom">Print<br>Job<br>Attribute 160 * <th valign="bottom">Print<br>Service<br>Attribute 161 * <th valign="bottom">SupportedValuesAttribute 162 * <tr> 163 * <td><a href="Compression.html">Compression</a> 164 * <td align="center">X 165 * <td> 166 * <td> 167 * <td> 168 * <td> 169 * <tr> 170 * <td><a href="DocumentName.html">DocumentName</a> 171 * <td align="center">X 172 * <td> 173 * <td> 174 * <td> 175 * <td> 176 * <tr> 177 * <td><a href="Chromaticity.html">Chromaticity</a> 178 * <td align="center">X 179 * <td align="center">X 180 * <td align="center">X 181 * <td> 182 * <td> 183 * <tr> 184 * <td><a href="Copies.html">Copies</a> 185 * <td> 186 * <td align="center">X 187 * <td align="center">X 188 * <td> 189 * <td><a href="CopiesSupported.html">CopiesSupported</a> 190 * <tr> 191 * <td><a href="Finishings.html">Finishings</a> 192 * <td align="center">X 193 * <td align="center">X 194 * <td align="center">X 195 * <td> 196 * <td> 197 * <tr> 198 * <td><a href="JobHoldUntil.html">JobHoldUntil</a> 199 * <td> 200 * <td align="center">X 201 * <td align="center">X 202 * <td> 203 * <td> 204 * <tr> 205 * <td><a href="JobImpressions.html">JobImpressions</a> 206 * <td> 207 * <td align="center">X 208 * <td align="center">X 209 * <td> 210 * <td><a href="JobImpressionsSupported.html">JobImpressionsSupported</a> 211 * <tr> 212 * <td><a href="JobKOctets.html">JobKOctets</a> 213 * <td> 214 * <td align="center">X 215 * <td align="center">X 216 * <td> 217 * <td><a href="JobKOctetsSupported.html">JobKOctetsSupported</a> 218 * <tr> 219 * <td><a href="JobMediaSheets.html">JobMediaSheets</a> 220 * <td> 221 * <td align="center">X 222 * <td align="center">X 223 * <td> 224 * <td><a href="JobMediaSheetsSupported.html">JobMediaSheetsSupported</a> 225 * <tr> 226 * <td><a href="JobName.html">JobName</a> 227 * <td> 228 * <td align="center">X 229 * <td align="center">X 230 * <td> 231 * <td> 232 * <tr> 233 * <td><a href="JobPriority.html">JobPriority</a> 234 * <td> 235 * <td align="center">X 236 * <td align="center">X 237 * <td> 238 * <td><a href="JobPrioritySupported.html">JobPrioritySupported</a> 239 * <tr> 240 * <td><a href="JobSheets.html">JobSheets</a> 241 * <td> 242 * <td align="center">X 243 * <td align="center">X 244 * <td> 245 * <td> 246 * <tr> 247 * <td><a href="Media.html">Media</a> 248 * <td align="center">X 249 * <td align="center">X 250 * <td align="center">X 251 * <td> 252 * <td> 253 * <tr> 254 * <td><a href="MediaSize.html">MediaSize</a> 255 * <td> 256 * <td> 257 * <td> 258 * <td> 259 * <td> 260 * <tr> 261 * <td><a href="MultipleDocumentHandling.html">MultipleDocumentHandling</a> 262 * <td> 263 * <td align="center">X 264 * <td align="center">X 265 * <td> 266 * <td> 267 * <tr> 268 * <td><a href="NumberUp.html">NumberUp</a> 269 * <td align="center">X 270 * <td align="center">X 271 * <td align="center">X 272 * <td> 273 * <td><a href="NumberUpSupported.html">NumberUpSupported</a> 274 * <tr> 275 * <td><a href="OrientationRequested.html">OrientationRequested</a> 276 * <td align="center">X 277 * <td align="center">X 278 * <td align="center">X 279 * <td> 280 * <td> 281 * <tr> 282 * <td><a href="PageRanges.html">PageRanges</a> 283 * <td align="center">X 284 * <td align="center">X 285 * <td align="center">X 286 * <td> 287 * <td> 288 * <tr> 289 * <td><a href="PresentationDirection.html">PresentationDirection</a> 290 * <td align="center">X 291 * <td align="center">X 292 * <td align="center">X 293 * <td> 294 * <td> 295 * <tr> 296 * <td><a href="PrinterResolution.html">PrinterResolution</a> 297 * <td align="center">X 298 * <td align="center">X 299 * <td align="center">X 300 * <td> 301 * <td> 302 * <tr> 303 * <td><a href="PrintQuality.html">PrintQuality</a> 304 * <td align="center">X 305 * <td align="center">X 306 * <td align="center">X 307 * <td> 308 * <td> 309 * <tr> 310 * <td><a href="RequestingUserName.html">RequestingUserName</a> 311 * <td> 312 * <td align="center">X 313 * <td align="center">X 314 * <td> 315 * <td> 316 * <tr> 317 * <td><a href="SheetCollate.html">SheetCollate</a> 318 * <td align="center">X 319 * <td align="center">X 320 * <td align="center">X 321 * <td> 322 * <td> 323 * <tr> 324 * <td><a href="Sides.html">Sides</a> 325 * <td align="center">X 326 * <td align="center">X 327 * <td align="center">X 328 * <td> 329 * <td> 330 * <tr> 331 * <td><a href="DateTimeAtCompleted.html">DateTimeAtCompleted</a> 332 * <td> 333 * <td> 334 * <td align="center">X 335 * <td> 336 * <td> 337 * <tr> 338 * <td><a href="DateTimeAtCreation.html">DateTimeAtCreation</a> 339 * <td> 340 * <td> 341 * <td align="center">X 342 * <td> 343 * <td> 344 * <tr> 345 * <td><a href="DateTimeAtProcessing.html">DateTimeAtProcessing</a> 346 * <td> 347 * <td> 348 * <td align="center">X 349 * <td> 350 * <td> 351 * <tr> 352 * <td><a href="JobImpressionsCompleted.html">JobImpressionsCompleted</a> 353 * <td> 354 * <td> 355 * <td align="center">X 356 * <td> 357 * <td> 358 * <tr> 359 * <td><a href="JobKOctetsProcessed.html">JobKOctetsProcessed</a> 360 * <td> 361 * <td> 362 * <td align="center">X 363 * <td> 364 * <td> 365 * <tr> 366 * <td><a href="JobMediaSheetsCompleted.html">JobMediaSheetsCompleted</a> 367 * <td> 368 * <td> 369 * <td align="center">X 370 * <td> 371 * <td> 372 * <tr> 373 * <td><a href="JobMessageFromOperator.html">JobMessageFromOperator</a> 374 * <td> 375 * <td> 376 * <td align="center">X 377 * <td> 378 * <td> 379 * <tr> 380 * <td><a href="JobOriginatingUserName.html">JobOriginatingUserName</a> 381 * <td> 382 * <td> 383 * <td align="center">X 384 * <td> 385 * <td> 386 * <tr> 387 * <td><a href="JobState.html">JobState</a> 388 * <td> 389 * <td> 390 * <td align="center">X 391 * <td> 392 * <td> 393 * <tr> 394 * <td><a href="JobStateReasons.html">JobStateReasons</a><br> 395 * Contains zero or more -- 396 * <td> 397 * <td> 398 * <td align="center">X 399 * <td> 400 * <td> 401 * <tr> 402 * <td>-- <a href="JobStateReason.html">JobStateReason</a> 403 * <td> 404 * <td> 405 * <td> 406 * <td> 407 * <td> 408 * <tr> 409 * <td><a href="NumberOfDocuments.html">NumberOfDocuments</a> 410 * <td> 411 * <td> 412 * <td align="center">X 413 * <td> 414 * <td> 415 * <tr> 416 * <td><a href="NumberOfInterveningJobs.html">NumberOfInterveningJobs</a> 417 * <td> 418 * <td> 419 * <td align="center">X 420 * <td> 421 * <td> 422 * <tr> 423 * <td><a href="OutputDeviceAssigned.html">OutputDeviceAssigned</a> 424 * <td> 425 * <td> 426 * <td align="center">X 427 * <td> 428 * <td> 429 * <tr> 430 * <td><a href="ColorSupported.html">ColorSupported</a> 431 * <td> 432 * <td> 433 * <td> 434 * <td align="center">X 435 * <td> 436 * <tr> 437 * <td><a href="PagesPerMinute.html">PagesPerMinute</a> 438 * <td> 439 * <td> 440 * <td> 441 * <td align="center">X 442 * <td> 443 * <tr> 444 * <td><a href="PagesPerMinuteColor.html">PagesPerMinuteColor</a> 445 * <td> 446 * <td> 447 * <td> 448 * <td align="center">X 449 * <td> 450 * <tr> 451 * <td><a href="PDLOverrideSupported.html">PDLOverrideSupported</a> 452 * <td> 453 * <td> 454 * <td> 455 * <td align="center">X 456 * <td> 457 * <tr> 458 * <td><a href="PrinterIsAcceptingJobs.html">PrinterIsAcceptingJobs</a> 459 * <td> 460 * <td> 461 * <td> 462 * <td align="center">X 463 * <td> 464 * <tr> 465 * <td><a href="PrinterInfo.html">PrinterInfo</a> 466 * <td> 467 * <td> 468 * <td> 469 * <td align="center">X 470 * <td> 471 * <tr> 472 * <td><a href="PrinterLocation.html">PrinterLocation</a> 473 * <td> 474 * <td> 475 * <td> 476 * <td align="center">X 477 * <td> 478 * <tr> 479 * <td><a href="PrinterMessageFromOperator.html"> 480 * PrinterMessageFromOperator</a> 481 * <td> 482 * <td> 483 * <td> 484 * <td align="center">X 485 * <td> 486 * <tr> 487 * <td><a href="PrinterMakeAndModel.html">PrinterMakeAndModel</a> 488 * <td> 489 * <td> 490 * <td> 491 * <td align="center">X 492 * <td> 493 * <tr> 494 * <td><a href="PrinterMoreInfo.html">PrinterMoreInfo</a> 495 * <td> 496 * <td> 497 * <td> 498 * <td align="center">X 499 * <td> 500 * <tr> 501 * <td><a href="PrinterMoreInfoManufacturer.html"> 502 * PrinterMoreInfoManufacturer</a> 503 * <td> 504 * <td> 505 * <td> 506 * <td align="center">X 507 * <td> 508 * <tr> 509 * <td><a href="PrinterName.html">PrinterName</a> 510 * <td> 511 * <td> 512 * <td> 513 * <td align="center">X 514 * <td> 515 * <tr> 516 * <td><a href="PrinterState.html">PrinterState</a> 517 * <td> 518 * <td> 519 * <td> 520 * <td align="center">X 521 * <td> 522 * <tr> 523 * <td><a href="PrinterStateReasons.html">PrinterStateReasons</a><br> 524 * Contains zero or more -- 525 * <td> 526 * <td> 527 * <td> 528 * <td align="center">X 529 * <td> 530 * <tr> 531 * <td>-- <a href="PrinterStateReason.html">PrinterStateReason</a> 532 * <td> 533 * <td> 534 * <td> 535 * <td> 536 * <td> 537 * <tr> 538 * <td>-- <a href="Severity.html">Severity</a> 539 * <td> 540 * <td> 541 * <td> 542 * <td> 543 * <td> 544 * <tr> 545 * <td><a href="QueuedJobCount.html">QueuedJobCount</a> 546 * <td> 547 * <td> 548 * <td> 549 * <td align="center">X 550 * <td> 551 * <tr> 552 * <td><a href="ReferenceUriSchemesSupported.html"> 553 * ReferenceUriSchemesSupported</a> 554 * <td> 555 * <td> 556 * <td> 557 * <td> 558 * <td> 559 * </table> 560 * <p> 561 * Please note: In the {@code javax.print} APIs, a {@code null} reference 562 * parameter to methods is incorrect unless explicitly documented on the method 563 * as having a meaningful interpretation. Usage to the contrary is incorrect 564 * coding and may result in a run time exception either immediately or at some 565 * later time. {@code IllegalArgumentException} and {@code NullPointerException} 566 * are examples of typical and acceptable run time exceptions for such cases. 567 * 568 * @since 1.4 569 */ 570package javax.print.attribute.standard; 571