TE Edit Control Java / HTML-JavaScript Help
Product page

TerPrint

Print the current document.

boolean TerPrint(dialog)
boolean TerPrintEx(dialog, FirstPage, LastPage)
boolean TerPrint2(dialog, FirstPage, LastPage, Copies, Colate)
boolean dialog;Set to true to show a dialog box to the user.
int FirstPage;First page (zero based) to print. Set to -1 to disable page range printing. Set to -2 to print the current page. Set to -3 to print the selected text if text is selected, or the entire document if text is not selected. This parameter is ignored if the 'dialog' parameter is set true.
int LastPage;Last page (zero based) to print. This parameter is ignored if the 'FirstPage' parameter is set to -1,-2, -3, or the 'dialog' parameter is set to true.
int Copies;Number of copies to print Set to 0 to assume the 'copies' value from the printer setup information.
int Colate;When printing multiple copies, set this parameter to true to print all pages of the first set, before printing the next copy.

Description: This function can be used to print the current document. When the 'dialog' parameter is true, the editor displays a dialog box. The dialog box allows the user to print the entire document or the selected text.

The text is printed to the currently selected printer using the current settings for margins. The editor creates a new printer device context for printing.

Return Value: The editor returns a true value when the print job is successfully completed.