• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<HTML>
2<BODY>
3<h3>Overview</h3>
4<p>
5Provides classes for implementing print support in applications and also contains all
6base classes and abstractions involved in printing. These base classes are also used
7by other more specialized printing related packages.
8</p>
9<p>
10The entry point for interacting with the print system is the {@link android.print.PrintManager}
11which is a system service that can be obtained from the current context. The print manager
12provides APIs for printing, querying the state of print jobs, etc.
13<p/>
14<h3>Print contract</h3>
15<p>
16An application that wants to implement printing must extend
17{@link android.print.PrintDocumentAdapter} which defines the contract between the system
18and the application.The key idea behind this adapter is that the printed content may change
19based on the selected print options, such as media size, orientation, which
20requires the content to be re-laid out. The constraints according to which the content has
21to be laid out are encapsulated in the {@link android.print.PrintAttributes} class. Once
22layout is completed the application calls back to the system passing a
23{@link android.print.PrintDocumentInfo} instance which describes the generated content. After
24the content has been laid out the application may be asked to render some pages of that content
25for preview or printing. The range of pages that have to be rendered is abstracted by the
26{@link android.print.PageRange} class.
27</p>
28<h3>Print jobs</h3>
29<p>
30A print job is represented by the {@link android.print.PrintJob} class which has behavior
31methods as well as methods for querying its state. Each print job has a unique id represented
32by the {@link android.print.PrintJobId} class and exposes APIs for obtaining a {@link
33android.print.PrintJobInfo} which is a snapshot of its state. The print job state may
34change over time.
35</p>
36<h3>Printers</h3>
37<p>
38An available printer represented by the {@link android.print.PrinterInfo} class has a
39unique id which is abstracted by the {@link android.print.PrinterId} class. The {@link
40android.print.PrinterInfo} contains printer properties such as id, name, description, status,
41and printer capabilities encapsulated in the {@link android.print.PrinterCapabilitiesInfo}
42class. Printer capabilities describe how a printer can print content, for example what are
43the supported media sizes, color modes, resolutions, etc.
44<p>
45</BODY>
46</HTML>
47