Zebra Kiosk Driver Reference Guide

Zebra Kiosk Driver Reference Guide
Zebra® Kiosk Driver
Reference Guide
P1006873-001
© 2008 ZIH Corp. The copyrights in this manual and the software and/or firmware in the printer described
therein are owned by ZIH Corp. Unauthorized reproduction of this manual or the software and/or firmware in the
printer may result in imprisonment of up to one year and fines of up to $10,000 (17 U.S.C.506). Copyright violators
may be subject to civil liability.
This product may contain ZPL®, ZPL II®, and ZebraLink™ programs; Element Energy Equalizer® Circuit; E3®; and
Monotype Imaging fonts. Software © ZIH Corp. All rights reserved worldwide.
ZebraLink and all product names and numbers are trademarks, and Zebra, the Zebra logo, ZPL, ZPL II, Element
Energy Equalizer Circuit, and E3 Circuit are registered trademarks of ZIH Corp. All rights reserved worldwide.
All other brand names, product names, or trademarks belong to their respective holders. For additional trademark
information, please see “Trademarks” on the product CD.
Proprietary Statement This manual contains proprietary information of Zebra Technologies Corporation and its
subsidiaries (“Zebra Technologies”). It is intended solely for the information and use of parties operating and
maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed
to any other parties for any other purpose without the express, written permission of Zebra Technologies Corporation.
Product Improvements Continuous improvement of products is a policy of Zebra Technologies Corporation.
All specifications and designs are subject to change without notice.
Liability Disclaimer Zebra Technologies Corporation takes steps to ensure that its published Engineering
specifications and manuals are correct; however, errors do occur. Zebra Technologies Corporation reserves the right
to correct any such errors and disclaims liability resulting therefrom.
Limitation of Liability In no event shall Zebra Technologies Corporation or anyone else involved in the creation,
production, or delivery of the accompanying product (including hardware and software) be liable for any damages
whatsoever (including, without limitation, consequential damages including loss of business profits, business
interruption, or loss of business information) arising out of the use of, the results of use of, or inability to use such
product, even if Zebra Technologies Corporation has been advised of the possibility of such damages. Some
jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation
or exclusion may not apply to you.
P1006873-001 Rev. A
Zebra Kiosk Driver Reference Guide
10/8/08
Contents
1 • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The Americas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Europe, Africa, Middle East, and India . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Asia Pacific . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
6
6
6
6
3 • Printing Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Paper/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Paper Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Copy Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Document Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Printer Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4 • Device Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 • Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Enable Bi-Directional Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Configure Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6 • Additional Properties Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Printer Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Monitor Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
4
Contents
7 • Paper/Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8 • Language Monitor and Advanced Driver Properties Restrictions . . . . . . . 33
Using Cut Per Document With Page Hold Enabled . . . . . . . . . . . . . . . . . . . . . . . . . .
Retract Behavior Set To “Eject” With Page Hold Enabled . . . . . . . . . . . . . . . . . . . . .
Restarting A Print Job During Cut/Eject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A Presenter Jam Doesn’t Clear All Print Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Offline/Online Status Is Not Automatically Updated . . . . . . . . . . . . . . . . . . . . . . . . . .
33
33
33
33
34
9 • Bi-Directional Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The Language Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Zebra Functions for Communication with the Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Windows APIs for Communication with the Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GetPrinter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Atl Object for Communication with the Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ATL Object Function and Property Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Event Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Registry Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
In the Printer Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
36
39
42
47
47
49
50
51
Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Appendix B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
1
Introduction
The TTP printer family consists of the following printers.
TTP 1000 series
TTP 2000 series
TTP 7000 series
TTP 8000 series
This document describes the drivers for Windows NT4, 2000 and XP, which are all based on
Microsoft Unidriver with special OEM plugins.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
6
Introduction
Contacts
Contacts
You can contact Zebra Technologies at the following:
Web Site
http://www.zebra.com
Technical Support via the Internet is available 24 hours per day, 365 days per year. Go to
http://www.zebra.com/support.
http://www.tycoelectronics.com/cust.stm
The Americas
Regional Headquarters
Technical Support
Customer Service Dept.
Zebra Technologies International, LLC
333 Corporate Woods Parkway
Vernon Hills, Illinois 60061-3109 U.S.A
T: +1 847 793 2600
Toll-free +1 800 423 0422
F: +1 847 913 8766
T: +1 866 322 5202
F: +1 847 913 2578
For printers, parts, media, and ribbon, please
call your distributor, or contact us.
E: [email protected]
T: +1 877 ASK ZEBRA (275 9327)
E: [email protected]
Europe, Africa, Middle East, and India
Regional Headquarters
Technical Support
Internal Sales Dept.
Zebra Technologies Europe Limited
Dukes Meadow
Millboard Road
Bourne End
Buckinghamshire, SL8 5XF, UK
T: +44 (0) 1628 556039
F: +44 (0) 1628 556003
Germany: [email protected]
France: [email protected]
Spain/Portugal: [email protected]
All other areas: [email protected]
For printers, parts, media, and ribbon, please
call your distributor, or contact us.
Regional Headquarters
Technical Support
Customer Service
Zebra Technologies Asia Pacific, LLC
120 Robinson Road
#06-01 Parakou Building
Singapore 068913
T: +65 6858 0722
F: +65 6885 0838
T: +65 6858 0722
F: +65 6885 0838
E: China: [email protected]
All other areas:
[email protected]
For printers, parts, media, and ribbon, please
call your distributor, or contact us.
T: +44 (0) 1628 556000
F: +44 (0) 1628 556001
T: +44 (0) 1628 556032
F: +44 (0) 1628 556001
E: [email protected]
Asia Pacific
P1006873-001
Zebra Kiosk Driver Reference Guide
T: +65 6858 0722
F: +65 6885 0836
10/8/08
3
Printing Preferences
You can reach the Printing Preferences either through the button in the Printer Properties or
directly through the right-click printer menu in the Printers Control Panel.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
8
Printing Preferences
In Printing Preferences you can only select Portrait or Landscape orientation; all other settings
are under the Advanced button.
If you select the Advanced button, the Advanced Options allow you to modify printing
behavior and quality.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Printing Preferences
Paper/Output
Paper/Output
Paper Size
The paper size allows you to adjust the printer default paper size to any one of the forms
available by default.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
9
10
Printing Preferences
Paper/Output
In addition to the currently available forms, you can create new ones in the Server Properties
dialog. To access this dialog, right click on a blank area in the Printers Control Panel and select
Server Properties from the menu that appears.
Select the form closest to what you want as your starting point and modify it with your
customizations. Give the form a new name (never overwrite the original form) and click Save
Form.
You may modify the height as well as the left and right margins.
Copy Count
Copy count prints multiple copies of each page sent. The printer can’t store and reproduce the
page sent to it, so this is handled by the host PC.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Printing Preferences
Document Options
Document Options
Some of the document options override parameter settings stored in the printer. When the
printer is turned off and back on, the overridden parameters return to their default value. This
is normally not a problem because the selections you make in Windows are sent to the printer
with each page printed. However, it is an advantage to have the same parameters both stored in
the printer and set up in Windows.
Example • The Windows settings are not used during operations such as paper loading, so if
you are using paper with black registration marks, it is recommended to have your black
mark configuration set in the printer as well as in the Document Options. This way, auto
loading of paper will work correctly even if the printer has been turned off.
The Document Options dialog includes two printer-specific parts: the Printer Features and the
Advanced Features.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
11
12
Printing Preferences
Document Options
Printer Features
[
The following table shows the driver settings and their corresponding printer parameters:
Table 1 • Printer Parameters
Printer Parameter
Parameter
Number
Page Type
Document Mode
36
Printing Speed
Max print speed
8
Burn time
7
Retract Setting
Waste basket mode
45
Paper Cut Mode
—
—
Clear Presenter After Print
—
—
Hold Page After Print
—
—
Vertical Mount
System
57
Slow Presenter
—
—
Driver Setting
Burn time
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Printing Preferences
Document Options
Page Type
The Page Type selection will control the cutting position.
• Page Based
The printer will always feed as much paper as it needs for the set default Paper Size and
then cut the paper at the end of the page.
Example • If you have four inches of text and you have “Letter” selected as your paper
size, you will get a Letter-sized (11in) page.
• Roll Based
The printer will cut the page after the last line of text plus any additional paper
advancement set in the Advanced Feature section.
Example • If you have four inches of text, the printer will end the page after this text.
• Black Mark
The cut will be controlled through the Black Mark settings and the Black Marks on the
underside of the paper. (Also known as registration or sense marks).
Printing Speed
The printing speed setting will change the actual print speed according to the value selected
and as referenced in the Installation / Technical Manual for your printer. You rarely need to
change this setting, as the default is the maximum speed.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
13
14
Printing Preferences
Document Options
Burn Time (Paper Sensitivity)
Burn time will change the burn time setting in the printer according to the value selected and
as referenced in the Installation /Technical Manual for your printer. A higher value gives more
dense (darker) print, but may also slow down printing.
Retract Setting
The Retract Setting controls the Waste basket mode in the printer and sets the value of
parameter 45 according the Technical Manual. This setting consists of two parts: what occurs
when a new page is sent to the printer, and what occurs after a given timeout. For example, the
selection “Retract and retract after 30 sec” will retract the page currently in the presenter when
a new page arrives. If no new page arrives, any page remaining in the presenter after 30
seconds will be retracted. The options “Eject” and “Retract” do not have any timeout action;
the page will be ejected or retracted when a new page arrives to be printed.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Printing Preferences
Document Options
Table 2 • Retract and Retain Settings Overview
What to do with uncollected
printouts remaining in
presenter when a new page is
to be printed:
When the customer
does not take the
printout:
After what time is
this action
performed:
Setting:
Eject
Do nothing
Disabled
Eject
-”-
Retract
10 s
Eject and retract after 10 sec
-”-
Retract
20 s
Eject and retract after 20 sec
Etc.
Etc.
-”Retract
Do nothing
Disabled
Retract
-”-
Retract
10 s
Retract and retract after 10 sec
-”-
Retract
20 s
Retract and retract after 20 sec
Etc.
Etc.
10 sec
Retract and retract after 10 sec, and
Hold page after print = ON
-”Hold until taken *
Retract
* Holds the subsequent pages in a print job until the completed & presented page is taken by the customer. If a page is not taken
before the timeout elapses, the entire print job is deleted from the Windows spooler. This function is not available on all printers.
Paper Cut Mode
Paper Cut Mode allows control of the way the printer operates after a Page End or Document
End. “Cut per document” will feed as many pages uncut through the presenter as the document
includes and cut at the end of the document.
Example • If your print job consists of 3 pages, you will end up with one long uncut sheet
which includes these three pages.
Note • If you intend to feed long documents: you can only loop a maximum of 60 cm
(23 in.) inside the presenter. When this amount has built up, the printer will start feeding out
the complete document while printing. The amount of paper looped is controlled by printer
parameter 9, “presenter loop length”. Please see the technical manual for more information.
Also, documents larger then 4 m (100 in.) will be cut after this length in order to assure
proper printer functionality.
“Cut per page” will cut every page (as defined by the selected page size) of a printed document
and present the existing page after the next page has started printing.
Example • If your print job consists of 3 pages, you will end up with 3 individually cut
sheets.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
15
16
Printing Preferences
Document Options
Note • If you print documents with more then one page you need to make sure that the paper
can be collected outside the printer, since a completed page will be ejected from the printer
when the next page prints. Ensure that the wastebasket setting is set to “Eject…” or else each
page of your document will be retracted back into the enclosure when a subsequent page
prints.
Clear Presenter After Print
When set to “On” this function enables a forced full eject after a page is printed and cut. If set
to “Off” the page will only be partially ejected, and the retract settings are in effect.
Hold Page After Print
This function holds the page in the presenter until the customer takes it even if new pages are
waiting to be printed. When the customer takes a page, the next page is printed, and so on.
If the customer does not take a page, the page remains in the presenter until the retract timer
elapses, then the presenter is cleared according to the behavior specified in the Retract Setting
and the rest of that print job is deleted from the Windows print spooler.
Note • The “Hold Page After Print” function relies on delicate interaction between the
printer and Windows, so bi-directional communication must be on and working before you
enable this function.
“Hold Page After Print” only works in “Cut Per Page” mode (because it needs individual
pages to hold).
Vertical Mount
The TTP20x0 printer supports vertical mounting of the printer. In this mode, the normal paper
exit is used as a retract slot, and the normal retract slot becomes the paper exit. To activate this
mode, change the Vertical Mount option to On.
Slow Presenter
The TTP20x0 printer supports slowing the presenter motor, resulting in a lower power spike
when the presenter motor is activated. This allows the printer to be used in lower temperatures
(as low as -20°C in some cases). To activate the slower presenter, change the Slow Presenter
option to On.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Printing Preferences
Document Options
Advanced Features
There are six advanced features which control printer behavior and print quality.
The following table shows the driver settings and their corresponding printer parameters or
commands:
Table 3 • Printer Commands and Parameters
Driver Function
Printer Command
Advance After Print
Uses ESC J to advance paper.
Paper Eject
Advances paper using ESC FF after it has been cut. Corresponds to
printer parameter 47, “Wall compensation”.
Reverse Before Print
Uses ESC j to reverse paper.
Black Mark Settings
Sets parameters 37 to 42.
Scaling
—
Image Adjust
—
Advance After Print
Advance After Print increases the bottom margin. If set to 0, the printer cuts directly after the
last text or graphics.
Note • This should be set to 0 in “Page Mode”, if not, the pages will be longer than the length
of the selected form.
Paper Eject
Paper Eject will allow control of the amount of paper fed out of the printer after cutting. This
value is only approximate, since the presenter is controlled with a DC motor. Adjust this
setting to work with the thickness of your kiosk wall.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
17
18
Printing Preferences
Document Options
Reverse Before Print
The Reverse Before Print setting allows the user to control the Top Margin of the document.
Since the printer has a physical distance between the print head and the cutter of either 14 mm
(for TTP 1000 and TTP 7000), 12 mm (for TTP 2000) or 19 mm (for TTP 8000) you will
always encounter a Top Margin of 12 mm, 14 mm or 19 mm respectively. This can be reduced
with this function.
Note • In order to assure printing safety and avoid paper jams), you must ensure that the
paper is not pulled back too far. A minimum Top Margin of 7 mm must be kept in order to
avoid paper jams. Do not set this value to greater than 7mm for TTP 1000, TTP 2000, and
TTP7000; or 12mm for TTP 8000.
Black Mark Settings
If the Black Mark is selected as the Page Type the driver will send Black Mark commands to
the printer. This allows using paper with top-of-form (registration, or sense) marks on the back
to be used.
Minimum Blackmark
Specifies the minimum length of the black mark in mm. Shorter marks are ignored. Use this to
filter out dirt on the back of the paper.
Maximum Blackmark
Specifies the length of the black mark in mm. Measure the length of the black mark on your
paper and enter that value here.
Marks 5 mm longer than the entered value will be interpreted as paper out.
Cut Position
This parameter defines the actual cut position relative to the Black Mark. When using fanfold
paper, position the cut about 1 mm after the perforation so that the chance of paper jam is
minimized.
Keep in mind that the physical distance between the paper sensor and the cutter is 14mm on
the TTP 1000 and TTP7000, 12 mm on the TTP 2000 and 19mm on the TTP 8000. Any
change to the cut position is in addition to the physical distance. For example, if the black
mark is 25mm after the desired cut position, set this value to 7 (19mm distance + 6mm
additional + 1mm to get past the perforation). This parameter can not be negative, so
determine your cut position based on the first black mark after your desired cut position.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Printing Preferences
Document Options
Note • The printer senses the black-to-white transition of the black mark. Measure from the
trailing edge of the black mark when you determine your cut position.
Note • In order to calibrate the printer for the specific black mark density used you can put
the printer into calibration mode by selecting the Calibration button on the Zebra Tab in
Printer properties. (This is only implemented for the TTP 8000 series.)
Scaling
Scaling allows resizing the actual print view to fit the paper size. This can be important if Web
pages, etc. exceed the printable area of the printer and you want to see all the information on
the page.
Also, for the small-format printers you can define larger pages and scale the page down to the
actual paper size.
Note • The paper can be redefined in the Server Properties, where you start with the actual
paper form, resize it to the desired size, then save this new form with a new name. See
on page 8.
Image Adjust
If the Image Adjust is set to true, the driver will use special dithering algorithms in order to
modify the page to be printed on the B&W thermal printer.
Brightness
The Brightness setting will change the lightness of the printed page. Decreasing the value will
make the picture darker and increasing it will make the picture lighter.
Note • Setting this to negative values will change white pixels to shades of gray.
Contrast
The Contrast setting will change the contrast (difference between black and white) of the
image.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
19
20
Printing Preferences
Document Options
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
4
Device Settings
Device settings are used for the TTP 1000, TTP 2000 and TTP 7000 series printers only.
Device settings are not used for the TTP 8000 series.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
22
Device Settings
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
5
Ports
The Ports option is used to setup the IO port used to print to the printer and also to configure
the serial IO if used.
The following port types are usually available: LPT, COM, USB.
• LPT (parallel) port is commonly used and doesn’t need any setup. The printers TTP 1020,
TTP 2020, TTP 7020, and TTP 8200 can exchange status information via the parallel port
by means of the Language Monitor interface.
• COM (RS232 serial) port is generally an option typically used in text applications where
no Windows driver is used, due to its slow transfer speed. The Language Monitor
functions are not fully supported when using the RS232 interface.
• USB is a fast serial IO. It can be used with TTP 1030, TTP 2030, TTP 7030, and TTP
8200. The USB port also allows exchanging status information by means of the Language
Monitor interface.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
24
Ports
Enable Bi-Directional Support
Enable Bi-Directional Support
This selection enables use of the Language Monitor.
The Language Monitor is an additional DLL in the Windows driver chain that allows the
printer to exchange status information with the PC. In order to use the Language Monitor it is
necessary to program support for it within an application.
Note • In order for the printer to operate under all error situations the printer parameter 5
“Disable parallel port signaling” must be set to 1 when using the parallel interface. The
Technical Manual describes how to set parameters in the printer, and utility programs for this
are available from Zebra.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Ports
Configure Port
Configure Port
Port settings are available if you use the serial COM port or the parallel LPT port. This port is
not commonly used with the Windows driver because of its limited transfer speed.
There is one option under Configure Port when using the parallel interface, Transmission
Retry timeout. In the event that there is a problem in communicating with the parallel printer,
Windows will suspend port activity for this duration. After this timeout has elapsed, it will
retry communication.
• Bits per second
This setting must match the Baud rate setting in the printer parameters (1).
• Data bits
This setting must match the Data bits setting in the printer parameters (2).
• Parity
This setting must match the Parity setting in the printer parameters (3).
• Stop bits
The printer is fixed at 1 stop bit.
• Flow control
This setting has to match the Flow control setting in the printer parameters (4).
When using the Windows driver, you must always use Hardware flow control. Graphical page
data may very well contain the XON (11h) or XOFF (13h) characters which will interrupt data
transfer.
Note • The port settings have to match the settings in the printer based on parameters 1
through 4.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
25
26
Ports
Configure Port
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
6
Additional Properties Tabs
Depending on your printer model and driver version, you may have two additional Properties
Dialog Tabs, Printer Keys and Monitor Keys:
These two tabs provide an interface to the registry-based events, status, and settings used in the
Zebra Windows Driver.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
28
Additional Properties Tabs
Printer Keys
Printer Keys
• The Printer Keys tab displays printer information that is stored in the registry.
• “FW rev.” displays the firmware version loaded on the printer.
Note • The Language Monitor cannot always obtain this information, especially on
parallel printers.
• “PCB rev.” displays the revision of the printer control board.
• “PCB SN” displays the serial number of the PCB.
Note • The PCB SN is NOT the serial number of the printer! The serial number of the
printer is found on a printed label on the side of the printer and cannot be obtained
through software.
• “Error” is the printer status code, as described in the Language Monitor section 8 of this
document.
Note • This value is current as of the time the Printer Properties Dialog is opened. You
can get an updated status by clicking the “refresh” button.
• “Ext error” is the printer extended status code, as described in the Language Monitor
section 8 of this document.
Note • This value is current as of the time the Printer Properties Dialog is opened. You
can get an updated status by clicking the “refresh” button.
• “Page Count” displays the number of pages that have been printed since the driver was
installed or the counter was reset. To set the counter manually, type a new page count and
click the Change button.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Additional Properties Tabs
Monitor Keys
To automatically calibrate your printer for use with blackmark (top-of-form) paper, load the
paper and click the “calibrate” button. After the calibration process, click the “save” button to
save the calibrated parameters.
If you wish to find out the current firmware loaded on the printer or any of the other internal
parameters, you may print a self-test parameter sheet by clicking the “parameter sheet” button.
Monitor Keys
The Language Monitor keys tab allows changes to internal Language monitor.
Important • Do no alter these values unless instructed by Zebra Technical Support!
No further explanation will be given here.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
29
30
Additional Properties Tabs
Monitor Keys
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
7
Paper/Quality
All Zebra thermal printers are direct thermal printers which use special paper with a thermallysensitive coating on the print side.
You can get a variety of papers from different paper manufacturers for use with the Zebra
printer families. See the Technical Manual or our Web site for more information on paper
manufacturers and paper converters.
Thermal paper comes in different grades and qualities. For detailed information contact a
paper converter.
The most commonly-used paper for our printers is either a 3.5 mil (0.09 mm) non-top-coated
or top-coated paper. You can also use heavier or lighter paper with Zebra printers depending
on the printer specification. Please refer to the appropriate technical manual for these
specifications.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
32
Paper/Quality
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
8
Language Monitor and
Advanced Driver Properties
Restrictions
Using Cut Per Document With Page Hold Enabled
When cut per document is on, there is no cut and eject between pages of a job. The page hold
function waits for a page of a job to be taken before continuing. Since there was no cut/eject,
the user can’t take the page, and the LM waits indefinitely (freezes). A reboot and a printer
power cycle are necessary. Even then, the job may not be able to be deleted easily.
Solution: Don’t allow page hold function to be used with cut per document mode.
Retract Behavior Set To “Eject” With Page Hold Enabled
The LM will hold the job pending the retrieval of the page. If the page is not taken, the printer
ejects the page after about 1 minute. The next page prints, but the LM hangs. A reboot and a
printer power cycle are necessary, and even then, the job may not be able to be deleted easily.
Solution: The LM is not receiving the NAK 16 signal, since there was no official timeout and
retract/eject. Do not use these settings together. Use one of the two-part settings, such as Eject
and Retract after 60 seconds.
Restarting A Print Job During Cut/Eject
Restarting a print job while the job is in the cut/eject phase may lock the LM and require a
reboot.
Solution: Under normal printing circumstances, this should never happen.
A Presenter Jam Doesn’t Clear All Print Jobs
When a presenter jam occurs, the Language Monitor will not delete all print jobs in the
spooler, only the current print job (the job that encountered the error). All pending print jobs
will be paused. After the error is cleared the spooled jobs will continue printing.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
34
Language Monitor and Advanced Driver Properties Restrictions
Offline/Online Status Is Not Automatically Updated
When the printer is powered off and powered on again, the printer status may not update in the
Windows Spooler. Also, if the printer is restarted with a pending error, or if the spooler is
restarted with a pending error, the status may not automatically update.
Solution: When a printer goes offline, Windows deactivates the Language Monitor used for
that printer. Language monitors are not restarted until a bi-directional operation comes through
the spooler. This operation can be a print job sending an ENQ (clear presenter) command to
the printer.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
9
Bi-Directional
Communication
The Language Monitor
The Windows operating system beginning with Windows NT4 had major restrictions with
regard to bi-directional communication when using a Windows driver. In Windows 98 you
could use a driver and still open the same port to write and read status information to it. After
Windows NT4, however, you need a Language Monitor to do the same thing.
The Language Monitor is part of the Windows driver and sits between the Driver UI and the
Port Monitor, which takes care of the direct communication with the selected port.
The Zebra Language Monitor has two different interfaces: The LmPrinterIoControl function
which is a proprietary (OEM) function and the Windows (API) function GetPrinterData. It
also offers an event notification when status of the printer changes.
See the TTP Language Monitor Implementation Guide for complete descriptions and
programming examples.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
36
Bi-Directional Communication
Zebra Functions for Communication with the Printer
Zebra Functions for Communication with the Printer
The proprietary function LmPrinterIoControl was originally built into the Language Monitor
to provide bi-directional support for the first generation of TTP 1000 printers. This function
has been modified over the years and is still available for status communication with the
TTP 1000, TTP 2000, TTP 7000, and TTP 8000 families. Nevertheless the general
functionality has been changed to accommodate more stability.
Note • For new developments it is strongly recommended not to use this function due to the
complexity of its use. The event notification and the GetPrinterData function are the
preferred method of status inquiry.
In order to use the LmPrinterIoControl function you need to load the LM library and open the
function with the following structure:
• proc=(BOOL(__stdcall*)(PVOID,DWORD,PVOID,DWORD,PDWORD))
GetProcAddress(hLib, FUNC_NAME);
To enable an easier handling of this function we designed an interface function, which is
included in the TTP.CPP source file and the TTP.h header file.
These files need to be included into your C/C++ project; then you will be able to call the
simpler function getPrinterData defined in TTP.CPP.
The following function calls can be executed:
Table 4 • TTPKEY Structure
TTPKEY ttpkey[13] =
{
{ "\x00\x00\x00", 3, 1, REG_BINARY, TEXT("Language Monitor")},
{ "\x1b\x05\x01", 3, 2, REG_BINARY, TEXT("Status General")},
{ "\x1b\x05\x02", 3, 1, REG_BINARY, TEXT("Paper Near End")},
{ "\x1b\x05\x06", 3, 2, REG_BINARY, TEXT("Status Report")},
{ "\x1b\x05\x07", 3, 2, REG_BINARY, TEXT("Program Version")},
{ "\x1b\x05\x09", 3, 6, REG_BINARY, TEXT("Serial Number")},
{ "\x1b\x05\x0a", 3, 1, REG_BINARY, TEXT("Hardware Revision")},
{ "\x1b\x05\x63", 3, 1024, REG_BINARY, TEXT("Device ID")},
{ "\x1b\x05\x50", 4, 4, REG_BINARY, TEXT("Get Parameter")},
{ "\x1b\x3F", 2, 0, REG_BINARY, TEXT("Reset Full")},
{ "\x1b\x40", 2, 0, REG_BINARY, TEXT("Reset Initialize")},
{ "\x00\x00\x01", 3, 4, REG_BINARY, TEXT("Auto Status")},
{ "\x00\x01\x01", 3, 4, REG_BINARY, TEXT("Ext Auto Status")}
};
The call “Language Monitor” has a special function: this result in the status of the spooler,
either “Printing” or “Not Printing”. All operations in the printer occur serially. As a
consequence, while the printer is performing mechanical operations, such as printing existing
data from the buffer, cutting, or ejecting, it cannot respond to communication requests. If you
attempt to query the printer during one of these operations, the call will likely fail, returning an
error. Therefore, If you are directly querying the printer status with the LMPrinterIOControl
function, you should first use the “Language Monitor” call to determine the spooler state.
When this call returns “Not Printing”, you may then attempt your regular status request.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Zebra Functions for Communication with the Printer
Calls with "Status General", "Paper Near End" and "Status Report" will result in printerdefined status (see the appropriate Technical Manual for more information), as will the other
available calls besides the call “Auto Status”. “Auto Status” will result in Windows compatible
status information.
If the printer is offline, the status will show the word DEAD in hex bytes in the first and
second return byte of ESC ENQ 1 and ESC ENQ 6. (First byte = 0xDE and second byte =
0xAD.) It is recommended to repeat this call a few times to ensure that the printer is really
offline and not just experiencing delayed communication.
Windows ompatible status with Auto Status
These statuses will also be stored in the printer ERROR key in the registry and can be
extracted with GetPrinterData.
Table 5 • Windows Status
Windows Status
Compares to Zebra Status
PRINTER_STATUS_PAPER_JAM
Paper jam (ESC ENQ 1 = 1)
PRINTER_STATUS_ERROR
Temperature error (ESC ENQ 1 = 6)
PRINTER_STATUS_PAPER_PROBLEM
Paper feed problem (ESC ENQ 1 = 5)
PRINTER_STATUS_DOOR_OPEN
Print head lifted (ESC ENQ 1 = 4)
PRINTER_STATUS_PAPER_OUT
Out of paper (ESC ENQ 1 = 3)
PRINTER_STATUS_USER_INTERVENTION
Cutter not home (ESC ENQ 1 = 2)
PRINTER_STATUS_PAPER_NEAR_END
Paper near end (ESC ENQ 6)
PRINTER_STATUS_PAPER_WEEKEND
Weekend paper status (ESC ENQ 6)
PRINTER_STATUS_ERROR
Undefined error
Statuses Defined in winspool.h
Table 6 • Status Defined in Winspool
10/08/2008
#define PRINTER_STATUS_ERROR
0x00000002
#define PRINTER_STATUS_PAPER_JAM
0x00000008
#define PRINTER_STATUS_PAPER_OUT
0x00000010
#define PRINTER_STATUS_PAPER_PROBLEM
0x00000040
#define PRINTER_STATUS_OFFLINE
0x00000080
#define PRINTER_STATUS_USER_INTERVENTION
0x00100000
#define PRINTER_STATUS_DOOR_OPEN
0x00400000
Zebra Kiosk Driver Reference Guide
P1006873-001
37
38
Bi-Directional Communication
Zebra Functions for Communication with the Printer
Statuses defined by Zebra
Table 7 • Status Defined by Zebra
#define PRINTER_STATUS_PAPER_NEAR_END
0x02000000
#define PRINTER_STATUS_PAPER_WEEKEND
0x04000000
#define PRINTER_STATUS_PAPER_AT_PRESENTER
0x08000000
#define PRINTER_STATUS_EXTERNAL_ERROR
0x10000000
Windows compatible status with Ext Auto Status
These statuses will also be stored in the printer EXTERNALERROR key in the registry and
can be extracted with GetPrinterData.
Below statuses are Extended Error statuses defined by Zebra. For the meanings of these NAK
responses, please see the appropriate Technical Manual for your printer, under the ESC ENQ 1
section.
Table 8 • Extended Error Status
#define NAK6
0x00000001
#define NAK7
0x00000002
#define NAK12
0x00000004
#define NAK13
0x00000008
#define NAK14
0x00000010
#define NAK16
0x00000020
#define BUFFEROVERFLOW
0x00000040
#define NAK 17
0x00000080
#define NAK 8
0x00000100
Note • Any other Windows status may be used in the future, so mask away undefined bits in
your application!
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Windows APIs for Communication with the Printer
Windows APIs for Communication with the Printer
In order to make bi-directional communication easier and also compatible to more then one
printer of the same kind on a specific PC, we implemented the Language Monitor function
GetPrinterData. This is a Windows API described in the Windows documentation. To retrieve
immediate printer status from the Spooler you can also use the function GetPrinter, however
the GetPrinterData function is preferred over GetPrinter due to the fact that with
GetPrinterData, all statuses and errors display, while with GetPrinter, only printer errors
display.
GetPrinterData
The GetPrinterData function retrieves configuration data for the specified printer or print
server.
Windows 2000/XP: Calling GetPrinterData is equivalent to calling the GetPrinterDataEx
function with the pKeyName parameter set to "PrinterDriverData".
DWORD GetPrinterData(
HANDLE hPrinter, // handle to printer or print server
LPTSTR pValueName, // value name
LPDWORD pType, // data type
LPBYTE pData, // configuration data buffer
DWORD nSize, // size of configuration data buffer
LPDWORD pcbNeeded // bytes received or required
);
Parameters
hPrinter
[in] Handle to the printer or print server for which the function retrieves configuration data.
Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
pValueName
[in] Pointer to a null-terminated string that identifies the data to retrieve.
For printers, this string is the name of a registry value under the printer's "PrinterDriverData"
key in the registry.
For print servers, this string is one of the predefined strings listed in the following Remarks
section.
pType
[out] Pointer to a variable that receives the type of data retrieved. The function returns the type
specified in the SetPrinterData or SetPrinterDataEx call when the data was
stored. This parameter can be NULL if you don't need the information.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
39
40
Bi-Directional Communication
Windows APIs for Communication with the Printer
pData
[out] Pointer to a buffer that receives the configuration data.
nSize
[in] Specifies the size, in bytes, of the buffer pointed to by pData.
pcbNeeded
[out] Pointer to a variable that receives the size, in bytes, of the configuration data. If the buffer
size specified by nSize is too small, the function returns ERROR_MORE_DATA, and
pcbNeeded indicates the required buffer size.
Return Values
If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the
return value is an error value. Please see the standard Windows error codes in the Windows
development documentation.
Remarks
GetPrinterData retrieves printer-configuration data set by the SetPrinterDataEx or
SetPrinterData function.
If hPrinter is a handle to a print server, pValueName can specify one of the following
predefined values.
SPLREG_DEFAULT_SPOOL_DIRECTORY
SPLREG_PORT_THREAD_PRIORITY_DEFAULT
SPLREG_PORT_THREAD_PRIORITY
SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT
SPLREG_SCHEDULER_THREAD_PRIORITY
SPLREG_BEEP_ENABLED
SPLREG_NET_POPUP
SPLREG_EVENT_LOG
SPLREG_MAJOR_VERSION
SPLREG_MINOR_VERSION
SPLREG_ARCHITECTURE
SPLREG_OS_VERSION
Windows 2000/XP: SPLREG_OS_VERSIONEX
SPLREG_DS_PRESENT (On successful return, pData contains 0x0001 if the machine is
on a DS domain, 0 otherwise.)
SPLREG_DS_PRESENT_FOR_USER (On successful return, pData contains 0x0001 if
the user is logged onto a DS domain, 0 otherwise.)
SPLREG_REMOTE_FAX (On successful return, pData contains 0x0001 if the FAX
service supports remote clients, 0 otherwise.)
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Windows APIs for Communication with the Printer
SPLREG_NET_POPUP_TO_COMPUTER (On successful return, pData contains 1 if job
notifications should be sent to the client computer, or 0 if job notifications are to be sent to
the user.)
SPLREG_RETRY_POPUP (On successful return, pData contains 1 if server is set to retry
PopUps for all jobs, or 0 if server does not retry PopUps for all jobs.)
In addition, the following values indicate pool printing behavior when an error occurs.
SPLREG_RESTART_JOB_ON_POOL_ERROR (Indicates the time, in seconds, when a
job is restarted on another port after an error occurs. This is used with
SPLREG_RESTART_JOB_ON_POOL_ENABLED.)
SPLREG_RESTART_JOB_ON_POOL_ENABLED (A nonzero value indicates that
SPLREG_RESTART_JOB_ON_POOL_ERROR is enabled.)
The time specified in SPLREG_RESTART_JOB_ON_POOL_ERROR is a minimum time. The
actual time can be longer, depending on the following port monitor settings, which are found
under:
HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\Moni
torName\Ports.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
41
42
Bi-Directional Communication
Windows APIs for Communication with the Printer
Zebra has added status functionality in the Language Monitor function
GetPrinterDataFromPort which is called by GetPrinterData. This way you can
get printer-specific data through this Windows function.
The following table gives an overview of the Zebra specific keys (pValueName) used with
GetPrinterData.
Table 9 • GetPrinterData Key Values
Printer DsMonitor Key
Explanation
Type
DeviceID
Printer’s device ID string
REG_BINARY
ERROR
Printer Error or Status in Windows 16-bit format (see BiDirectional Communication on page 35)
REG_DWORD
ErrorEvent
Error event name for error event trigger
REG_SZ
EXTERNALERROR
Extended status according to Appendix B
REG_DWORD
Firmware
Firmware version
REG_BINARY
PAGECOUNT
Page counter for cut pages
REG_DWORD
PCB_REV
Printers PCB revision number
REG_BINARY
PCB_SN
Printers PCB serial number
REG_BINARY
StatusEvent
Status event name for status event trigger
REG_SZ
Monitor Key
Explanation
Type
ACK_SLEEP
ACK marker sleep time
REG_DWORD
READ_SLEEP
Sleep time before a read after write
REG_DWORD
READ_THREAD_SLEEP
Read thread sleep time
REG_DWORD
READ_REPEAT
Read repeat count.
REG_DWORD
For more information about the ERROR and EXTERNALERROR status response see the
Remark section of the GetPrinter function.
GetPrinter
The GetPrinter function retrieves information about a specified printer.
BOOL GetPrinter(
HANDLE hPrinter, // handle to printer
DWORD Level, // information level
LPBYTE *pPrinter, // printer information buffer
DWORD cbBuf, // size of buffer
LPDWORD pcbNeeded // bytes received or required
);
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Windows APIs for Communication with the Printer
Parameters
hPrinter
[in] Handle to the printer for which the function retrieves information. Use the
OpenPrinter or AddPrinter function to retrieve a printer handle.
Level
[in] Specifies the level or type of structure that the function stores into the buffer pointed to by
pPrinter.
Windows NT/2000/XP: This value can be 1, 2, 3, 4, 5, 6, 7, 8 or 9.
pPrinter
[out] Pointer to a buffer that receives a structure containing information about the specified
printer. The buffer must be large enough to receive the structure and any strings or other data
to which the structure members point. If the buffer is too small, the pcbNeeded parameter
returns the required buffer size.
The type of structure is determined by the value of Level.
Table 10 •
10/08/2008
Level
Structure
1
A PRINTER_INFO_1 structure containing general printer information.
2
A PRINTER_INFO_2 structure containing detailed information about the printer.
3
Windows NT/2000/XP: A PRINTER_INFO_3 structure containing the printer's
security information.
4
Windows NT/2000/XP: A PRINTER_INFO_4 structure containing minimal
printer information, including the name of the printer, the name of the server, and
whether the printer is remote or local.
5
A PRINTER_INFO_5 structure containing printer information such as printer
attributes and time-out settings.
6
Windows 2000/XP: A PRINTER_INFO_6 structure specifying the status value
of a printer.
7
Windows 2000/XP: A PRINTER_INFO_7 structure that indicates whether the
printer is published in the directory service.
8
Windows 2000/XP: A PRINTER_INFO_8 structure specifying the global default
printer settings.
9
Windows 2000/XP: A PRINTER_INFO_9 structure specifying the per-user
default printer settings.
Zebra Kiosk Driver Reference Guide
P1006873-001
43
44
Bi-Directional Communication
Windows APIs for Communication with the Printer
cbBuf
[in] Specifies the size, in bytes, of the buffer pointed to by pPrinter.
pcbNeeded
[out] Pointer to a variable that the function sets to the size, in bytes, of the printer information.
If cbBuf is smaller than this value, GetPrinter fails, and the value represents the required
buffer size. If cbBuf is equal to or greater than this value, GetPrinter succeeds, and the value
represents the number of bytes stored in the buffer.
Return Values
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
Remarks
Zebra Printer status: It is recommended to use the PRINTER_INFO_3 structure to inquire for
the printer status presented by the LM.
Caution • The pDevMode member in the PRINTER_INFO_2, PRINTER_INFO_8, and
PRINTER_INFO_9 structures can be NULL. When this happens, the printer is unusable
until the driver is reinstalled successfully.
Windows NT/2000/XP: For the PRINTER_INFO_2 and PRINTER_INFO_3 structures that
contain a pointer to a security descriptor, the function retrieves only those components of the
security descriptor that the caller has permission to read. To retrieve particular security
descriptor components, you must specify the necessary access rights when you call the
OpenPrinter function to retrieve a handle to the printer. The following table shows the
access rights required to read the various security descriptor components.
Access Right
Security Descriptor Component
READ_CONTROL
Owner
Primary group
Discretionary access-control list (DACL)
ACCESS_SYSTEM_SECURITY
System access-control list (SACL)
Windows 2000/XP: If you specify level 7, the dwAction member of PRINTER_INFO_7
returns one of the following values to indicate whether the printer is published in the directory
service.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Windows APIs for Communication with the Printer
dwAction Value
Meaning
DSPRINT_PUBLISH
The printer is published. The pszObjectGUID member
contains the GUID of the directory services print queue object
associated with the printer.
DSPRINT_UNPUBLISH The printer is not published.
DSPRINT_PENDING
Indicates that the system is attempting to complete a publish or
unpublish operation. If a SetPrinter call fails to publish or
unpublish a printer, the system makes further attempts to
complete the operation in the background.
Zebra-added status functionality in the Language Monitor sets the spooler status with
Windows defined status and a few additional status values.
The following tables give an overview of the Windows and Zebra status responses.
Windows Style Status Response
Table 11 • Windows Status Response
Printer Status
Windows Status
Paper Jam
NAK 1
PRINTER_STATUS_PAPER_JAM
0x00000008
Cutter not home
NAK 2
PRINTER_STATUS_USER_INTERVENTION
0x00100000
Out of paper
NAK 3
PRINTER_STATUS_PAPER_OUT
0x00000010
Print head lifted
NAK 4
PRINTER_STATUS_DOOR_OPEN
0x00400000
paper-feed error
NAK 5
PRINTER_STATUS_PAPER_PROBLEM
0x00000040
Temperature error
NAK 6
PRINTER_STATUS_ERROR
0x00000002
Presenter jam
NAK 7
PRINTER_STATUS_ERROR
0x00000002
Paper jam during retract
NAK 8
PRINTER_STATUS_ERROR
0x00000002
Index Error
NAK 12
PRINTER_STATUS_ERROR
0x00000002
Checksum error
NAK 13
PRINTER_STATUS_ERROR
0x00000002
Wrong FW
NAK 14
PRINTER_STATUS_ERROR
0x00000002
Retract occurred
NAK 16
PRINTER_STATUS_ERROR
0x00000002
Paused
NAK 17
PRINTER_STATUS_ERROR
0x00000002
Paper near end
0x00 0x02
PRINTER_STATUS_PAPER_NEAR_END
0x02000000
Weekend sensor
0x00 0x40
PRINTER_STATUS_PAPER_WEEKEND
0x04000000
Paper at presenter
0x00 0x08
PRINTER_STATUS_PAPER_PRESENTER
0x08000000
Buffer overflow
0x10 0x00
PRINTER_STATUS_ERROR
0x00000002
Print data exist
0x40 0x00
PRINTER_STATUS_PROCESSING
0x00004000
PRINTER_STATUS_ERROR
0x00000002
External error
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
45
46
Bi-Directional Communication
Windows APIs for Communication with the Printer
Note • The spooler status is changed by SetPort. When using SetPort with custom messages,
you can’t set these to be displayed or used by the spooler. This is a known bug; SetPort
doesn't work with custom status messages. (Microsoft) Therefore, all custom messages have
been exchanged to PRINTER_STATUS_USER_INTERVENTION. The custom messages
are only accessible through the GetPrinterData function.
Extended Error Status Response
Table 12 • Extended Status Response
Printer Status
Decode With
Temperature error
NAK 6
0x00000001
Presenter jam
NAK 7
0x00000002
Index Error
NAK 12
0x00000004
Checksum error
NAK 13
0x00000008
Wrong FW
NAK 14
0x00000010
Retract occurred
NAK 16
0x00000020
Buffer overflow
P1006873-001
0x00000040
Paused
NAK 17
0x00000080
Paper jam during retract
NAK 8
0x00000100
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Atl Object for Communication with the Printer
Atl Object for Communication with the Printer
In order to make implementation of the original LmPrinterIoControl function easier, Zebra
implemented an ATL object TTPMONITOR. This DLL provides a function interface which is
easy accessible from many programming languages. It is not recommended for use in new
applications. For new applications you should instead use the Windows API functionality as
described above.
ATL Object Function and Property Definition
The SetCurrentPrinter property sets the current printer and loads the LM DLL and initializes
the Error and Status events.
• get_GetPrinterName will return the set printer name.
• getPrinterData returns the status information from the LmPrinterIoControl function.
The parameter id can have one of the following values:
Table 13 • getPrinterData ID Values
10/08/2008
#define
TTPKEY_LANGUAGE_MONITOR
0
#define
TTPKEY_STATUS_GENERAL
1
#define
TTPKEY_PAPER_NEAR_END
2
#define
TTPKEY_STATUS_REPORT
3
#define
TTPKEY_PROGRAM_VERSION
4
#define
TTPKEY_SERIAL_NUMBER
5
#define
TTPKEY_HARDWARE_REVISION
6
#define
TTPKEY_DEVICE_ID
7
#define
TTPKEY_GETPARAMETER
8
#define
TTPKEY_AUTO_STATUS
9
#define
TTPKEY_EXT_AUTO_STATUS
10
#define
TTPKEY_DEVICE_ID_FC
11
Zebra Kiosk Driver Reference Guide
P1006873-001
47
48
Bi-Directional Communication
Atl Object for Communication with the Printer
Table 13 • getPrinterData ID Values (Continued)
#define
TTPKEY_RESET_FULL
12
#define
TTPKEY_RESET_INITIALIZE
13
• GetENQ1 returns only the printer status ESC ENQ 1 in a WORD, in the form second byte
and then first byte.
• GetENQ6 returns only the printer status ESC ENQ 6 in a WORD, in the form second byte
and then first byte.
• GetErrorEventName returns the “Error event name” after the call of SetCurrentPrinter.
• GetStatusEventName returns the “Status event name” after the call of SetCurrentPrinter.
• HexStrToI implements a conversion function for the getPrinterData function results which
are Hex string results. The result of this function is an Integer representation of the Hex
string value.
• WaitForStatus implements a WaitForMultipleObjects and returns with the result of the
Wait function and the status result from the LmPrinterIoControl function call.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Event Notification
Event Notification
In order to for a program to not have to continuously poll the printer for status, Zebra
implemented an Event notification in the Language Monitor.
This notification, used together with the WaitForStatus function in the ATL object or the
WaitForMultipleObjects Windows function, enables applications to react on status changes
rather then looking for status periodically.
When the internal polling thread recognizes a status change or error then it will fire an event,
either an error or a status event.
The Application or the ATL object (TTPMONITOR) can open an event object to the LM
events and initialize a “Wait for event” function. The necessary event names can be extracted
from the registry.
When an event occurs, call the LmPrinterIoControl function with “Auto Status” or
GetPrinterData and you will get the error or status condition in the DWORD returned.
Note • To extract registry information you need to:
1. Starting with the printer name, open the HKEY_LOCAL_MACHINE with the following
path: "SYSTEM\\CurrentControlSet\\Control\\Print\\Printers\\%s" where %s stands for
the printer name.
2. Extract the string “Printer Driver” from this key.
3. Open the Printer driver with the following path:
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT
x86\\Drivers\\Version-3\\%s" where %s is the extracted printer driver from step 2.
4. Extract the string “Monitor” from this key
5. Open the Monitor with the following path:
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors\\%s" where %s is the
extracted monitor from step 4.
6. Extract the string “Driver” (the LM DLL) to be opened for function calls
7. Extract the Event names with the strings “ErrorEvent” and “StatusEvent” in older drivers
or use step 8 to open a new Key in newer drivers (after September 2004).
8. Open the Printer with the following path:
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Printers\\%s\\DsMonitor" and
extract the event names with the strings “ErrorEvent” and “StatusEvent”.
As an alternative you can call the GetPrinterData function with ErrorEvent or StatusEvent as
the key value and extract the event name to open the event handle.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
49
50
Bi-Directional Communication
Registry Entries
Registry Entries
In the Language Monitor Key
ACK_SLEEP = REG_DWORD
00000064
(100 decimal)
DeleteJob = REG_DWORD
00000001
(1 decimal)
Driver = REG_SZ
"10x0MON.DLL" or the
equivalent LM for the
specific printer
READ_REPEAT = REG_DWORD
00000001
(1 decimal)
READ_SLEEP = REG_DWORD
00000064
(100 decimal)
READ_THREAT_SLEEP = REG_DWORD
000005dc
(1500 decimal)
TransmissionRetryTimeout = REG_SZ
5
For older drivers (before September 2004) the following two entries are still available.
ErrorEvent = REG_SZ
"ErrorEvent1" or the equivalent name for the specific printer
StatusEvent = REG_SZ
"StatusEvent1" or the equivalent name for the specific printer
• The READ_THREAD_SLEEP controls the auto status inquiry time.
When the LM initializes it starts a read thread which in turn runs until the LM closes down.
During print idle time, the read thread is inquiring the status from the printer and signals a
status change to the listening application.
• ACK_SLEEP controls the sleep time in case of a page hold inquiry.
The page hold function is not available for all printers and is used together with a driver setting
in the 8x00 series driver.
• READ_SLEEP controls the sleep time between a status inquiry and the successive read
call.
When the LM is inquiring for status the printer needs time to gather the needed information
and therefore can’t react immediately. Since some printers react faster then others and the
speed of the PC system and the used OS are also variables which differ, this key was
implemented to fine-tune the application.
• READ_REPEAT controls the amount of re-tries on a failed read inside the LM read
function.
• DeleteJob controls the LM behavior when an error appears. In the case this value is 1 the
LM will delete all print jobs and if it is 0 it will hold the job and stop any spooler activities
until the error is resolved.
• TransmissionRetryTimeout is a parallel timeout setting in the Printer Properties which can
cause long delays while waiting for status. The Language Monitor is setting this to the
value in the registry key.
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Bi-Directional Communication
Registry Entries
In the Printer Key
In recent drivers (after September 2004) the Error and Status event names have been moved
into a separate key (DsMonitor) in the Printers section. This is to allow multiple printers of the
same kind to reflect status and error conditions independently, on the same PC.
DeviceID = REG_SZ
the printer’s DeviceID in hex value
ERROR = REG_BINARY
the printer’s error status according to Windows status values
EXTERNALERROR = REG_BINARY the printer’s error status according to ESC ENQ 1 (Zebra-specific)
ErrorEvent = REG_SZ
"ErrorEvent1" or the equivalent name for the specific printer
PAGECOUNT = REG_DWORD
current page count
PCB_REV = REG_BINARY
printer’s PCB revision
PCB_SN = REG_BINARY
printer’s serial number
StatusEvent = REG_SZ
"StatusEvent1" or the equivalent name for the specific printer
ErrorEvent and StatusEvent are the event names used in the LM to signal the current status
changes. When you open an event with the listed name you can wait for this event to happen
and inquire with the “Auto Status” or “Ext Auto Status” for the status value.
Note • The difference between “Auto Status” and “Ext Auto Status” is the return value. In
case of “Auto Status” you will get a DWORD back that is also stored in the ERROR value in
the registry and in case “Ext Auto Status” you will get two DWORD’s back where the first is
the ERROR and the second the EXTERNALERROR value in the registry which reflects the
printers ESC ENQ 1 value.
Note • When changes have been made in the registry it is necessary to reboot the PC (or restart
the spooler service) in order for the changed parameters to take effect.
10/08/2008
Zebra Kiosk Driver Reference Guide
P1006873-001
51
52
Bi-Directional Communication
Registry Entries
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
10
Appendix A
Below statuses are defined in winspool.h.
Table 14 • Winspool Statuses
#define PRINTER_STATUS_ERROR
0x00000002
#define PRINTER_STATUS_PAPER_JAM
0x00000008
#define PRINTER_STATUS_PAPER_OUT
0x00000010
#define PRINTER_STATUS_PAPER_PROBLEM
0x00000040
#define PRINTER_STATUS_OFFLINE
0x00000080
#define PRINTER_STATUS_USER_INTERVENTION
0x00100000
#define PRINTER_STATUS_DOOR_OPEN
0x00400000
Below statuses are defined by Zebra.
Table 15 • Zebra Statuses
10/08/2008
#define PRINTER_STATUS_PAPER_NEAR_END
0x02000000
#define PRINTER_STATUS_PAPER_WEEKEND
0x04000000
#define PRINTER_STATUS_PAPER_AT_PRESENTER
0x08000000
#define PRINTER_STATUS_EXTERNAL_ERROR
0x10000000
Zebra Kiosk Driver Reference Guide
P1006873-001
54
Appendix A
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
11
Appendix B
Below statuses are External Error statuses defined by Zebra.
Table 16 • External Error Statuses
10/08/2008
#define NAK6
0x00000001
#define NAK7
0x00000002
#define NAK12
0x00000004
#define NAK13
0x00000008
#define NAK14
0x00000010
#define NAK16
0x00000020
#define BUFFEROVERFLOW
0x00000040
#define NAK 17
0x00000080
#define NAK 8
0x00000100
Zebra Kiosk Driver Reference Guide
P1006873-001
56
Appendix B
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
P1006873-001
Zebra Kiosk Driver Reference Guide
10/08/2008
Index
A
C
adjust
image, 19
advanced features, 17
advanced, after print, 17
advanced, driver properties, 33
after print, advance, 17
after print, clear presenter, 16
after print, hold page, 16
appendix
A, 53
B, 55
atl object
communication with printer, 47
function, 47
property definition, 47
auto status
windows compatible status, 37
cartridges. See <Emphasis>media cartridges
cbbuf, 44
clear, all print jobs
presenter jam, 33
commands
printer, 17
communication
with printer, windows API’s, 39
communication with printer
atl object, 47
zebra functions, 36
configure, port, 25
contacts, 6
contrast, 19
control
flow, 25
copy count, 10
count, copy, 10
customer service, 6
cut mode, paper, 15
cut per documet
page hold enabled, 33
cut position, 18
cut/eject
restarting print job, 33
B
before print, 18
bidirectional support
enable, 24
bits
data, 25
per second, 25
stop, 25
black mark
settings, 18
blackmark
maximum, 18
minimum, 18
brightness, 19
10/8/08
D
data bits, 25
device settings, 21
document options, 11
driver properties, advanced, 33
Zebra Kiosk Driver Reference Guide
P1006873-001 Rev. A
58
E
eject, paper, 17
enable, bidirectional support, 24
entries, registry, 50
event notification, 49
ext auto status
windows compatible status, 38
extended error
status response, 46
media cartridges
ordering, 6
minimum, blackmark, 18
mode, paper cut, 15
mount, vertical, 16
N
notification, event, 49
nsize, 40
F
O
features
advanced, 17
features, printer, 12
flow control, 25
offline/online status
not automatically updated, 34
online/offline status, 34
options
document, 11
ordering media, 6
ordering media cartridges, 6
ordering ribbon and media, 6
ouput, paper, 9
G
getprinter, 42
parameters, 43
cbbuf, 44
hprinter, 43
level, 43
pcbneeded, 44
pprinter, 43
getprinterdata, 39
H
hold page, after print, 16
hprinter, 39, 43
I
image
adjust, 19
K
keys
printer, 28
L
language monitor, 33, 35
level, 43
liability, 2
M
maximum, blackmark, 18
media
ordering, 6
P1006873-001 Rev. A
P
page hold enabled
retract behavior
set to eject, 33
using cut per document, 33
page type, 13
paper
cut mode, 15
eject, 17
output, 9
quality, 31
sensitivity, 14
size, 9
paper output, 9
paper size, 9
parameters, 39
hprinter, 39
nsize, 40
pcbneeded, 40
pdata, 40
ptype, 39
pvaluename, 39
parameters, printer, 12
parity, 25
pcbneeded, 40, 44
pdata, 40
port
configure, 25
ports, 23
Zebra Kiosk Driver Reference Guide
10/8/08
59
position, cut, 18
pprinter, 43
preferences, printing, 7
presenter
clear after print, 16
slow, 16
presenter jam
clear all print jobs, 33
printer
commands, 17
features, 12
keys, 28
parameters, 12, 17
printing preferences, 7
printing speed, 13
ptype, 39
pvaluename, 39
scaling, 19
sensitivity, paper, 14
setting
retract, 14
settings
blackmark, 18
device, 21
size, paper, 9
slow presenter, 16
speed, printing, 13
status
defined by Zebra, 38
defined in winspool.h, 37
status response
extended error, 46
windows style, 45
stop bits, 25
Q
T
quality, paper, 31
technical support, 6
TTPKEY
structure, 36
type, page, 13
R
registry entries, 50
language monitor key, 50
printer key, 51
remarks, 40, 44
restarting
print job
cut/eject, 33
restrictions
advanced driver properties, 33
using language monitor, 33
retract behavior
set to eject
page hold enabled, 33
retract setting, 14
return values, 40, 44
reverse, 18
reverse, before print, 18
ribbon
ordering, 6
S
sales, 6
10/8/08
V
values
return, 40, 44
vertical mount, 16
W
windows API’s
communication with printer, 39
windows compatible status
auto status, 37
ext auto status, 38
windows style
status response, 45
winspool.h
statuses defined in, 37
Z
zebra functions
communication with printer, 36
Zebra Kiosk Driver Reference Guide
P1006873-001 Rev. A
Zebra Technologies International, LLC
333 Corporate Woods Parkway
Vernon Hills, Illinois 60061.3109 U.S.A
T: +1 847 793 2600
Toll-free +1 800 423 0422
F: +1 847 913 8766
Zebra Technologies Europe Limited
Zebra House
The Valley Centre, Gordon Road
High Wycombe
Buckinghamshire, HP13 6EQ, UK
T: +44 (0)1494 472872
F: +44 (0) 1494 450103
Zebra Technologies Asia Pacific, LLC
120 Robinson Road
#06-01 Parakou Building
Singapore 068913
T: +65 6858 0722
F: +65 6885 0838
http://www.zebra.com
© 2008 ZIH Corp.
P1006873-
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement