There are two rendering models used by Java Printing API.
Printable
Printable model is the simplest. Using this model, you can implement only one Printable class. At the moment of printing, its print( ) method is called for each page. This model has the following characteristics:
- Every page have the same PageFormat, thus it is not possible to mix landscape and portrait orientations.
- If a print dialog is exhibited, it is not possible to know before how many pages the document will have.
- Pages will be requested always in order, from index 0 to N – 1.
- Printable implementation tells the printing system when the document ends, by means of Printable.NO_SUCH_PAGE constant.
Pageable
Pageable model works like a set of pages to be printed. Each page can have a different page painter. There is already a predefined implementation of this model: Book class.
This model has the following characteristics:
- Different pages can use different PageFormat objects; hence it is possible to mix in the same document pages with portrait and landscape layout.
- Printing system can call page painters in an arbitrary way. So you can request the printing of just some pages.

















3 Comments Received
July 17th, 2007 @11:02 am
interesting
July 18th, 2007 @8:29 am
Aftergone through this blog i am very impressed. But I am also write some information about Global Warming
Pingback & Trackback
Leave A Reply