Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public final class

PrintDocument

extends Object
java.lang.Object
   ↳ android.printservice.PrintDocument

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public 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
  • A file descriptor for reading the data.

public PrintDocumentInfo getInfo ()

Gets the PrintDocumentInfo that describes this document.

Returns
  • The document info.