Avery Dennison Platinum 6039 JavaScript User Manual

Page 24

Advertising
background image

3-6 Programmer’s Manual

B a t t e r y

IsBatteryOKToPrint

Description

Checks if the printer’s LiIon battery (located in the handle) is charged
enough to allow printing. Check the battery level before any printing
session.

Use this function immediately prior to printing, but not

during printing. If you use it during printing, the return

value is not accurate.

Syntax

IsBatteryOKToPrint

Parameters

None

Return Values

false

The battery level is too low to allow printing.

true

The battery level is high enough to allow printing.

Example

<SCRIPT src="./jsUltra.js"></SCRIPT>

<SCRIPT type="text/javascript">

PRINTER

.ClearSystemError():

// Clear any errors

if (PRINTER.IsBatteryOKToPrint)

// OK to Print

alert("Low

Battery");

</SCRIPT>

<BODY>

<OBJECT id=”PRINTER” style="LEFT: 0px; WIDTH: 0px; TOP: 0px;

HEIGHT: 0px"

classid=clsid:

19C1754D-BA97-43A1-A06D-496D2167400B>

</OBJECT>

//Instantiate

Class

</BODY>

Advertising