public static final class PrintDocumentInfo.Builder extends Object
PrintDocumentInfo
.Modifier and Type | Method and Description |
---|---|
PrintDocumentInfo |
build()
Creates a new
PrintDocumentInfo instance. |
PrintDocumentInfo.Builder |
setContentType(int type)
Sets the content type.
|
PrintDocumentInfo.Builder |
setPageCount(int pageCount)
Sets the total number of pages.
|
public Builder(String name)
The values of the relevant properties are initialized with defaults. Please refer to the documentation of the individual setters for information about the default values.
name
- The document name which may be shown to the user and
is the file name if the content it describes is saved as a PDF.
Cannot be empty.public PrintDocumentInfo.Builder setPageCount(int pageCount)
Default: PrintDocumentInfo.PAGE_COUNT_UNKNOWN
pageCount
- The number of pages. Must be greater than or equal to zero or
PrintDocumentInfo.PAGE_COUNT_UNKNOWN
.public PrintDocumentInfo.Builder setContentType(int type)
type
- The content type.PrintDocumentInfo.CONTENT_TYPE_UNKNOWN
,
PrintDocumentInfo.CONTENT_TYPE_DOCUMENT
,
PrintDocumentInfo.CONTENT_TYPE_PHOTO
public PrintDocumentInfo build()
PrintDocumentInfo
instance.