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