EZio DLL UM EN
EZio DLL UM EN
EZio DLL UM EN
V1.0.0.9
GoDEX
2014/9/12
GoDEX EZio DLL User Manual
Contents
1 Overview ................................................................................................................ 3
2 Function List .......................................................................................................... 4
3 Function Parameter Description ............................................................................ 7
3.1 openport .................................................................................................... 7
3.2 OpenDriver ................................................................................................. 7
3.3 FindFirstUSB ............................................................................................... 7
3.4 FindNextUSB .............................................................................................. 8
3.5 OpenUSB .................................................................................................... 8
3.6 FindFirstNet ................................................................................................ 8
3.7 FindNextNet ............................................................................................... 8
3.8 OpenNet ..................................................................................................... 9
3.9 setbaudrate ................................................................................................ 9
3.10 closeport .................................................................................................... 9
3.11 setup ........................................................................................................ 10
3.12 sendcommand ......................................................................................... 10
3.13 sendbuf .................................................................................................... 11
3.14 RcvBuf ...................................................................................................... 11
3.15 intloadimage ............................................................................................ 11
3.16 extloadimage............................................................................................ 12
3.17 downloadimage ....................................................................................... 12
3.18 putimage .................................................................................................. 13
3.19 putimage_Halftone .................................................................................. 14
3.20 ecTextOut ................................................................................................. 14
3.21 ecTextOutW.............................................................................................. 15
3.22 ecTextOutR ............................................................................................... 16
3.23 ecTextOutRW ........................................................................................... 17
3.24 ecTextOutFine .......................................................................................... 17
3.25 ecTextOutFineW ....................................................................................... 19
3.26 ecTextDownLoad ...................................................................................... 21
3.27 ecTextDownLoadW .................................................................................. 22
3.28 Bar ............................................................................................................ 23
3.29 Bar_S ........................................................................................................ 24
3.30 Bar_GS1DataBar....................................................................................... 25
3.31 Bar_GS1DataBar_S ................................................................................... 26
3.32 Bar_PDF417.............................................................................................. 27
3.33 Bar_PDF417_S .......................................................................................... 28
1
GoDEX EZio DLL User Manual
2
GoDEX EZio DLL User Manual
1 Overview
EZio DLL is a dynamic link library provided by GoDEX. Program developers can use
this component to develop the printer control program on Microsoft Windows
operating systems. EZio DLL provides 32-bit and 64-bit versions, You can set up your
development environment by using a different DLL. This component is recommended
over Windows XP operating system, the latest version supports to Windows 8.
EZio DLL provides the control function of USB, COM, LPT, Driver, network and so
on. Before the start of the printer controlling, you must call openport(), OpenUsb(),
OpenNet() or OpenDriver() to establish communication between the program and the
printer. After setting or printing is complete, you must call closeport () function to end
the connection between the program and the printer.
For example: The EZPL instruction of printing the self-test page is ~ V. If you want to
print it by programming, you must send sendcommand ("~ V") in the program. You
can use ecTextOut() related functions to print text, use putimage() function to print
images, and use Bar() related functions to print barcodes. Finally, it must be noted that
EZPL when printing must follow one rule : Anything printed ^ L and E must be
surrounded, and if you do not have instructions printed outside.
openport(6);
sendcommand(“^L”);
:
sendcommand(EZPL Command);
:
sendcommand(“E”);
closeport();
3
GoDEX EZio DLL User Manual
2 Function List
NO. Command Description
1 openport Open serial ,printer or USB port
Using the name of installed printer driver to
2 OpenDriver
open the specific printer.
3 FindFirstUSB Find the first USB ID
Find the next USB ID. This can be used to
4 FindNextUSB enumerate all the USB ID of the connected
printers until return false.
Using USB ID to open the specific printer
5 OpenUsb
connected to USB
6 FindFirstNet Find the first IP address and port
Find the next IP address and port. This can be
7 FindNextNet used to enumerate all the IP address and port of
the connected printers until return false.
Using IP address and port to open the specific
8 OpenNet
printer connected to network
9 setbaudrate Set the baud rate of host
10 closeport Close the opened port.
11 setup Set label size, darkness and speed of printer.
12 sendcommand Send EZPL command
13 sendbuf Send a block of data to printer
14 RcvBuf Read a packet from the opened port
Download image (binary image of PCX or
15 intloadimage
BMP) to internal memory of printer.
Download image (binary image of PCX or
16 extloadimage
BMP) to external memory of printer.
Download multi-tone image (format BMP and
JPG) with orientation settings as a bitmap to be
17 downloadimage
recalled by ^Y command. Halftone will be
applied to the image.
Printing multi-tone image (format BMP and
18 putimage JPG) with orientation settings. Halftone
(Cluster Dithering Only) will be applied to the
4
GoDEX EZio DLL User Manual
image.
Printing multi-tone image (format BMP and
19 putimage_Halftone JPG) with orientation settings. Halftone will be
applied to the image.
20 ecTextOut Printing the TrueType fonts directly.
21 ecTextOutW Printing the TrueType fonts directly. (Unicode)
Printing the TrueType fonts with orientation
22 ecTextOutR
settings
Printing the TrueType fonts with orientation
23 ecTextOutRW
settings (Unicode)
Printing the TrueType fonts with orientation,
24 ecTextOutFine weight, italic, underline, strikeout, and inverse
settings.
Printing the TrueType fonts with orientation,
25 ecTextOutFineW weight, italic, underline, strikeout, and inverse
settings (Unicode)
Download the TrueType fonts with orientation
26 ecTextDownLoad settings as a bitmap to be recalled by ^Y
command
Download the TrueType fonts with orientation
27 ecTextDownLoadW settings as a bitmap to be recalled by ^Y
command (Unicode)
28 Bar Print 1D Barcode
29 Bar_S Print 1D Barcode (Simple Mode)
30 Bar_GS1DataBar Print GS1 DataBar
31 Bar_GS1DataBar_S Print GS1 DataBar (Simple Mode)
32 Bar_PDF417 Print PDF 417
33 Bar_PDF417_S Print PDF 417 (Simple Mode)
34 Bar_MicroPDF417 Print Micro PDF 417
35 Bar_MicroPDF417_S Print Micro PDF 417 (Simple Mode)
36 Bar_Maxicode Print Maxicode
37 Bar_Maxicode_S Print Maxicode (Simple Mode)
38 Bar_DataMatrix Print Data Matrix Code
39 Bar_DataMatrix_S Print Data Matrix Code (Simple Mode)
40 Bar_QRcode Print QR Code
41 Bar_QRcode_S Print QR Code(Simple Mode)
42 Bar_Aztec Print Aztec
5
GoDEX EZio DLL User Manual
6
GoDEX EZio DLL User Manual
3.2 OpenDriver(DriverName)
Description Using the name of printer driver to open the specific printer
DriverName
Parameters Type : (char *)
The input reference containing the name of printer driver
1 = (integer) OK
Return Value
0 = (integer) FAIL
3.3 FindFirstUSB(UsbID)
Description Find the first usb ID
UsbID
Parameters Type : (char *)
The output reference containing found USB ID
1 = (integer) OK
Return Value
0 = (integer) FAIL
7
GoDEX EZio DLL User Manual
3.4 FindNextUSB(UsbID)
Find the next USB ID. This can be used to enumerate all the USB
Description
ID of the connected printers until return false
UsbID
Parameters Type : (char *)
the output reference containing found USB ID
1 = (integer) OK
Return Value
0 = (integer) FAIL
3.5 OpenUSB(UsbID)
Description Using USBID to open the specific printer
UsbID
Parameters Type : (char *)
The input reference containing USB ID
1 = (integer) OK
Return Value
0 = (integer) FAIL
8
GoDEX EZio DLL User Manual
1 = (integer) OK
Return Value
0 = (integer) FAIL
3.9 setbaudrate(Baudrate)
Description Set the baud rate of host
Baudrate
Type : Integer
Parameters
The value of baud rate from for example 4800, 9600, 19200,
38400.
Return Value None
3.10 closeport()
Description Close output ports
Parameters None
Return Value None
9
GoDEX EZio DLL User Manual
3.12 sendcommand(command)
Description Send EZPL command to printer
command
Parameters Type : (char *)
Any EZPL command
1 = (integer) OK
Return Value
0 = (integer) FAIL
10
GoDEX EZio DLL User Manual
11
GoDEX EZio DLL User Manual
12
GoDEX EZio DLL User Manual
13
GoDEX EZio DLL User Manual
14
GoDEX EZio DLL User Manual
FontName
Type : (char *)
Name of the fonts
Data
Type : (char *)
Data string
1 = (integer) OK
Return Value
0 = (integer) FAIL
15
GoDEX EZio DLL User Manual
16
GoDEX EZio DLL User Manual
3.23 ecTextOutRW(PosX, PosY, Height, FontName, Data, Width, Weight, Deg, Len)
Printing the TrueType fonts of WINDOWS with orientation settings
Description
(Unicode)
PosX
Type : Integer
Left-upper Hori. pos. (dots)
PosY
Type : Integer
Left-upper Vert. pos. (dots)
Height
Type : Integer
Height of the text
FontName
Type : (char *)
Name of the fonts
Data
Type : (char *)
Data string
Width
Parameters
Type : Integer
width of the text
Weight
Type : Integer
Specifies the weight of the font in the range 0 through 1000.
For example, 400 is normal and 700 is bold.
Degree
Type : Integer
Set the rotation of the output text.
0 for degree 0,
90 for degree90,
180 for degree 180
270 for degree 270
Len
Type : Integer
Length of data string
1 = (integer) OK
Return Value
0 = (integer) FAIL
3.24 ecTextOutFine(PosX, PosY, Height, FontName, Data, Width, Weight, Degree,
17
GoDEX EZio DLL User Manual
18
GoDEX EZio DLL User Manual
19
GoDEX EZio DLL User Manual
Degree
Type : Integer
Set the rotation of the output text.
0 for degree 0,
90 for degree90,
180 for degree 180
270 for degree 270
Italic
Type : Integer
Specifies an italic font if set to TRUE(1).
Underline
Type : Integer
Specifies an underlined font if set to TRUE.
Strikeout
Type : Integer
Specifies a strikeout font if set to TRUE.
Inverse
Type : Integer
0:normal printout
1:inverse printout
Len
Type : Integer
Length of data string
1 = (integer) OK
Return Value
0 = (integer) FAIL
20
GoDEX EZio DLL User Manual
21
GoDEX EZio DLL User Manual
22
GoDEX EZio DLL User Manual
3.28 Bar(CodeType, PosX, PosY, Narrow, Wide, Height, Rotation, Readable, Data)
Description Print 1D barcode
CodeType
Type : (char *)
Barcode Type (Please refer to Reference 1)
PosX
Type : Integer
Hori. of top-left position of barcode (unit: dots)
PosY
Type : Integer
Vert. of top-left position of barcode (unit: dot)
Narrow
Type : Integer
Narrow bar from 1 ~ 10 dots (0.125 ~ 1.25 mm)
DUN 14 narrow setting from 5 ~ 8 dots;
UPC/EAN narrow setting from 2 ~ 4 dots
Wide
Type : Integer
Wide bar from 2 ~ 30 dots(0.25 ~ 0.5 mm);
Parameters (Code 39, 93, CODABAR & I 2 of 5 only)
Height
Type : Integer
Barcode height in dots (24 ~ 1200 dots)
Rotation
Type : Integer
Rotation of barcode
0) 0°, 1) 90°, 2) 180°, 3) 270°
Readable
Type : Integer
0 – human readable off
1 – below barcode, left
2 – above barcode, left
3 – below barcode, centered
4 – above barcode, centered
5 – below right
6 – above right
23
GoDEX EZio DLL User Manual
Data
Type : (char *)
Barcode data
1 = (integer) OK
Return Value
0 = (integer) FAIL
24
GoDEX EZio DLL User Manual
25
GoDEX EZio DLL User Manual
26
GoDEX EZio DLL User Manual
3.32 Bar_PDF417 (PosX, PosY, Width, Height, Row, Col, ErrLevel, Len, Deg, Data)
Description Print PDF 417
PosX
Type : Integer
Hori. of top-left position of barcode (unit: dots)
PosY
Type : Integer
Vert. of top-left position of barcode (unit: dot)
Width
Type : Integer
Width (x dimension) of the narrowest element (bar or space)
in the barcode.
Height
Type : Integer
Height (y dimension) of each barcode row in the symbol.
Row
Type : Integer
number of barcode rows, from 3 to 90. If you key in 0,
printer will count all the rows.
Parameters Col
Type : Integer
Number of barcode columns, from 1 ~ 30.
If you key in 0, printer will count the all columns
ErrLevel
Type : Integer
Error correction level: 0 ~ 8
Len
Type : Integer
Number of encoded data bytes, including carriage
returns and line feed.
Deg
Type : Integer
rotation of barcode
0) 0°, 1) 90°, 2) 180°, 3) 270°
Data
Type : (char *)
data to be encoded
27
GoDEX EZio DLL User Manual
1 = (integer) OK
Return Value
0 = (integer) FAIL
28
GoDEX EZio DLL User Manual
3.34 Bar_MicroPDF417 (PosX, PosY, Width, Height, Mode, Len, Degree, Data)
Description Print Micro PDF 417
PosX
Type : Integer
Hori. of top-left position of barcode (unit: dots)
PosY
Type : Integer
Vert. of top-left position of barcode (unit: dot)
Width
Type : Integer
Width (x dimension) of the narrowest element (bar or space)
in the barcode. 0~50 unit : dots
Height
Type : Integer
Height (y dimension) of each barcode row in the symbol.
0~50 unit : dots
Parameters
Mode
Type : Integer
Data mode, 0 ~ 33
Len
Type : Integer
Number of encoded data bytes, including carriage returns
and line feed. 0~400
Degree
Type : Integer
Rotation of barcode
0) 0°, 1) 90°, 2) 180°, 3) 270°
Data
Type : (char *)
Data to be encoded
1 = (integer) OK
Return Value
0 = (integer) FAIL
29
GoDEX EZio DLL User Manual
30
GoDEX EZio DLL User Manual
31
GoDEX EZio DLL User Manual
Data
Type : (char *)
Barcode data. 1 ~ 84 characters
1 = (integer) OK
Return Value
0 = (integer) FAIL
32
GoDEX EZio DLL User Manual
33
GoDEX EZio DLL User Manual
34
GoDEX EZio DLL User Manual
3.40 Bar_QRcode (PosX, PosY, Mode, Type, ErrLevel, Mask, Mul, Len, Deg, Data)
Description Print QR Code
PosX
Type : Integer
Hori. of top-left position of barcode (unit: dots)
PosY
Type : Integer
Vert. of top-left position of barcode (unit: dot)
Mode
Type : Integer
Input mode
1:Numerical data mode
2:Alpha numerical data mode
3:8-bit data mode
4:Kanji data mode
5:Mixing mode
Type
Type : Integer
Barcode type
Parameters 1:Model1 (original)
2:Model2 (enhanced)
3:Micro QR Code
ErrLevel
Type : (char *)
Error correction level
L:Low
M:Medium
Q:Medium high
H:High
Mask
Type : Integer
Masking factor (0 ~ 7 or 8 for auto).
When printing with Micro QR code, it must be set to "0"
Mul
Type : Integer
multiple (1 ~ 8)
35
GoDEX EZio DLL User Manual
Len
Type : Integer
Number of encoded data bytes, including carriage returns
and line feed.
Deg
Type : Integer
Rotation of barcode
0) 0°, 1) 90°, 2) 180°, 3) 270°
Data
Type : (char *)
Barcode data
1 = (integer) OK
Return Value
0 = (integer) FAIL
36
GoDEX EZio DLL User Manual
3.42 Bar_Aztec (PosX, PosY, Degree, Mul, ECICs, Type, MenuSymbol, Len, Data)
Description Print Aztec
PosX
Type : Integer
Hori. of top-left position of barcode (unit: dots)
PosY
Type : Integer
Vert. of top-left position of barcode (unit: dot)
Degree
Type : Integer
Rotation of barcode
0) 0°, 1) 90°, 2) 180°, 3) 270°
Mul
Type : Integer
1:150 dpi printers
2:200 dpi printers
3:300 dpi printers
6:600 dpi printers
ECICs
Parameters Type : (char *)
extended channel interpretation code indicator
“Y”: if data contains ECICs
“N”: if data does not contains ECICs
Type
Type : Integer
0 :default error correction level
01 ~ 99 :error correction percentage (minimum)
101 ~ 104:Compact Symbol 1 ~4 Layer
201 ~ 232:Full Symbol 1 ~ 31 Layer
300 :Rune Symbol
MenuSymbol
Type : (char *)
Menu symbol (barcode reader initialization) indicator
Accepted Values
“Y”: if this symbol is to be a menu symbol
“N”: if it is not a menu symbol
37
GoDEX EZio DLL User Manual
Len
Type : Integer
data length : maximum = 2000
Data
Type : (char *)
Barcode data
1 = (integer) OK
Return Value
0 = (integer) FAIL
38
GoDEX EZio DLL User Manual
Description Print Internal Font & Asia Font (EZPL A Command, Simple Mode)
FontType
Type : (char *)
Font Type
PosX
Type : Integer
Hori. of top-left position of text (unit: dots)
Parameters
PosY
Type : Integer
Vert. of top-left position of text (unit: dot)
Data
Type : (char *)
String data
1 = (integer) OK
Return Value
0 = (integer) FAIL
40
GoDEX EZio DLL User Manual
42
GoDEX EZio DLL User Manual
43
GoDEX EZio DLL User Manual
Type : Integer
0 : width/height Aspect Ratio mode
1 : Average width mode (refer to Further Information)
Data
Type : (char *)
String data
1 = (integer) OK
Return Value
0 = (integer) FAIL
44
GoDEX EZio DLL User Manual
45
GoDEX EZio DLL User Manual
46
GoDEX EZio DLL User Manual
1 = (integer) OK
Return Value
0 = (integer) FAIL
47
GoDEX EZio DLL User Manual
Type : Integer
Height of the ellipse's bounding rectangle. (unit: dots)
Thick
Type : Integer
Line thickness (unit: dot)
1 = (integer) OK
Return Value
0 = (integer) FAIL
48
GoDEX EZio DLL User Manual
49
GoDEX EZio DLL User Manual
Type : Integer
Width of the diamond 's bounding rectangle. (unit: dots)
Diamond_H
Type : Integer
Height of the diamond 's bounding rectangle. (unit: dots)
Thick
Type : Integer
Line thickness (unit: dot)
1 = (integer) OK
Return Value
0 = (integer) FAIL
3.59 GetDllVersion(Version)
Description Read the information of this Dll
Version
Parameters Type : (char **)
The output reference containing Dll Version
Return Value Return the length of the data containing Dll Version
50
GoDEX EZio DLL User Manual
4. Programming Guide
Refer to “Example” directory sample code. You can learn how to control GoDEX
printer via USB, COM, LPT, networks, and Driver. You can also learn basic text
printing, graphic printing, barcode printing and printer parameter settings.
51
GoDEX EZio DLL User Manual
4.1 C# Programming
If you want to quickly develop C# program, you can get EZio32.dll, EZioApi.cs,
GodexPrinter.cs in [EZio_Sample_C #] directory. You can add these three files to
your project and then declare the following objects in your project
Then you can use the “Printer” object, simply controlling GoDEX printer.
4.2VB.NET Programming
If you want to quickly develop VB.NET program, you can get EZio32.dll、
EZioApi.vb、GodexPrinter.vb in [Ezio_Sample_VBNET] directory. You can add these
three files to your project and then declare the following objects in your project
Then you can use the “Printer” object, simply controlling GoDEX printer.
If you want to quickly develop BCB6 program, you can get EZio32.dll、
EZio32_BCB.lib、EZio32.h、ParaDef.h、clsPrinterCommand.cpp、
clsPrinterCommand.h、clsPrinterConfig.cpp、clsPrinterConfig.h、GodexPrinter.cpp、
GodexPrinter.h in [EZio_Sample_BCB6] directory. You can add these files to your
project and then declare the following objects in your project
GodexPrinter Printer;
Then you can use the “Printer” object, simply controlling GoDEX printer.
52
GoDEX EZio DLL User Manual
If you want to quickly develop Delphi 2010 program, you can get EZio32.dll、
GodexPrinter.pas in [EZio_Sample_Delphi2010] directory. You can add these three
files to your project and then declare the following objects in your project
mPrinter: TGodexPrinter;
Then you can use the “mPrinter” object, simply controlling GoDEX printer.
If you want to quickly develop VC 2008 program, you can get EZio32.dll、
EZio32_VC.lib、EZio32.h、ParaDef.h、clsPrinterCommand.cpp、clsPrinterCommand.h、
clsPrinterConfig.cpp、clsPrinterConfig.h、GodexPrinter.cpp、GodexPrinter.h in
[EZio_Sample_VC2008(MFC)] directory. You can add these three files to your
project and then declare the following objects in your project
GodexPrinter Printer;
Then you can use the “Printer” object, simply controlling GoDEX printer.
If you want to quickly develop Java program, you can get EZio32.dll、jna-3.5.1.jar、
GodexPrinter.java、EZioLib.java、clsPrinterConfig.java、clsPrinterCommand.java in
[EZio_Sample_Java_Luna] directory. You can add these three files to your project and
then declare the following objects in your project
Then you can use the “Printer” object, simply controlling GoDEX printer.
53
GoDEX EZio DLL User Manual
54
GoDEX EZio DLL User Manual
55