|
||||||||||||||
|
|
|||||||||||||
|
|
|||||||||||||||||||||
|
|||||||||||||||||||||
|
|||||||||||||||||||||
|
Printing | ||||||||||||||||||||
|
|
|
|
||||||||||||||||||
|
|
Printing is possible in the WebRenderer Server Edition through the API. The methods available in IBrowserCanvas that relate to printing are:
When printing, the print method should be called after the onDocumentComplete() method has fired. This allows the page to be completely loaded before printing begins. The simplest way to print is to call print() on the browser. Note that the print methods can cause a java.awt.print.PrinterException. eg.
The other option for print takes a boolean argument which indicates if the size of the entire image should be scaled to fit on the width of the page. A java.awt.print.PageFormat is also passed in where the page orientation can be set (default is portrait). The getPrintable method also takes a boolean argument which indicates if the size of the entire image should be scaled to fit on the width of the page. It returns a java.awt.print.Printable object, used for printing in Java. The other methods are for setting the headers and footers when the print methods are used. Strings containing the desired text to set are passed into these methods. The following information about the page can also be set by including the code in the string. The null value can be passed in to prevent headers or footers from being printed.
|
|||||||||||||||||||
|
|
|
|||||||||||||||||||
|
|
Copyright © JadeLiquid Software - www.jadeliquid.com |