Skip to content

Most visited

Recently visited

navigation

PrintDocument

public final class PrintDocument
extends Object

java.lang.Object
   ↳ android.printservice.PrintDocument


This class represents a printed document from the perspective of a print service. It exposes APIs to query the document and obtain its data.

Note: All methods of this class must be executed on the main application thread.

Summary

Public methods

ParcelFileDescriptor getData()

Gets the data associated with this document.

PrintDocumentInfo getInfo()

Gets the PrintDocumentInfo that describes this document.

Inherited methods

From class java.lang.Object

Public methods

getData

Added in API level 19
ParcelFileDescriptor getData ()

Gets the data associated with this document.

Note: It is a responsibility of the client to open a stream to the returned file descriptor, fully read the data, and close the file descriptor.

Returns
ParcelFileDescriptor A file descriptor for reading the data.

getInfo

Added in API level 19
PrintDocumentInfo getInfo ()

Gets the PrintDocumentInfo that describes this document.

Returns
PrintDocumentInfo The document info.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.