|
|
Intercepting Page loads
This example
shows how to manipulate print headers.
To remove
the print headers from documents before
printing:
//IIEBrowserCanvas (IIEBrowserCanvas)browser.print(1,
"header", "footer");
Description:
The print method can take integer values
to turn off print dialogs etc, it also takes
two String parameters. The String parameters
are the headers you wish to print.
//IMozillaBrowserCanvas browser.setPrefProperty("print.print_headerleft",
""); browser.setPrefProperty("print.print_headercenter",
""); browser.setPrefProperty("print.print_headerright",
""); browser.setPrefProperty("print.print_footerleft",
""); browser.setPrefProperty("print.print_footercenter",
""); browser.setPrefProperty("print.print_footerright",
"");
Description: The setPrefProperty
method takes two paramaters. The first String
parameter defines the print header affected.
The second String paramater is the value
for the corresponding header.
Specical
characters can be passed including:
&T - Document Title &U - Document
URL &D - Date &P - Page Number
&PT - Page Number of total pages |