Example usage for Java android.print PrintDocumentAdapter fields, constructors, methods, implement or subclass
The text is from its open source code.
void | onLayout(PrintAttributes oldAttributes, PrintAttributes newAttributes, CancellationSignal cancellationSignal, LayoutResultCallback callback, Bundle extras) Called when the print attributes (page size, density, etc) changed giving you a chance to layout the content such that it matches the new constraints. |
void | onStart() Called when printing starts. |
void | onWrite(PageRange[] pages, ParcelFileDescriptor destination, CancellationSignal cancellationSignal, WriteResultCallback callback) Called when specific pages of the content should be written in the form of a PDF file to the given file descriptor. |