javax.print.attribute.standard contains classes for specific
printing attributes. The parent package,
javax.print.attribute, provides classes and interfaces that describe the
types of Java Print Service attributes and how they can be collected into
attribute sets.
An attribute represents a printing feature that a print service can provide. For each attribute, a print service either does or does not support the attribute. For each possible value of a supported attribute, a print service either does or does not support the value.
The API requires every print service to support certain attributes; other attributes are optional and the service can choose whether or not to support them. Each attribute has a set of values that it accepts. The API requires every print service to support certain values for certain attributes; other attribute values are optional and the service can choose whether or not to support them. These support requirements are recorded in the documentation for each attribute class.
Package javax.print.attribute.standard contains standard printing
attributes and standard printing attribute values that are widely used in the
printing domain. A print service vendor can provide new vendor-specific
printing attributes in addition to the standard ones. A vendor can also
provide vendor-specific extensions (subclasses) of the standard printing
attributes -- for example, to provide additional vendor-specific values for
an existing standard attribute. Of course, if a vendor wants clients to be
able to use any added or extended attributes, the vendor must publish the new
attribute classes.
Many of the standard attribute classes extend one of the abstract syntax
classes of the javax.print.attribute package. These abstract syntax
classes each represent a different type. The
EnumSyntax class, for example, represents a type-safe enumeration. The
abstract syntax class provides a wrapper for the attribute value.
If an attribute class extends EnumSyntax, and the value of the
attribute is an IPP-compatible value, the attribute's toString method
returns the IPP string representation of the attribute value, such as
"processing-stopped" for the JobState attribute.
However, because the EnumSyntax class is extensible, vendors can
define their own attribute values. If an attribute uses the
EnumSyntax class and is set to one of these vendor-defined values
then the toString method will not return the IPP string
representation of the value.
A printing client application will typically not need to use all the printing attribute classes in package javax.print.attribute.standard, just the ones that pertain to the application.
The attribute classes in package javax.print.attribute.standard are
based on the Internet Printing Protocol (IPP) attributes as defined in the
Internet RFC document, RFC 2911 Internet Printing Protocol/1.1: Model and
Semantics dated September 2000. See
RFC 2911 for more
information. The descriptive text for each attribute class was taken largely
from the above documents. The above authors' contribution to the API is
gratefully acknowledged.
Some attributes are doc attributes but not print request attributes and may only be specified at the doc level. Some attributes are print request attributes but not doc attributes and may only be specified at the Print Request level. Some attributes are both doc attributes and print request attributes and may be specified either at the doc level or at the Print Request level.
When specified at the doc level, an attribute applies just to that one doc. When specified at the Print Request level, an attribute applies to the whole job, including all the docs in the job. However, an attribute specified at the doc level overrides an attribute in the same category specified at the Print Request level.
Some attributes are both print request attributes and print job attributes; a client may include such attributes in a Print Request to specify characteristics for the ensuing Print Job, and those attributes then also appear in the Print Job's attribute set. Some attributes are print job attributes but not print request attributes; the print service itself adds these attributes to the Print Job's attribute set.
Note
In the javax.print APIs, a null reference
parameter to methods is incorrect unless explicitly documented on the method
as having a meaningful interpretation. Usage to the contrary is incorrect
coding and may result in a run time exception either immediately or at some
later time. IllegalArgumentException and NullPointerException
are examples of typical and acceptable run time exceptions for such cases.
| Modifier and Type | Class and Description |
|---|---|
| public class | Chromaticity
Class |
| public class | ColorSupported
Class |
| public class | Compression
Class |
| public class | Copies
Class |
| public class | CopiesSupported
Class |
| public class | DateTimeAtCompleted
Class |
| public class | DateTimeAtCreation
Class |
| public class | DateTimeAtProcessing
Class |
| public class | Destination
Class |
| public class | DialogOwner
An attribute class used to support requesting a print or page setup dialog be kept displayed on top of all windows or some specific window. |
| public class | DialogTypeSelection
Class |
| public class | DocumentName
Class |
| public class | Fidelity
Class |
| public class | Finishings
Class |
| public class | JobHoldUntil
Class |
| public class | JobImpressions
Class |
| public class | JobImpressionsCompleted
Class |
| public class | JobImpressionsSupported
Class |
| public class | JobKOctets
Class |
| public class | JobKOctetsProcessed
Class |
| public class | JobKOctetsSupported
Class |
| public class | JobMediaSheets
Class |
| public class | JobMediaSheetsCompleted
Class |
| public class | JobMediaSheetsSupported
Class |
| public class | JobMessageFromOperator
Class |
| public class | JobName
Class |
| public class | JobOriginatingUserName
Class |
| public class | JobPriority
Class |
| public class | JobPrioritySupported
Class |
| public class | JobSheets
Class |
| public class | JobState
|
| public class | JobStateReason
Class |
| public class | JobStateReasons
Class |
| public abstract class | Media
Class |
| public class | MediaName
Class |
| public class | MediaPrintableArea
Class |
| public class | MediaSize
Class |
| public class | MediaSizeName
Class |
| public class | MediaTray
Class |
| public class | MultipleDocumentHandling
Class |
| public class | NumberOfDocuments
Class |
| public class | NumberOfInterveningJobs
Class |
| public class | NumberUp
Class |
| public class | NumberUpSupported
Class |
| public class | OrientationRequested
Class |
| public class | OutputBin
Class |
| public class | OutputDeviceAssigned
Class |
| public class | PageRanges
Class |
| public class | PagesPerMinute
Class |
| public class | PagesPerMinuteColor
Class |
| public class | PDLOverrideSupported
Class |
| public class | PresentationDirection
Class |
| public class | PrinterInfo
Class |
| public class | PrinterIsAcceptingJobs
Class |
| public class | PrinterLocation
Class |
| public class | PrinterMakeAndModel
Class |
| public class | PrinterMessageFromOperator
Class |
| public class | PrinterMoreInfo
Class |
| public class | PrinterMoreInfoManufacturer
Class |
| public class | PrinterName
Class |
| public class | PrinterResolution
Class |
| public class | PrinterState
Class |
| public class | PrinterStateReason
Class |
| public class | PrinterStateReasons
Class |
| public class | PrinterURI
Class |
| public class | PrintQuality
Class |
| public class | QueuedJobCount
Class |
| public class | ReferenceUriSchemesSupported
Class |
| public class | RequestingUserName
Class |
| public class | Severity
Class |
| public class | SheetCollate
Class |
| public class | Sides
Class |