UtilityPrinterDriver SDK specification Ver1.06E
UtilityPrinterDriver SDK specification Ver1.06E
for SDK
User’s guide
MODEL: SK1-41
SK1-31
SK1-21
Rev1.06 1509
Contents
-3-
2. SDK version getting function
int GetApiVersion( )
-4-
3. RAW data control function
bool WriteRawData(string printer, byte[] pBytes, Int32 dwCount)
-5-
4. Printer status getting function
bool GetPrinterStatus(string printer, ref int status)
Remark Refer the chapter “About define” as for the details of status variable.
-6-
5. Printer status manager control function
This control function enables or disables function of printer status manager. Default setting is ENABLED.
Function of printer status manager is monitoring printer error status (as ‘no paper’) on a PC.
Please see a document “Sanei Utility Printer Driver for Windows, section 4 Status monitor”.
If interactive communication between PC and printer by user is driven independently, this function has to be
stopped because the communication cannot work.
bool EnableLM()
bool DisableLM()
-7-
6. Format setting function
This function controls the format setting into the property with SaneiUtilityPrinterDriver.
The structure of format is written in Class Library and it is mentioned as follows.
Remark Refer the chapter “About define” as for the details of df member.
Remark Refer the chapter “About define” as for the details of df member.
-8-
7. Macro setting function
This function controls the macro setting into the property with SaneiUtilityPrinterDriver.
Component of macro data is described as follows:
n Macro function
Parameter (16 bits) Macro function (16 bits)
0 - Feed
1 - Back feed
2 - Full cut
3 - Partial cut
4 - Mark detection
5 - Mark redetection
6 - Illumination pattern of LED Bezel
7 - Logo printing
-9-
bool SetMacroData(string printer,int type,int num,int[] data)
Function Set macro data
string printer Specify the name of printer.
int type Input an event to execute macro.
0 – Start document
1 – Finish document
2 – Start job
3 – Finish job
int num Size of macro data is set.
int[] data Macro data is set.
- 10 -
8. About define
Description of define class stored in Class library is mentioned as follows.
Printer status
Name Meanings
UPD_STATUS_NORMAL normal
UPD_STATUS_DOOR_OPEN Cover open
UPD_STATUS_PAPER_END No paper
UPD_STATUS_NEAR_END Nearly-end paper
UPD_STATUS_PAPER_FULL Paper remains bezel or pressenter
UPD_STATUS_OTHER_ERR Others (Temperature, Cutter, voltage error, etc)
UPD_STATUS_PAPER_JAM Paper course out
Paper width
Name Meanings
UPD_PAPER_58 Paper width: 58mm
UPD_PAPER_60 Paper width: 60mm
UPD_PAPER_80 Paper width: 80mm
UPD_PAPER_83 Paper width: 83mm
UPD_PAPER_112 Paper width: 112mm
Printing density
Name Meanings
UPD_DENSITY_60 Density: 60%
UPD_DENSITY_80 Density: 80%
UPD_DENSITY_100 Density: 100%
UPD_DENSITY_120 Density: 120%
UPD_DENSITY_140 Density: 140%
UPD_DENSITY_160 Density: 160%
Macro definition
Name Meanings
MACRO_MAX Maximum number of registering macro
UPD_MACRO_FEED Macro to feed
UPD_MACRO_BACKFEED Macro to back feed
UPD_MACRO_FULLCUT Macro to full cut
UPD_MACRO_PARTIALCUT Macro to partial cut
UPD_MACRO_DETECTION Macro to detect mark in next page
UPD_MACRO_REDETECTION Macro to redetect mark in temporary page
UPD_MACRO_LEDBEZEL Macro to set illumination pattern of LED bezel
UPD_MACRO_LOGOPRINT Macro to print registered image pattern as a logo.
- 11 -
9. Sample program
Sample programs are designed on Visual C#. Application is able to start through the build of project or
Clicking icon. Program is recalled API using api in Class Library.
(1)
(2)
(1) Select a printer adapted to SaneiUtilityPrinterDrivert through clicking Browse (1) button at first.
(2) Function
- 12 -
Sample application 2: upd_api_fmt_test
(1)
(2)
(1) Select a printer adapted to SaneiUtilityPrinterDrivert through clicking Browse (1) button at first.
(2) Function
Getting Format: Read and display temporary format by click.
Setting Format: Set format by clicking.
- 13 -
LogoHeadPrint: Set function for printing logo at first.(0: Disable, 1-8: Registered image pattern)
Remote: Set function of remote control. (0: Disable, 1: Enable)
Mail: Set function of mail(0: Disable, 1: Enable)
Timeout: Set the time of “Time Out” for retract function of presenter.(0-61)
Mode: Set presenter operation mode.
(0:DEFAULT 1:CLAMP/RETRACT 2:CLAMP/EJECT
3:CLAMP ONLY 4:CONTINUOUS)
- 14 -
Sample application 3: upd_api_macro_test
(1)
(2)
(1) Select a printer adapted to SaneiUtilityPrinterDrivert through clicking Browse (1) button at first.
(2) Function
- 15 -