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 * 154 * <table class="striped"> 155 * <caption>Lists all printing attributes as described above</caption> 156 * <thead> 157 * <tr> 158 * <th scope="col">Attribute Class 159 * <th scope="col">Doc<br>Attribute 160 * <th scope="col">Print<br>Request<br>Attribute 161 * <th scope="col">Print<br>Job<br>Attribute 162 * <th scope="col">Print<br>Service<br>Attribute 163 * <th scope="col">SupportedValuesAttribute 164 * </thead> 165 * <tbody> 166 * <tr> 167 * <th scope="row"><a href="Compression.html">Compression</a> 168 * <td>X 169 * <td> 170 * <td> 171 * <td> 172 * <td> 173 * <tr> 174 * <th scope="row"><a href="DocumentName.html">DocumentName</a> 175 * <td>X 176 * <td> 177 * <td> 178 * <td> 179 * <td> 180 * <tr> 181 * <th scope="row"><a href="Chromaticity.html">Chromaticity</a> 182 * <td>X 183 * <td>X 184 * <td>X 185 * <td> 186 * <td> 187 * <tr> 188 * <th scope="row"><a href="Copies.html">Copies</a> 189 * <td> 190 * <td>X 191 * <td>X 192 * <td> 193 * <td><a href="CopiesSupported.html">CopiesSupported</a> 194 * <tr> 195 * <th scope="row"><a href="Finishings.html">Finishings</a> 196 * <td>X 197 * <td>X 198 * <td>X 199 * <td> 200 * <td> 201 * <tr> 202 * <th scope="row"><a href="JobHoldUntil.html">JobHoldUntil</a> 203 * <td> 204 * <td>X 205 * <td>X 206 * <td> 207 * <td> 208 * <tr> 209 * <th scope="row"><a href="JobImpressions.html">JobImpressions</a> 210 * <td> 211 * <td>X 212 * <td>X 213 * <td> 214 * <td><a href="JobImpressionsSupported.html">JobImpressionsSupported</a> 215 * <tr> 216 * <th scope="row"><a href="JobKOctets.html">JobKOctets</a> 217 * <td> 218 * <td>X 219 * <td>X 220 * <td> 221 * <td><a href="JobKOctetsSupported.html">JobKOctetsSupported</a> 222 * <tr> 223 * <th scope="row"><a href="JobMediaSheets.html">JobMediaSheets</a> 224 * <td> 225 * <td>X 226 * <td>X 227 * <td> 228 * <td><a href="JobMediaSheetsSupported.html">JobMediaSheetsSupported</a> 229 * <tr> 230 * <th scope="row"><a href="JobName.html">JobName</a> 231 * <td> 232 * <td>X 233 * <td>X 234 * <td> 235 * <td> 236 * <tr> 237 * <th scope="row"><a href="JobPriority.html">JobPriority</a> 238 * <td> 239 * <td>X 240 * <td>X 241 * <td> 242 * <td><a href="JobPrioritySupported.html">JobPrioritySupported</a> 243 * <tr> 244 * <th scope="row"><a href="JobSheets.html">JobSheets</a> 245 * <td> 246 * <td>X 247 * <td>X 248 * <td> 249 * <td> 250 * <tr> 251 * <th scope="row"><a href="Media.html">Media</a> 252 * <td>X 253 * <td>X 254 * <td>X 255 * <td> 256 * <td> 257 * <tr> 258 * <th scope="row"><a href="MediaSize.html">MediaSize</a> 259 * <td> 260 * <td> 261 * <td> 262 * <td> 263 * <td> 264 * <tr> 265 * <th scope="row"><a href="MultipleDocumentHandling.html"> 266 * MultipleDocumentHandling</a> 267 * <td> 268 * <td>X 269 * <td>X 270 * <td> 271 * <td> 272 * <tr> 273 * <th scope="row"><a href="NumberUp.html">NumberUp</a> 274 * <td>X 275 * <td>X 276 * <td>X 277 * <td> 278 * <td><a href="NumberUpSupported.html">NumberUpSupported</a> 279 * <tr> 280 * <th scope="row"><a href="OrientationRequested.html"> 281 * OrientationRequested</a> 282 * <td>X 283 * <td>X 284 * <td>X 285 * <td> 286 * <td> 287 * <tr> 288 * <th scope="row"><a href="PageRanges.html">PageRanges</a> 289 * <td>X 290 * <td>X 291 * <td>X 292 * <td> 293 * <td> 294 * <tr> 295 * <th scope="row"><a href="PresentationDirection.html"> 296 * PresentationDirection</a> 297 * <td>X 298 * <td>X 299 * <td>X 300 * <td> 301 * <td> 302 * <tr> 303 * <th scope="row"><a href="PrinterResolution.html">PrinterResolution</a> 304 * <td>X 305 * <td>X 306 * <td>X 307 * <td> 308 * <td> 309 * <tr> 310 * <th scope="row"><a href="PrintQuality.html">PrintQuality</a> 311 * <td>X 312 * <td>X 313 * <td>X 314 * <td> 315 * <td> 316 * <tr> 317 * <th scope="row"><a href="RequestingUserName.html">RequestingUserName</a> 318 * <td> 319 * <td>X 320 * <td>X 321 * <td> 322 * <td> 323 * <tr> 324 * <th scope="row"><a href="SheetCollate.html">SheetCollate</a> 325 * <td>X 326 * <td>X 327 * <td>X 328 * <td> 329 * <td> 330 * <tr> 331 * <th scope="row"><a href="Sides.html">Sides</a> 332 * <td>X 333 * <td>X 334 * <td>X 335 * <td> 336 * <td> 337 * <tr> 338 * <th scope="row"><a href="DateTimeAtCompleted.html"> 339 * DateTimeAtCompleted</a> 340 * <td> 341 * <td> 342 * <td>X 343 * <td> 344 * <td> 345 * <tr> 346 * <th scope="row"><a href="DateTimeAtCreation.html">DateTimeAtCreation</a> 347 * <td> 348 * <td> 349 * <td>X 350 * <td> 351 * <td> 352 * <tr> 353 * <th scope="row"><a href="DateTimeAtProcessing.html"> 354 * DateTimeAtProcessing</a> 355 * <td> 356 * <td> 357 * <td>X 358 * <td> 359 * <td> 360 * <tr> 361 * <th scope="row"><a href="JobImpressionsCompleted.html"> 362 * JobImpressionsCompleted</a> 363 * <td> 364 * <td> 365 * <td>X 366 * <td> 367 * <td> 368 * <tr> 369 * <th scope="row"><a href="JobKOctetsProcessed.html"> 370 * JobKOctetsProcessed</a> 371 * <td> 372 * <td> 373 * <td>X 374 * <td> 375 * <td> 376 * <tr> 377 * <th scope="row"><a href="JobMediaSheetsCompleted.html"> 378 * JobMediaSheetsCompleted</a> 379 * <td> 380 * <td> 381 * <td>X 382 * <td> 383 * <td> 384 * <tr> 385 * <th scope="row"><a href="JobMessageFromOperator.html"> 386 * JobMessageFromOperator</a> 387 * <td> 388 * <td> 389 * <td>X 390 * <td> 391 * <td> 392 * <tr> 393 * <th scope="row"><a href="JobOriginatingUserName.html"> 394 * JobOriginatingUserName</a> 395 * <td> 396 * <td> 397 * <td>X 398 * <td> 399 * <td> 400 * <tr> 401 * <th scope="row"><a href="JobState.html">JobState</a> 402 * <td> 403 * <td> 404 * <td>X 405 * <td> 406 * <td> 407 * <tr> 408 * <th scope="row"><a href="JobStateReasons.html">JobStateReasons</a> 409 * <br> 410 * Contains zero or more -- 411 * <td> 412 * <td> 413 * <td>X 414 * <td> 415 * <td> 416 * <tr> 417 * <th scope="row">-- <a href="JobStateReason.html">JobStateReason</a> 418 * <td> 419 * <td> 420 * <td> 421 * <td> 422 * <td> 423 * <tr> 424 * <th scope="row"><a href="NumberOfDocuments.html">NumberOfDocuments</a> 425 * <td> 426 * <td> 427 * <td>X 428 * <td> 429 * <td> 430 * <tr> 431 * <th scope="row"><a href="NumberOfInterveningJobs.html"> 432 * NumberOfInterveningJobs</a> 433 * <td> 434 * <td> 435 * <td>X 436 * <td> 437 * <td> 438 * <tr> 439 * <th scope="row"><a href="OutputDeviceAssigned.html"> 440 * OutputDeviceAssigned</a> 441 * <td> 442 * <td> 443 * <td>X 444 * <td> 445 * <td> 446 * <tr> 447 * <th scope="row"><a href="ColorSupported.html">ColorSupported</a> 448 * <td> 449 * <td> 450 * <td> 451 * <td>X 452 * <td> 453 * <tr> 454 * <th scope="row"><a href="PagesPerMinute.html">PagesPerMinute</a> 455 * <td> 456 * <td> 457 * <td> 458 * <td>X 459 * <td> 460 * <tr> 461 * <th scope="row"><a href="PagesPerMinuteColor.html"> 462 * PagesPerMinuteColor</a> 463 * <td> 464 * <td> 465 * <td> 466 * <td>X 467 * <td> 468 * <tr> 469 * <th scope="row"><a href="PDLOverrideSupported.html"> 470 * PDLOverrideSupported</a> 471 * <td> 472 * <td> 473 * <td> 474 * <td>X 475 * <td> 476 * <tr> 477 * <th scope="row"><a href="PrinterIsAcceptingJobs.html"> 478 * PrinterIsAcceptingJobs</a> 479 * <td> 480 * <td> 481 * <td> 482 * <td>X 483 * <td> 484 * <tr> 485 * <th scope="row"><a href="PrinterInfo.html">PrinterInfo</a> 486 * <td> 487 * <td> 488 * <td> 489 * <td>X 490 * <td> 491 * <tr> 492 * <th scope="row"><a href="PrinterLocation.html">PrinterLocation</a> 493 * <td> 494 * <td> 495 * <td> 496 * <td>X 497 * <td> 498 * <tr> 499 * <th scope="row"><a href="PrinterMessageFromOperator.html"> 500 * PrinterMessageFromOperator</a> 501 * <td> 502 * <td> 503 * <td> 504 * <td>X 505 * <td> 506 * <tr> 507 * <th scope="row"><a href="PrinterMakeAndModel.html"> 508 * PrinterMakeAndModel</a> 509 * <td> 510 * <td> 511 * <td> 512 * <td>X 513 * <td> 514 * <tr> 515 * <th scope="row"><a href="PrinterMoreInfo.html">PrinterMoreInfo</a> 516 * <td> 517 * <td> 518 * <td> 519 * <td>X 520 * <td> 521 * <tr> 522 * <th scope="row"><a href="PrinterMoreInfoManufacturer.html"> 523 * PrinterMoreInfoManufacturer</a> 524 * <td> 525 * <td> 526 * <td> 527 * <td>X 528 * <td> 529 * <tr> 530 * <th scope="row"><a href="PrinterName.html">PrinterName</a> 531 * <td> 532 * <td> 533 * <td> 534 * <td>X 535 * <td> 536 * <tr> 537 * <th scope="row"><a href="PrinterState.html">PrinterState</a> 538 * <td> 539 * <td> 540 * <td> 541 * <td>X 542 * <td> 543 * <tr> 544 * <th scope="row"><a href="PrinterStateReasons.html"> 545 * PrinterStateReasons</a> 546 * <br> 547 * Contains zero or more -- 548 * <td> 549 * <td> 550 * <td> 551 * <td>X 552 * <td> 553 * <tr> 554 * <th scope="row">-- <a href="PrinterStateReason.html"> 555 * PrinterStateReason</a> 556 * <td> 557 * <td> 558 * <td> 559 * <td> 560 * <td> 561 * <tr> 562 * <th scope="row">-- <a href="Severity.html">Severity</a> 563 * <td> 564 * <td> 565 * <td> 566 * <td> 567 * <td> 568 * <tr> 569 * <th scope="row"><a href="QueuedJobCount.html">QueuedJobCount</a> 570 * <td> 571 * <td> 572 * <td> 573 * <td>X 574 * <td> 575 * <tr> 576 * <th scope="row"><a href="ReferenceUriSchemesSupported.html"> 577 * ReferenceUriSchemesSupported</a> 578 * <td> 579 * <td> 580 * <td> 581 * <td> 582 * <td> 583 * </tbody> 584 * </table> 585 * <p> 586 * Please note: In the {@code javax.print} APIs, a {@code null} reference 587 * parameter to methods is incorrect unless explicitly documented on the method 588 * as having a meaningful interpretation. Usage to the contrary is incorrect 589 * coding and may result in a run time exception either immediately or at some 590 * later time. {@code IllegalArgumentException} and {@code NullPointerException} 591 * are examples of typical and acceptable run time exceptions for such cases. 592 * 593 * @since 1.4 594 */ 595 package javax.print.attribute.standard;