Zebra KR203 Software Integrator Guide

Zebra® KR203
Kiosk Receipt Printer
Software Integrator
Guide
P1028248-001 Rev. A
© 2010 ZIH Corp. The copyrights in this manual and the softwa re and/or fir mware 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 Equalizer
®
Circuit; E3®; and Monotype Imaging fonts. Software © ZIH Corp. All rights
®
, ZPL II®, and ZebraLink™ programs; Element Energy
reserved worldwide. ZebraLink and all product names and numbers are trademarks, and Zebra, the Zebra
logo, ZPL, ZPL II, Element Energy Equalizer Circuit, and E
3
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 man ual contains proprietary information of Zebra
Technologies Corporation and it s subsid iaries (“Zeb ra Technologies”). It is intended solely for the information and use of parties operating and ma in taining the eq uip m ent de scr ibe d 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.
Product Improvements Continuous improvement of product s is a policy of Zebra
Technologies. All specifications and designs are subject to change without notice.
Liability Disclaimer Zebra Technologies takes steps to ensure that its published
Engineering specifications and manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and disclaims liability resulting therefrom.
Limitation of Liability In no event shall Zebra Technologies or anyone else involved in
the creation, production, or delivery of the accompanying produ ct (including hardwar e 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 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.

Contents

Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Who Should Use This Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
How This Document Is Organized. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Contacts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Windows Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Driver Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Printer Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Uninstall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Disconnecting the Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Advanced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Color Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Device Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Printer Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Import/Export Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
About. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Setting Black Mark Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
2
Contents
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Status Light Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Application LED States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Application User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Print Quality Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Media Sensing Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Other Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Resetting the Factory Default Values . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Contact Technical Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Windows Compatible Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Statuses Defined in winspool.h. . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Windows Incompatible Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Appendix B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
Background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
Implementation in Calling Application . . . . . . . . . . . . . . . . . . . . . . . . . B-3
Implementation in Monitor Thread. . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4
WMI Script to get Basic Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-8
Appendix C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
Setup Printer Forms in Windows XP and Vista . . . . . . . . . . . . . . . . . . C-1
Viewing and Creating Printer Forms . . . . . . . . . . . . . . . . . . . . . . . C-2
Setup Printer Forms in Windows 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . C-3

Who Should Use This Document

This guide is intended for use by any person who needs to setup software for use with the KR203 printer.
1

Introduction

How This Document Is Organized

The manual is set up as follows:
Introduction Windows Driver Installation, documentation, preferences, and properties.
Troubleshooting
Appendix A
Appendix B Programming Samples Appendix C Setting up forms.
This manual will be updated from time to time as printer functions and features may be added or amended. You will always find the latest edition on our web site (http://
www.zebra.com). If you require information for functions not found in this manual edition,
please contact Technical Support for your region or the Zebra partner the printer was purchased from.
Contact information, document conventions.
Status Light description, User Interface, Error Handling, and fixes to common printing problems.
Windows Compatible Status - equivalent Windows to driver error codes.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Introduction
2

Contacts

Contacts
Technical Support via the Internet is available 24 hours per day, 365 days per year.
Web Site: www.zebra.com
E-mail Back Technical Library:
E-mail address: emb@zebra.com
Subject line: Emaillist
Self Service Knowledge Base: www.zebra.com/knowledgebase Online Case Registration: www.zebra.com/techrequest
Which Department
Do You Need?
Regional Headquarters
Technica l Sup port
For questions on the operation of Zebra equipment and software, please call your distributor. For additional assistance, contact us.
Please have your model and serial numbers available.
Repair Service Department
For back-to-base service and repair.
Techni cal Training Department
For Zebra product training courses.
Inquiry Department
For product literature and distributor and dealer information.
Customer Service Department (US) Internal Sales Department (UK)
For printers, parts, media, and ribbon, please call your distributor or contact us.
Key:
T: Telephone F: Facsimile E: E-mail
The Americas
Zebra Technologies Inter national, LLC 475 Half Day Road, Suite 500 Lincolnshire, IL 60069 USA
T: +1 847 634 6700 Toll-free +1 866 230 9494 F: +1 847 913 8766
T: +1 877 ASK ZEBRA (275 9327) F: +1 847 913 2578
Hardware: ts1@zebra.com Software: ts3@zebra.com
Kiosk Printers:
T: +1 866 322 5202
kiosksupport@zebra.com
T: +1 877 ASK ZEBRA (275 9327) F: +1 847 821 1797
E: repair@zebra.com To request a repair in the U.S.,
go to www.zebra.com/repair T: +1 847 793 6868
T: +1 847 793 6864 F: +1 847 913 2578
E: ttamerica@zebra.com
T: +1 877 ASK ZEBRA (275 9327) E: inquiry4@zebra.com
T: +1 877 ASK ZEBRA (275 9327) E: clientcare@zebra.com
.
Europe, Africa,
Middle East, India
Zebra Technologies Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire, SL8 5XF United Kingdom
T: +44 (0) 1628 556000 F: +44 (0) 1628 556001
T: +44 (0) 1628 556039 F: +44 (0) 1628 556003
E: Tseurope@zebra.com
T: +44 (0) 1772 693069 F: +44 (0) 1772 693046
New requests: ukrma@zebra.com Status updates:
repairupdate@zebra.com
T: +44 (0) 1628 556000 F: +44 (0) 1628 556001
E: Eurtraining@zebra.com
T: +44 (0) 1628 556037 F: +44 (0) 1628 556005
E: mseurope@zebra.com
T: +44 (0) 1628 556032 F: +44 (0) 1628 556001
E: cseurope@zebra.com
Asia Pacific
Zebra Technologies Asia Pacific Pte. Ltd. 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: tschina@zebra.com
All other areas:
tsasiapacific@zebra.com
T: +65 6858 0722 F: +65 6885 0838
E: China: tschina@zebra.com
All other areas:
tsasiapacific@zebra.com
T: + 65 6858 0722 F: +65 6885 0838
E: China: tschina@zebra.com
All other areas:
tsasiapacific@zebra.com
E: China:
GCmarketing@zebra.com
All other areas:
AP ACChannelmarketing@zebra.co m
T: +65 6858 0722 F: +65 6885 0836
E: China: order-csr@zebra.com
All other areas:
csasiapacific@zebra.com

Document Conventions

The following conventions are used throughout this document to convey certain information:
Alternate Color – Cross-references contain links to othe r sections in this guide. If you are viewing this guide online, click the blue text to jump to its location.
Important • Advises you of information that is essential to complete a task. Note • Indicates information that emphasizes or supplements important points of the main
text.
Introduction
Document Conventions
3
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Introduction
4
Document Conventions

Description

The Windows driver is the only method of communicating with the printer. The driver’s functions also include: the rendering engine, user interface, and a language monitor for reporting printer functions. The driver interface includes tools for updating the printer firmware, checking and printing configuration status, and setting up for different types of media.
2

Windows Driver

The driver currently runs on Windows XP, Windows Vista, Windows 7, Windows Server 2003, and Windows Server 2008.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
6

Installation

Installation

Driver Installation

Important • To update the driver to a newer version it is recommended that any previous
version be removed prior to updating. Refer to "Uninstall"on page 11. Note • Make sure you download the latest driver from the Zebra website (see
"Contacts" on page 2). The driver will be downloaded as a ZIP file - you will need an
extraction utility to access the driver installer file.
1. Double-click on the Zebra Kiosk Printer Driver icon to launch the installer.
The Welcome Window is displayed.
2. Click Next.
A window containing important information is displayed. This information covers continued installation instructions.
Windows Driver
3. Click Next.
4. Depending on your Windows configuration and us er leve l, a warnin g ma y be
displayed informing you that the software has not passed Windows Logo testing.
Installation
7
5. Click Continue Anyway.
The installation will proceed by installing the necessary files onto your computer. The default directory ocation for the installed files is
C:\Zebra\Kiosk\WindowsDriver\KR203.
Once the installation has completed, the Completed Window will be displayed.
Make sure the printer has power and connect the USB cable to the printer and to the computer.
6. Click Finish.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
8
Installation

Printer Installation

Apply power to the printer and connect the USB cable to the printer and to the host computer.
The Windows Found New Hardware Wizard will be displayed.
1. Select “No, not this time” and click Next.
A dialog box will appear asking how to install the printer. Select “Install software automatically (Recommended)”.
Windows Driver
2. Click Next.
Depending on your Windows configuration and us er leve l, a warnin g ma y be displayed informing you that the software has not passed Windows Logo testing.
3. Click Continue Anyway.
Installation
9
A dialog box will appear asking you to insert the disk containing the Zebra Driver. Click OK.
4. A dialog box will appear prompting you for the location of the Zebra Driver. Click
Browse and navigate to C:\Zebra\Kiosk\WindowsDriver\KR203..
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
10
Installation
5. Click OK..
6. Click Finish.

Uninstall

Windows Driver
1. Disconnect the USB cable from the host computer.
2. Double-click on the Zebra Kiosk Printer Driver icon to launch the installer.
The Welcome Window is displayed.
3. Select “Uninstall”.
Installation
11
4. Click Next.
The Utility will remove the files from the computer.
5. Click Finish.
6. Restart the computer.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
12
Installation

Repair

If the driver is not functioning properly , rather than uninst alling and rein stalling the driver it can be repaired.
1. Disconnect the USB cable from the host computer.
2. Double-click on the Zebra Kiosk Printer Driver icon to launch the installer.
The Welcome Window is displayed.
3. Select “Repair Application”.
4. Click Next.
The Utility will reinstall the necessary files onto the computer.
5. Click Finish.
6. Restart the computer.

Disconnecting the Printer

The printer may become disconnected from the host computer due to po wer loss or due to repair procedures. If the host computer is running Windows XP, Windows Vista, Windows 7, Windows Server 2003, or Windows Server 2008, the host computer will automatically recognize the printer upon reconnecting.
Proceed with the repair procedures or po wer on proced ures, or wait ten seconds and the n reconnect the printer to the host computer.
Windows Driver
Installation
When the printer is disconnected, the printer icon will show “Offline” then “Offline-Offline”. The printer icon will also be “grayed out” as it cannot be found by the host computer.
The printer icon will show “Offline” then “Not Available”.
13
Press and release feed button on the printer to feed a blank receipt.
The printer icon will show “Output Bin Full - Not Available” then “Output Bin Full”.
Remove the receipt from the presenter.
The printer icon will show “Ready”.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
14

Properties

Properties

General

The Zebra Kiosk Printer Windows driver is based on the Microsoft Unidriver arch itecture for raster based printers. Zebra provides two OEM libraries (UI and Rendering) to enable specific printer functionality within the driver. In addition to the standard Microsoft driver, Zebra provides a bi-directional interface through a Language Monitor DLL.
All of the OEM features will be described below. To access the printer properties, in the control panel select Printers and Faxes; right click
on the printer icon and select properties. In Windows 7, log in as an Administrator and open the Print Management window; right click on the printer and select properties.
The General Tab enables access to the printers basic settings.
Printer Name – Assigning the printer a custom name makes it easier to identify it if
there is an error.
Windows Driver
Properties
Location – Entering a location let’s you know where the printer is should an error need
to be corrected. Comment – Any additional information about the printer that may be helpful. Printing Preferences – Simple information about the page layout and paper quality.
15
Advanced settings such as output, graphic options, and document options.
Print Test Page – Sends a page to the printer to see if everything is working properly.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
16
Properties

Sharing

The sharing tab enables you to share the printer with other computers.

Ports

Windows Driver
Properties
The Ports tab enables you to assign the printer to a specific port on the computer . Additionally, by having the “Enable bidirectional support” box checked, the printer can send messages to the computer. “Enable printer pooling” is useful when multiple printers are connected to the same PC and shared resources are necessary to print many documents, or as a backup.
17
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
18
Properties

Advanced

The Advanced Tab enables you to control when receipts are printed.

Color Management

Windows Driver
Properties
19
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
20
Properties

Device Settings

The Device Settings Tab is where the main features of the printer are configured.
Form To Tray Assignment – Selects the media width and page length. The driver
supports page length from 92mm to 60 0mm with th e defaul t set to 400 mm. The d river
supports page widths of 58, 60, 80, and 82.5mm. The d river incorporates a side
margin of 2mm. For suggestions on making custom forms, refer to "Setup Printer
Forms in Windows XP and Vista" on page C-1, and "Setup Printer Forms in Windows
7" on page C-3.
Printer Settings – Darkness sets the level of the black on the page. The range of the
darkness setting is from 0 to 30 with the default setting at 20.
Max Print Speed is how fast the page will print. The range of the max print speed
setting is from 75mm to 152mm/sec with the default setting at 152 mm/s. Document Settings – Media Tracking sets continuous, variable length, or mark
sensing with the default set to variable length.
When media tracking is set to continuous, the driver sends the full page size to the
printer (Page Mode). The page length will always be the same as the selected paper
Windows Driver
Properties
size (e.g. if 58mm x 200mm Roll Paper is selected, the print will be 200mm long in
Page Mode).
When media tracking is set to variable, the driver will shorten the print to only contain
the imaged document. The driver will end the print after the last printed element (text,
barcode, or graphic) then send a feed, cut, and eject command. Th e p age length ma y
vary from page to page but will always be a minimum of 92mm.
When mark sensing is set, the driver will send the page size to the printer, the printer
will restrict the print to the area between the black marks. If the printed area is larger
than the space between the black marks, it will print additional pages (receipts).
The margin values in the receipt application must be corrected after setting the driver
values. If the margin in the application is set to 9mm and the driver is set to 2mm, the
application setting will be enforced unless the driver is changed accordingly.
Compression sets whether the data is sent to the printer compressed or
uncompressed. If the data is sent uncompre ssed, this may r esult in longer pr int times.
However, depending on the complexity of the image, compressed data may not
significantly reduce print time.
21
Presenter Settings – Cutter Mode determines how the receipt is cut; Partial Cut Wid th
sets the width of paper that remains attached in the center of the receipt after a
cut.The range is 0 and 1mm to 60mm. If the range is set to 0 then the receipt will be
cut completely. Partial cut is activated only when “cut per document” is selected - in
other words, when a multi-page document is sent to the printer, each p age will receive
a partial cut and a full cut at the end of the document. Note: Partial cut will only work
with Document mode and will be set to 0 otherwise.
Presenter Loop Length determines how much paper is held in the presenter loop.
Eject Length determines how much paper is exposed for the customer. The range is
from 1mm to 600mm with the default set to 50mm. If the eject length is set larger than
the length of the receipt, the printer will retain a portion of the receipt in the presenter
unless the “Clear Presenter” option is set to “Yes”.
Presenter Length Addition is an additional length to compensate for the thickness of
the kiosk wall. The range is from 0 to 255mm with the default set to 0.
Presenter Timeout determines how long the presenter will hold the receipt before
ejecting it. The range for the timeout is from 0 to 300 seconds with the default set at 0.
Clear Presenter determines if a receipt is retained, or if it is ejected after the the
presenter. Clear Presenter should not be used with Page Hold and will be set to No if
Page Hold is selected.
Page Hold determines if individual pages of a multi-page print are held. The driver
shall monitor the presenter to determine if it has cleared befo re sending the next page .
Page Hold should only be used with Cut per page and will be set to No otherwise.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
22
Properties

Tools

The Tools Tab enables access to diagnostic functions and controls.
Clear Kiosk Presenter – Ejects any media in the presenter. Send PRN File – Sends a saved PRN file to the printer. Update Firmware – Calls the firmware downloader utility and updates the printer
firmware. Set Black Mark Mode – Sets the printer to use black mark media. Set Continuous Mode – Set the printer to print continuous pages. Feed One Receipt – Feeds a single blank receipt. Print Config Label – Prints a page with the printer configuration information. The
“Enable bidirectional support” box must be checked (see "Ports"on page 17).
Windows Driver
Properties
Printer Controls – Provides additional control for the spooled print job.
Delete Print Job on Error: When checked, the driver will delete all print jobs when an
error occurs; this includes the current and all following print jobs. When not selected,
only the current print job will be deleted; all following print jobs will be retained.
Send Printer Parameter: When checked and on ly send some contro l commands when
unchecked.
Set vertical home position to zero: When checked, the top margin is set to. It will add
the margin to the end of the page when in Continuous mode and discar d the margin at
the end if in V ariable mode. In Continuous mode, it will also subtract from the printable
area.
23
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
24
Properties
Update Firmware
Check the firmware version installed on the printer by printing a configuration label, the firmware version will be shown. Go to the Zebra Website at www.zebra.com to check the latest version.
Follow the procedures on the website and download the firmware package to the computer to which the printer is connected to and that runs the driver.
From the Tools tab, click on “Update Firmware”. A dialog box will appear. Select the printer to be updated. Then, click “Select Firmware” and navigate to the
firmware package downloaded from the Zebra Website.
Click “Download Firmware”. Confirm the installation by clicking Yes.
Windows Driver
Properties
25
The status light on the printer will flash intermittently between green and red indicating that a firmware update is in progress. The printer will reset and the Found New Hardware Wizard will begin configuring the printer with the new firmware. Click “Finish” to continue.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
26
Properties

Printer Information

The Printer Information Tab gives detailed information about the service of the printer. The “Enable bidirectional support” box must be checked (see "Ports" on page 17).
Cut Odometer – Displays the number of cuts made. Length Odometer – Displays how much media has been fed through the printer. Serial Number – Displays the serial number of the connected printer. Windows Error – Show the windows error code. Printer Status – Displays the state of the printer. See Table A-1 on page A-1 for errors
descriptions. Refresh – Changes the information shown in the Printer Information tab to the most
current condition.

Import/Export Settings

The Import/Export Tab enables you to save the current printer configuration for use with other printers.
Windows Driver
Properties
27
Export – Saves the current printer configuration to a file. Import – Imports a saved printer configuration file. Default – Resets all settings to the default parameters.
When Importing or defaulting the properties you should cancel out of th e UI to se t t he
newly loaded parameters since an OK will apply the currently set parameters in the
Device Settings. Alternatively you can tab through the settings in Device Settings and
it will change to the newly loaded properties.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
28
Properties

About

The About Tab shows the current driver version.

Setting Black Mark Mode

The printer is optimized to detect black marks printed with IR sensitive ink and ignore pre­print in IR blind ink.
For 80 and 82.5mm media, the black marks will be centered 30mm to the right of the paper center when viewing the imaged side of the receipt and print dir ection is downward; for 58 and 60mm media, the black marks will be centered 22mm to the left of the paper when viewing the imaged side of the receipt and the print direction is downward.
The printer will support media with black mark thickness in printing direction of 2.5 –
9.0mm, and a width of 5.0 – 10.0mm when the black mark is centered on the sensor. Refer to the Hardware Integrator Guide (P1028247) for black mark media requirements.
1. Choose the correct media guide for the desired media width. Refer to the Hardware
Integrator Guide (P1028247) for media guide installation instructions.
2. Perform a media guide calibration. Refer to "Application User Interface" on page 63.
Windows Driver
Setting Black Mark Mode
29
3. Load the desired media.
4. In the Tools tab of the Windows driver, click “Set Black Mark Mode”. A dialog box will
appear asking to confirm your selection, click “Yes”.
5. The printer will feed media, detect the black marks, and eject the media. Press the
Feed button on the printer several times to confirm the printer is cutting directly in the
center of the black marks.
6. In the device settings tab of the Windows driver, set the media tracking to “Mark
Sensing”. If you revert back to Continuous mode, set the media tracking back to
Continuous or Variable.
For information on black mark media requirement s, refer to the Hardware Integrator Guid e (P1028247).
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
Windows Driver
30
Setting Black Mark Mode

Troubleshooting

Status Light Descriptions

Application LED St ates

3
Immediately after power is applied to the printer, a brief self test is performed and the status light will report the following conditions:
Table 3-1 • Application LED States
Solid Green 0 - OK This code is reported when no other
codes are active. It indicates the printer is functioning normally.
One Red Flash 1 - Paper Jam in
Presenter
Two Red Flashes 2 - Cutter Jam This code indicates that the printer
This code indicates that media is stuck in the presenter . This error is set when the printer attempts to eject the media but cannot complete the operation. This error is cleared by removing the media from the presenter sensor.
could not find the cutter blade or could not properly manage its position. The error is set when the printer attempts to cut but fails after three retries. This error is cleared by cycling the power off and on.
Rev. A KR403
Troubleshooting
32
Status Light Descriptions
Table 3-1 • Application LED States
Three Red Flashes 3 - Out of Paper This code indicates that the selected
EOP sensor has detected no media present. This value is signaled wither when the mark engine has detected a mark larger than "TOF marker length” plus 5mm, or when the A/D reading of the EOP sensor drops below the “End of paper threshold”. This error is cleared after successful media load (either via calibration of via regular media load).
Four Red Flashes 4 - Print Head Lifted This code indicates that the print head
has been lifted. This error is cleared by returning the print head to its locked position.
Five Red Flashes 5 - Paper Fe ed Error This code indicates that the paper
failed to reach the presenter sensor within the expected amount of time. The error is signaled if the media does not reach the presenter sensor after feeding the length from the cuter to the sensor plus 15mm. This error is cleared by opening and closing the print head, or by cycling power off and on.
Y ellow Flashing 6 - Head Temperature
Error
Rapid Amber Flashing
Firmware missing or corrupt
This code indicates that the print head has exceeded the maximum permitted temperature. This status code is set when the print head temperature exceeds 65° C (149° F). When this condition occurs, the printer feeds 100mm (4 inches) of blank media, cuts, and presents. This error is cleared automatically when the print head temperature falls below 55° C (131° F).
This code indicates that the bootware has detected an incorrect or missing checksum in the firmware. This error is cleared when the firmware is reloaded or updated. Refer to the Software Integrator Guide for firmware upload procedure.
Rev. A KR403

Application User Interface

With the printer power on, press and hold the feed button. Continue holding the feed button until the status indicator flash sequence occurs. The next flash sequence occurs after completion of the previous flash sequence. The flash sequences perform the following functions:
Table 3-2 • Application User Interface
Troubleshooting

Print Quality Problems

33
Status Flash
Sequence
One Flash, then Solid Green
Two Flash, then So lid Green
Three Flash, then Solid Green
Four Flash, then Solid Green
Five Flash, then Solid Green
If the feed button remains pressed after the fi ve flash sequence, the status light goes off.
Printer status is also reported during normal operation when an error occurs, or a status request can be sent to the printer via the Windows driver. for error codes reported by the Windows driver .
Appears for one second. This will print an internal self-test page.
Appears for one second. Performs system calibration – must be started with paper out of presenter and from under printhead, and with no error signaled.
Appears for one second. Performs a simulated USB cable connect and reconnect causing a USB plug-and-play event to occur.
Appears for one second. Sets all printer settings to the default with the exception of media guide calibration, then it will perform the media guide calibration.
Appears for one second. Prints a 50% gray pattern, ejects it and then prints a diagonal line pattern and ejects it.
Action
Print Quality Problems
No print on the label.
• The media may not be direct thermal media, or the thermal media coating is not facing upward.
• Is the media loaded correctly? Is the thermal media coating facing upward?
• The printhead may be dirty or damaged.
The printhead is dirty. Clean the printhead. Refer to the Service Manual (P1028249) for instructions.
The printhead is damaged. Replace the printhead. Refer to the Service Manual (P1028249) for instructions.
• The printhead wiring may be damaged or not connected properly.
Check the wiring connections at the printhead and the main logic board.
Check for damage to the wiring. Replace the wiring if damaged.
Rev. A KR403
Troubleshooting
34
Print Quality Problems
The printed image does not look right.
• The printhead is dirty. Clean the printhead. Refer to the Service Manual (P1028249) for instructions.
• The printhead has worn out. The printhead is a consumable item and will wear out due to friction between the media and printhead. Using unapproved media may shorten life or damage your printhead. Replace the printhead. Refer to the Service Manual (P1028249) for instructions.
• Adjust the print darkness and/or print speed. See "Device Settings" on p age 20.
The Windows printer driver or application software may change these settings and may require a change to optimize print quality.
• The media being used is incompatible with the printer. Be sure to use the recommended media for your application, and always use Zebra-approved media.
• The platen (driver) roller maybe losing traction due to:
Foreign objects attached to its surface.
The rubbery smooth surface has become polished and slippery.
• The platen may need cleaning or replacement. Refer to the Service Manual (P1028249) for instructions.
There are long tracks of missing print (blank vertical lines) on
several labels.
• The printhead may be dirty or damaged.
The printhead is dirty. Clean the printhead. Refer to the Service Manual (P1028249) for instructions.
The printhead is damaged. Replace the printhead. Refer to the Service Manual (P1028249) for instructions.
• The printhead has worn out. The printhead is a consumable item and will wear out due to friction between the media and printhead. Using unapproved media may shorten life or damage your printhead. Replace the printhead. Refer to the Service Manual (P1028249) for instructions.
The printing does not start at the top of the receipt or misprinting of
one to three receipts.
• The printer needs to be calibrated (refer to the two-flash sequence of "Application
User Interface" on page 33).
• Reload the media. Refer to the Hardware Integrator Guide (P1016701) for instructions.
Rev. A KR403

Media Sensing Problems

The KR403 printer default media mode is Continuous. The printer will remain in this mode until it is changed by the Windows Driver.
The KR403 printer has automatic media calibration capability for black mark media. Once the printer is printing or feeding media, the printer continually checks and adjusts the media sensing to accommodate for minor changes in media p arameters from page to page on a roll, and from roll to roll of media. The printer will automatically initiate a media length calibration if the expected media length or the page to page gap distance has exceeded the acceptable variation range when starting a print job or feeding media.
If the printer does not detect blacklines (or notches with black mark sensing) after feeding the media the default maximum label length distance of 24 inches (610mm), then the printer will report a media error.
Optionally, the printer can be set to do a short media calibration after loading media or when closing the printhead with power on. The printer will then feed up to three labels while calibrating.
Troubleshooting
Media Sensing Problems
35
The printer will not load the media.
• The media has changed, or a different media guide has been installed.
Make sure the appropriate media guide is installed for the media being used. Refer to the Hardware Integrator Guide (P1016701) for instructions.
Perform the two-flash procedure to recalibrate the printer and then perform the four-flash procedure to reset the printer default settings. Refe r to "Application LED
States" on page 31. Reload the media (refer to the Hardware Integrator Guide
(P1028247) for media loading procedures).
Load the media manually . Refer to the Ha rdware Integra tor Guide (P1016 701) for instructions.
• The platen (driver) roller maybe losing traction due to:
Foreign objects attached to its surface.
The rubbery smooth surface has become polished and slippery.
• The platen may need cleaning or replacement. Refer to the Service Manual (P1028249) for instructions.
• The media sensor may be dirty or damaged. Refer to th e Service Manual (P10 28249) for instructions.
• The printhead assembly is not closed.
Check the status light on either side of the printer. If the st atus light is showing four red flashes then the printhead is not closed. Push down on the printhead assembly until it locks into place.
Rev. A KR403
Troubleshooting
36

Other Problems

The printer will not eject the media.
• There is a jam under the printhead. Refer to the Service Manual (P1028249) for instructions.
• The large media roll may be over torquing the feed motor. Install the large media roll adapter. Refer to the Hardware Integrator Guide (P1016701) for instructions.
• The presenter rollers are dirty or damaged.
The presenter rollers are dirty. Refer to the Service Manual (P1028249) for instructions.
The presenter rollers are damaged. Refer to the Service Manual (P1028249) for instructions.
• There is a jam under the presenter. Refer to the Service Manual (P1028249) for instructions.
• The presenter sensor may be dirty or damaged.
The presenter sensor is dirty. Refer to the Service Manual (P1028249) for instructions.
The presenter sensor is damaged. Refer to the Service Manual (P1028249) for instructions.
• The presenter has not cleared the previous receipt.
Check the status light on either side of the printer . If the st atus light is showing one red flash then the printer is reporting media in the presenter. Remove any media that may be in the presenter.
• The presenter motor may need to be replaced. Refer to the Service Manual (P1028249) for instructions.
• The presenter drive gears may be damaged or worn. Refer to the Service Manual (P1028249) for instructions.
Other Problems
The receipts are not cutting properly.
• The cutter blade may be worn. Replace the cutter blades. Refer to the Service Manual (P1028249) for instructions.
• The cutter tensioner may be worn or damaged. Replace the cover plate assembly. Refer to the Service Manual (P1028249) for instructions.
• Check the Cutter Mode setting, and the Partial Cut Width setting in the Windows driver.See"Device Settings" on page 20.
Rev. A KR403
• The cutter motor may need to be replaced. Refer to the Service Manual (P1028249) for instructions.
• The cutter drive gear, drive pin, or cutter actuator may be damaged or worn. Refer to the Service Manual (P1028249) for instructions.
• Check for the latest firmware and driver version.
There are no lights on the printer.
• Make sure there is power applied to the printer.
• The control panel may be dirty or damaged. Refer to the Service Manual (P1028249) for instructions.
• The main logic board may be damaged. Refer to the Service Manual (P1028249) for instructions.
• Check for the latest firmware and driver version.
Troubleshooting
Other Problems
37
A receipt format was sent to, but not recognized by, the printer.
• If the status LED is on or flashing, refer to "Application LED States" on page 31.
• Make sure the USB cable is correctly installed. Refer to the Hardware Integrator Guide (P1016701) for instructions.
• A communications problem has occurred. Perform a USB detect (refer to the three­flash sequence of "Application User Interface" on page 33).
The receipts are not cutting at the black mark.
• Make sure you are using the appropriate media guide for the desired media width. Refer to the Hardware Integrator Guide (P1016701) for media guide installation instructions.
• Perform a media guide calibration. Refer to the two-flash sequence of "Application
User Interface" on page 33.
• Make sure you are using the appropriate media. Refer to the Hardware Integrator Guide (P1016701) for black mark media requirements.
• Use the Windows driver to set the printer to black mark mode. See "T ools" on
page 22.
• Reload the media. Refer to the Hardware Integrator Guide (P1016701) for instructions.
Rev. A KR403
Troubleshooting
38

Resetting the Factory Default Values

Resetting the Factory Default Values
Sometimes, resetting the printer to the factory defaults may solve some problems. Refer to the four-flash sequence of "Application User Interface" on page 33.

Contact Technical Support

Technical Support via the Internet is available 24 hours per day, 365 days per year.
www.zebra.com
For questions on the operation of Zebra equipment and software, please call your distributor. For additional assistance, contact us.
Please have your model and serial numbers available.
Rev. A KR403

Windows Compatible Status

These statuses will also be stored in the printer ERROR key in the registry and can be extracted with GetPrinterData.

Statuses Defined in winspool.h

Table A-1 • Windows Status Compares to Zebra Status

Appendix A

PRINTER_STATUS_PAPER_JAM PRINTER_STATUS_USER_INTERVENTION PRINTER_STATUS_PAPER_OUT PRINTER_STATUS_DOOR_OPEN PRINTER_STATUS_PAPER_PROBLEM PRINTER_STATUS_NOT_AVAILABLE PRINTER_STATUS_ERROR
PRINTER_STATUS_NOT_AVAILABLE
PRINTER_STATUS_NOT_AVAILABLE
PRINTER_STATUS_NOT_AVAILABLE
PRINTER_STATUS_NOT_AVAILABLE
PRINTER_STATUS_NOT_AVAILABLE
Paper jam (ESC ENQ 1 = NAK 1) Cutter not home (ESC ENQ 1 = NAK 2) Out of paper (ESC ENQ 1 = NAK 3) Print head lifted (ESC ENQ 1 = NAK 4) Paper feed problem (ESC ENQ 1 = NAK 5) Tem p erature error (ESC ENQ 1 = NAK 6) Presenter jam (ESC ENQ 1 = NAK 7), check
ExtendedError Retract jam (ESC ENQ 1 = NAK 8), check
ExtendedError Black mark not found (ESC ENQ 1 = NAK 10),
check ExtendedError Black mark calibration error (ESC ENQ 1 = NAK 11),
check ExtendedError Index error (ESC ENQ 1 = NAK 12), check
ExtendedError Checksum error (ESC ENQ 1 = NAK 13),
check ExtendedError
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
A-2
Appendix A
Windows Compatible Status
Table A-1 • Windows Status Compares to Zebra Status
PRINTER_STATUS_NOT_AVAILABLE
Wrong firmware (ESC ENQ 1 = NAK 14), check ExtendedError
PRINTER_STATUS_NOT_AVAILABLE
Retract occurred (ESC ENQ 1 = NAK 16), check ExtendedError
PRINTER_STATUS_NOT_AVAILABLE PRINTER_STATUS_TONER_LOW PRINTER_STATUS_OUTPUT_BIN_FULL
Paused (ESC ENQ 1 = NAK 17), check ExtendedError Paper near end (ESC ENQ 6) Paper in presenter (ESC ENQ 6)
Table A-2 • Status definition in Winspool.h
#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_OUTPUT_BIN_FULL 0x00000800 #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000 #define PRINTER_STATUS_TONER_LOW 0x00020000 #define
0x00100000
PRINTER_STATUS_USER_INTERVENTION #define PRINTER_STATUS_DOOR_OPEN 0x00400000
Note • In order to indicate the Paper-near-end status, the driver utilizez the unused Microsoft status code PRINTER_STATUS_TONER_LOW.

Windows Incompatible Status

If a printer status doesn’t have a corresponding Windows status the Error key will have PRINTER_STATUS_NOT_AVAILABLE set and you need to evaluate the ExtendedError key.
Statuses that have a representation within the Windows status may also have an ESC ENQ 1 NAK value (see Table A-1) and will be stored in the printer ExtendedError key in the registry and can be extracted with GetPrinterData using the ExtendedError key.
For the meanings of these NAK responses see the appropriate Technical Manual for your printer, und er the ESC ENQ 1 section.
Note • Any other Windows status may be used in the future, so mask away undefined bi t s in your application!
Table A-3 • GetPrinterDat a Key Valu es
Printer DsMonitor Key Explanation Type
Appendix A
Windows Compatible Status
A-3
Error Printer Error or Status in Windows 16-bit format REG_DWORD ErrorEvent Error event name for error event trigger REG_SZ ExtendedError Extended status according to Appendix B REG_DWORD Sta tu sEvent Status event name for status event trigger REG_SZ DeleteJob Flag to delete print jobs on error REG_DWORD
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
A-4
Appendix A
Windows Compatible Status

Programming Example

Background

In order to incorporate the way status monitoring works for the KR203 printer setup, it is important to understand what happens in a kiosk when you print, and when status monitoring should take place.
Status monitoring can be handled in two ways:

Appendix B

• Monitoring in the printing application.
• Monitoring in a separate application.
When monitoring takes place in the printing application, normally the printer is observed before sending a print job to see if the printer is “OK” and then se nd th e print jo b. Af ter the print job is signaled as being printed, the status is checked again to see if the printer has any errors or if the paper has been taken, etc.
Monitoring in a separate applica tion usually doesn’t allow direct interaction with the p rinted job so the printer is polled as often as possible to get most accurate information on what the printer is doing. This is usually very time consuming and care must be taken for synchronizing with a current print job.
Since the latter example is most commonly used for status monitoring, an event notification has been incoprorated into the language monitor to allow a monitoring application to do other tasks and have a separate thread listening for the printer status or error event change. When this occurs the th re ad is simply getting the st atus and repo rting this back to the main program or doing any other kind of reporting.
To accommodate this notification for all error and status changes, two mechanisms have been incorporated into the language montor.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
B-2
Appendix B
Programming Example
• Monitoring while printing Status monitoring has been implemented in the internal printing structure of the
language montor. When a document is opened, printed, and closed, the language monotr will check the printer status before and after printing and will also react to write errors if any occur. It will then set the printer status and raise the error event.
• Monitoring while idle An internal status thread has been implemented which reads printer status and
provides changed status information in the same manner. It will set the status and raise an error or status event. Therefore, it is not necessary for any other monitoring loop to be implemented, simply wait for an event in the application’s idle loop.

Implementation in Calling Application

1. Open the Printer.
The first step of the implementation is to open the printer required to monitor and get the Error event and Status even name.
bRet = OpenPrinter(m_csPrinter.GetBuffer(1), &hPrinter, &pd);
… if ((dRet = GetPrinterData(hPrinter, "ErrorEventName",
&dType, (LPBYTE)cTmp, 100, &dNeeded))!=ERROR_SUCCESS) … if ((dRet = GetPrinterData(hPrinter, "StatusEventName",
&dType, (LPBYTE)cTmp, 100, &dNeeded))!=ERROR_SUCCESS) …
2. Open the Event Handles.
Open the two event handles and fill these handles into a structure that will pass on to the new thread.
Appendix B
Implementation in Calling Application
B-3
typedef struct _CStatusThreadInfo { HWNDmyHwnd; DWORDdSleepTime; HANDLEhPrinter; HANDLEhError; HANDLEhStatus; BOOLm_hStatusEventKillThread; } CStatusThreadInfo; … if ((cTi.hError = OpenEvent(SYNCHRONIZE, TRUE,
m_csErrorEvent))==NULL) … if ((cTi.hStatus = OpenEvent(SYNCHRONIZE, TRUE,
m_csStatusEvent))==NULL) Step: Start Monitoring When all this is done you can start your monitoring
thread. m_StatusThread = AfxBeginThread( StatusThreadProc,
&cTi, THREAD_PRIORITY_NORMAL,0,0,NULL);
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
B-4
Appendix B

Implementation in Monitor Thread

Implementation in Monitor Thread
1. Fill Event Arrays
In the monitoring thread, create and fill an array of handles with the error and status event handle.
myHandle[0] = pInfo->hError; myHandle[1] = pInfo->hStatus;
2. Start the Waiting Loop
Start the waiting loop.
UINT StatusThreadProc( LPVOID pParam) { CStatusThreadInfo* pInfo = (CStatusThreadInfo*)pParam; longdwResult=0; longdwRet=0; TCHARstr[50]={0}; HANDLEmyHandle[2]={NULL}; DWORDdType=0; DWORDdNeeded=0; DWORDdwPgCnt=0; DWORDdwCutCnt=0;
if (pInfo == NULL) { OutputDebugString(L"### entering Status Poll thread
Failed!\n"); return 1; // if pObject is not valid }
myHandle[0] = pInfo->hError; myHandle[1] = pInfo->hStatus; HWND hWnd = GetDlgItem((HWND)pInfo->myHwnd,
IDC_STATUS); //HWND hWnd = pInfo->myHwnd;
OutputDebugString(L"### entering Status Poll thread...\n");
SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)(L"### entering Status Poll thread..."));
Appendix B
Implementation in Monitor Thread
while(pInfo->m_hStatusEventKillThread) { if ((dwRet = WaitForMultipleObjects(2, myHandle, FALSE,
pInfo->dSleepTime))!=WAIT_FAILED) {
if (dwRet==WAIT_OBJECT_0 || dwRet==WAIT_OBJECT_0+1) {
if ((dwRet = GetPrinterData(pInfo->hPrinter, L"Error", &dType, (LPBYTE)&dwResult, sizeof(dwResult), &dNeeded))!=ERROR_SUCCESS)
{
swprintf_s( str, 50, L"### [Status Thread error
%d] read [%08X]\n", dwRet, dwResult);
} else
swprintf_s( str, 50, L"### [Status Thread] read
[%08X]\n", dwResult);
OutputDebugString(str);
swprintf_s( str, 50, L"### [Status Thread] read [0x%08X]", dwResult);
SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)(str));
if (dwResult & 0x00000000)
B-5
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_OK"));
if (dwResult & PRINTER_STATUS_ERROR)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_ERROR"));
if (dwResult & PRINTER_STATUS_PENDING_DELETION)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PENDING_DELETION"));
if (dwResult & PRINTER_STATUS_PAPER_JAM)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PAPER_JAM"));
if (dwResult & PRINTER_STATUS_PAPER_OUT)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PAPER_OUT"));
if (dwResult & PRINTER_STATUS_PAPER_PROBLEM)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PAPER_PROBLEM"));
if (dwResult & PRINTER_STATUS_OFFLINE)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_OFFLINE"));
if (dwResult & PRINTER_STATUS_IO_ACTIVE)
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
B-6
Appendix B
Implementation in Monitor Thread
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_IO_ACTIVE"));
if (dwResult & PRINTER_STATUS_BUSY)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_BUSY"));
if (dwResult & PRINTER_STATUS_PRINTING)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PRINTING"));
if (dwResult & PRINTER_STATUS_OUTPUT_BIN_FULL)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_OUTPUT_BIN_FULL"));
if (dwResult & PRINTER_STATUS_PROCESSING)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_PROCESSING"));
if (dwResult & PRINTER_STATUS_USER_INTERVENTION) {
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_USER_INTERVENTION"));
}
if (dwResult & PRINTER_STATUS_DOOR_OPEN)
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_DOOR_OPEN"));
if (dwResult & PRINTER_STATUS_NOT_AVAILABLE)
{
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"PRINTER_STATUS_NOT_AVAILABLE"));
if ((dwRet = GetPrinterData(pInfo->hPrinter, L"ExternalError", &dType, (LPBYTE)&dwResult, sizeof(dwResult), &dNeeded))!=ERROR_SUCCESS)
{
swprintf_s( str, 50, L"### [Status Thread
error %d read [%08X]\n", dwRet, dwResult);
} else
swprintf_s( str, 50, L"### [External Error]
read [%08X]\n", dwResult);
OutputDebugString(str);
swprintf_s( str, 50, L"### [External Error] read [%08X]", dwResult);
SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)(str));
} } else
Appendix B
Implementation in Monitor Thread
SendMessage(hWnd, WM_SETTEXT, 0,
(LPARAM)(L"Timeout, no status happened")); } else {
dwRet = GetLastError(); swprintf_s( str, 50, L"### Wait function failed!
[%d]\n", dwRet);
OutputDebugString(str);
} } SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)(L"Leaving
Status Thread")); AfxEndThread( 1 ); return 1; }
B-7
When an event occurs, the status with GetPrinterData using the “Error” key will need to be obtained, and the result decoded ac cording to the sampl e or an equiva lent manner. In any case a message can be sent, or any form of status reporting can be done.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
B-8
Appendix B

WMI Script to get Basic Status

WMI Script to get Basic Status
' VBScript source code ttpname="" strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" &
strComputer & "\root\cimv2") Set wbemObjectSet = objWMIService.ExecQuery("SELECT *
FROM Win32_Printer") For Each wbemObject In wbemObjectSet if wbemObject.Default = TRUE then ttpname = wbemObject.Caption Wscript.Echo "Printer " & ttpname Select Case wbemObject.PrinterStatus Case 1 strPrinterStatus = "Other" strExtendedPrinterStatus =
wbemObject.ExtendedPrinterStatus Case 2 strPrinterStatus = "Unknown" Case 3 strPrinterStatus = "Idle" Case 4 strPrinterStatus = "Printing" Case 5 strPrinterStatus = "Warmup" Case 6 strPrinterStatus = "Stopped printing" Case 7 strPrinterStatus = "Offline" End Select Wscript.Echo "Printer Status: " & strPrinterStatus Select Case wbemObject.DetectedErrorState Case 0 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Unknown" case 1 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Other" case 2
WMI Script to get Basic Status
Wscript.Echo "DetectedErrorState: " & wbemObject.DetectedErrorState & " No Error"
case 3 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Low Paper" case 4 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " No Paper" case 5 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Low Toner" case 6 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " No Toner" case 7 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Door Open"
Appendix B
B-9
case 8 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Jammed" case 9 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Offline " case 10 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Service Requested" case 11 Wscript.Echo "DetectedErrorState: " &
wbemObject.DetectedErrorState & " Output Bin Full" End Select Select Case wbemObject.ExtendedDetectedErrorState Case 0 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Unknown" case 1 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Other" case 2 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " No Error" case 3 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Low Paper"
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
B-10
Appendix B
WMI Script to get Basic Status
case 4 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " No Paper" case 5 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Low Toner" case 6 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " No Toner" case 7 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Door Open" case 8 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Jammed" case 9 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Service Requested"
case 10 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Output Bin Full"
case 11 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Paper Problem"
case 12 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Cannot Print Page"
case 13 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " User Intervantion Required"
case 14 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Out of Memory"
case 15 Wscript.Echo "ExtendedDetectedErrorState: " &
wbemObject.ExtendedDetectedErrorState & " Server Unknown"
End Select end if
Next Wscript.Echo "Printer " & ttpname
Appendix B
WMI Script to get Basic Status
B-11
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
B-12
Appendix B
WMI Script to get Basic Status

Appendix C

Setup Printer Forms in Windows XP and Vista

Windows XP and Vista allows you to control global settings for print servers by using th e Print Server Properties dialog box. You can access this dialog box by doing the following:
1. Double-click on the printer's icon in the Control Panel or select Settings in the Start
menu and then choose the Printers option.
2. In the Printers window, select Server Properties from the File menu.
3. Use the Forms tab of the Print Server Properties dialog box to view printer forms.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
C-2
Appendix C
Setup Printer Forms in Windows XP and Vista

Viewing and Creating Printer Forms

Forms are used by the print server to define the standard sizes for paper, envelopes, and transparencies. To view the current settings for a printer form, follow these steps:
1. Open the Print Server Properties dialog box and then click on the Forms ta b as shown
above.
2. Use the Forms On list box to select the form you want to view.
The form settings are shown in the Measurements area. You can't change or delete the default system forms.
To create a new form, follow these steps:
1. Access the Forms tab of the Print Server Properties dialog box.
2. Use the Forms On list box to select the existing form on which you want to base the
new form.
3. Select the Create A New Form check box.
4. Enter a new name for the Form in the Form Description For field.
5. Use the fields in the Measurements area to set the paper size and margins.
6. Choose the Save Form button to save the form.

Setup Printer Forms in Windows 7

You can use Print Management to manage printer forms. To open Print Management, click Start, point to Administrative Tools, and then click
Print Management. You must have Administrative permissions to perform this task.
To manage forms:
1. Open Print Management.
Appendix C
Setup Printer Forms in Windows 7
C-3
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
C-4
Appendix C
Setup Printer Forms in Windows 7
2. In the left pane, click Print Servers, click the applicable print server, right-click Forms,
and then click Manage Forms.
3. In the Printer Server Properties dialog box, do the following:
Appendix C
Setup Printer Forms in Windows 7
4. To create a new form, select an existing form, select the Create a new form check box,
change the printer measurement units, paper size, and printer area margins as needed, click Save Form, and then click OK.
C-5
5. To delete a form, select the form, click Delete, and then click OK.
8/6/2010 KR203 Software Integrator Guide P1028248-001 Rev. A
C-6
Appendix C
Setup Printer Forms in Windows 7
Loading...