User manual - Web_Browser_Prog_Guide

5.0 Printing from HTML
There are numerous ways to print from the Naurtech Web Browser. Once a
printer is configured, print content may be specified via a special META tag, the
CEBrowseX or “external” objects, the custom PRINT tag, or with any ActiveX
control designed to print from a browser.
The Naurtech Web Browser maintains the printer configuration within the
Session configuration dialogs. Here you may specify a serial attached,
Bluetooth, IrDA, or network attached printer. We support both Windows Print
Queues and direct-to-port printing for network printers. See the CETerm User’s
Manual for more details on configuring a printer.
All of the techniques for specifying print content allow common escape
sequences to be embedded which will be converted to non-printable characters.
These include the carriage return (CR – “\r”), linefeed (LF – “\n”), and general
hexadecimal bytes (0xXX).
5.1 PRINTING WITH A META TAG
See the “ZebraLabel_Print” and “ZebraLabel_Complete” identifiers in the META
tag section for details on initiating a print from a META tag.
5.2 PRINTSTRING AND PRINT METHODS
The PrintString method on the CEBrowseX control and the Print method on the
“external” object behave similarly. In both cases, a string is constructed and sent
to the current printer.
<a href="Javascript:myprint();">Test External Print</a>
<script language=javascript>
function myprint()
{
external.Print(
"! 100 200 200 1225 1\r\n" +
"TEXT 0 2 1 0 Vendor\r\n" +
...
"JOURNAL\r\n" +
"PRINT\r\n"
);
}
</script>
5.3 NAURTECH:PRINT TAG
The custom PRINT tag is supported for compatibility with other browsers. See
the Symbol Web Client section for a discussion of this tag.