EZioDLL UM en

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

1.

The DLL for printer with EZPL command


The main revision is to support window 7 and window 8. EZio32.dll is for 32bits and
EZio64.dll for 64 bits. Function to communicate with printer driver is included. Also. in this
revision GetDllVersion is added to get the information of DLL.

The following 3 functions are provided for multiple USB printer interface.
1. FindFirstUSB : find the first USB ID.
2. FindNextUSB : find the next USB ID. This can be used to enumerate all the USB ID of the
conneted printers until return false.
3. OpenUsb : Using USB ID to open the specific printer connected to USB port.

The following 3 functions are provided for multiple network printer interface.
1. FindFirstNet : find the first IP address and port of network printer.
2. FindNextNet : find the next IP address and port. This can be used to enumerate all the
network printers until return false.
3. OpenNet : Using IP address and port to open the specific printer connected to network.

The following function is used to print through printer driver.


OpenDriver : Using the name of installed printer driver to open the specific printer.

In a printing process, OpenDriver (), OpenNet() or openUSB() should be called first before
printing action, and closeport() should be called after finishing printing.
*note that beginjob(0 and endjob(0 are taken off, and the name of new functions added begin
with capital letter.

2. DLL Function list

Command Description
1. openport Open serial ,printer or USB port
2. setup Set label size, darkness and speed of printer.
3. sendcommand Send EZPL command
4. intloadimage Download image (binary image of PCX or BMP)
to internal memory of printer.
5. extloadimage Download image (binary image of PCX or BMP)
to external memory of printer.
6. closeport Close the opened port.
7. ecTextOut Printing the TrueType fonts directly.
8. ecTextOutR Printing the TrueType fonts with orientation
settings
9. ecTextDownLoad Download the TrueType fonts with orientation
settings as a bitmap to be recalled by ^Y
command
10.setbaudrate Set the baud rate of host
11.putimage Printing multi-tone image (format BMP and
JPG) with orientation settings.
Halftone will be applied to the image.
12. downloadimage Download multi-tone image (format BMP and
JPG) with orientation settings as a bitmap to be
recalled by ^Y command.
Halftone will be applied to the image.
13.ecTextOutFine Printing the TrueType fonts with orientation,
weight, italic, underline, strikeout, and inverse
settings.
14.RcvBuf Read a packet from the opened port
15.OpenDriver Using the name of installed printer driver to
open the specific printer.
16.FindFirstUSB find the first USB ID
17.FindNextUSB find the next USB ID. This can be used to
enumerate all the USB ID of the connected
printers until return false.
18.OpenUsb Using USB ID to open the specific printer
connected to USB
19.FindFirstNet find the first IP address and port
20.FindNextNet find the next IP address and port. This can be
used to enumerate all the IP address and port
of the connected printers until return false.
21.OpenNet Using IP address and port to open the specific
printer connected to network
22.sendbuf send a block of data to printer.
23.GetDllVersion Read the information of this DLL

3. DLL Function Description


1. openport
Description: select the output port
Command: openport(no)
Input parameters: no: (string) output port ref.
“0” = LPT1
“1” = COM1
“2” = COM2
“3” = COM3
“4” = COM4
“5” = LPT2
“6” = USB
Return value: 1 = (integer) OK
0 = (integer) FAIL

2. setup
Description: setup parameters of printer
Command: setup(a,b,c,d,e,f)
Input parameters: a: (integer) label size setting (in mm)
b: (integer) darkness (0~19)
c: (integer) printing speed (1~3)
d: (integer) label mode
0: label with gap
1: plain paper
2: black mark label
e: (integer) label gap (in mm)
f: (integer) black top for black mark label
Return value: 1 = (integer) OK
0 = (integer) FAIL

1
3. sendcommand
Description: send EZPL command to printer
Command: sendcommand(command)
Input parameters: Command: (string) any EZPL command
Return value: 1 = (integer) OK
0 = (integer) FAIL

4. intloadimage
Description: down load the image file toprinter’s internal memory
Command: intloadimage(filename, ID_name,image_type)
Input parameters: filename : (string) the file name of the image file
ID_name : (string) the name to stand for the image file
to be recalled by Y command.
image_type : (string) image file type
pcx : for .pcx image file
bmp : for .bmp image file
Return value: 1 = (integer) OK
0 = (integer) FAIL

5. extloadimage
Description: down load the image file to printer’s external memory
Command: extloadimage(filename, image_name,image_type)
Input parameters: filename : (string) the file name of the image file
ID_name : (string) the name to stand for the image file
to be recalled by Y command.
image_type : (string) image file type
pcx : for .pcx image file
bmp : for .bmp image file
Return value: 1 = (integer) OK
0 = (integer) FAIL

6. closeport
Description: close output ports
Command: closeport()
Input parameters: none

7. ecTextOut
Description: printing the TrueType fonts of WINDOWS
Command: ecTextOut(x,y,b,c,d,e,f)
Input parameters: x: (integer) left-upper Hori. pos. (dots)
y: (integer) left-upper Vert. pos. (dots)
b: (integer) height of the text
c: (string) name of the fonts
d: (string) data string

Return value: 1 = (integer) OK


0 = (integer) FAIL

2
8. ecTextOutR
Description: printing the TrueType fonts of WINDOWS with orientation
settings
Command: ecTextOut(x,y,b,c,d,e,f,g)
Input parameters: x: (integer) left-upper Hori. pos. (dots)
y: (integer) left-upper Vert. pos. (dots)
b: (integer) height of the text
c: (string) name of the fonts
d: (string) data string
e: (integer) width of the text
f: (integer) Specifies the weight of the font in the range 0
through 1000. For example, 400 is normal and 700 is
bold.
g: (integer) set the rotation of the output text.
0 for degree 0, 90 for degree90, 180 for degree 180
and 270 for degree 270
Return value: 1 = (integer) OK
0 = (integer) FAIL

9. ecTextDownLoad
Description: Download the TrueType fonts with orientation settings as
a bitmap to be recalled by ^Y command
Command: ecTextOut(b,c,d,e,f,g,name)
Input parameters: b: (integer) height of the text
c: (string) name of the fonts
d: (string) data string
e: (integer) width of the text
f: (integer) Specifies the weight of the font in the range 0
through 1000. For example, 400 is normal and 700 is
bold.
g: (integer) set the rotation of the output text.
0 for degree 0, 90 for degree90, 180 for degree 180
and 270 for degree 270
name: (string)ID name of the downloaded font to be
recalled by Y command.
Return value: 1 = (integer) OK
0 = (integer) FAIL

10. setbaudrate
Description: Set the baud rate of host
Command: setbaudrate(n)
Input parameters: n: (integer) the value of baud rate from for example 4800,
9600, 19200, 38400.

Return value: None

3
11. putimage
Description: Printing multi-tone image (format BMP and JPG) directly.
Halftone will be applied to the image.
Command: putimage(x,y,filename, degree)
Input parameters: x : (integer) left-upper Hori. pos. (dots).
y: (integer) left-upper Vert. pos. (dots).
filename : (string) the file name of the image support
BMP and JPG file type.
degree: (integer)
0 : no rotation
90 : rotate 90 degree
Return value: 1 = (integer) OK
0 = (integer) FAIL

12. downloadimage
Description: Download multi-tone image (format BMP and JPG) with
orientation settings as a bitmap to be recalled by ^Y
command.
Halftone will be applied to the image.
Command: putimage(,filename, degree,name)
Input parameters: filename : (string) the file name of the image support
BMP and JPG file type.
degree: (integer)
0 : no rotation
90 : rotate 90 degree
name : (string) ID name to stand for the downloaded
image file to be recalled by Y command.
Return value: 1 = (integer) OK
0 = (integer) FAIL

13.ecTextOutFine
Description: Printing the TrueType fonts with orientation, weight, italic,
underline, strikeout, and inverse settings.
Command: ecTextOutFine(x,y,b,c,d,e,f,g,h,i,j,k)
Input parameters: x: (integer) left-upper Hori. pos. (dots)
y: (integer) left-upper Vert. pos. (dots)
b: (integer) height of the text
c: (string) name of the fonts
d: (string) data string
e: (integer) width of the text
f: (integer) Specifies the weight of the font in the range 0
through 1000. For example, 400 is normal and 700 is
bold.
g: (integer) set the rotation of the output text.
0 for degree 0, 90 for degree90, 180 for degree 180
and 270 for degree 270
h: (integer) Specifies an italic font if set to TRUE(1).
I: (integer) Specifies an underlined font if set to TRUE.
j: (integer) Specifies a strikeout font if set to TRUE.
K: (integer) 0:normal printout
1:inverse printout

4
Return value: 1 = (integer) OK
0 = (integer) FAIL

14. RcvBuf
Description: Read a packet from the opened port.
Command: RcvBuf (c,d)
Input parameters: c: (char pointer) the return packet
d: (integer pointer) the maximum length to receive.
Return value: return the length of received data.

15. OpenDriver
Description: Using the name of printer driver to open the specific
printer
Command: OpenDriver (i)
Input parameters: i: (string) the input reference containing the name of
printer driver

Return value: 1 = (integer) OK


0 = (integer) FAIL

16. FindFirstUSB
Description: find the first usb ID
Command: FindFirstUSB (o)
Input parameters: o: (string) the output reference containing found USB ID

Return value: 1 = (integer) OK


0 = (integer) FAIL

17. FindNextUSB
Description: find the next usb ID. This can be used to enumerate all the
usb ID of the conneted printers until return false
Command: FindNextUSB (o)
Input parameters: o: (string) the output reference containing found USB ID

Return value: 1 = (integer) OK


0 = (integer) FAIL

18. OpenUSB
Description: Using usbID to open the specific printer
Command: OpenUSB (i)
Input parameters: i: (string) the input reference containing USB ID

Return value: 1 = (integer) OK


0 = (integer) FAIL

5
19. FindFirstNet
Description: find the first IP address and port
Command: FindFirstNet (cIP, cPort)
Input parameters: cIP: (string) the output reference containing found IP
cPort: (string) the output reference containing found Port

Return value: 1 = (integer) OK


0 = (integer) FAIL

20. FindNextNet
Description: Find the next IP address and port. This can be used to
enumerate all the USB ID of the connected printers until
return false
Command: FindNextNet(cIP, cPort)
Input parameters: cIP: (string) the output reference containing found IP
cPort: (string) the output reference containing found Port

Return value: 1 = (integer) OK


0 = (integer) FAIL
21. OpenNet
Description: Using IP address and port to open the specific printer
Command: OpenNet(cIP, cPort)
Input parameters: cIP: (string) the input reference containing USB IP
cPort: (string) the input reference containing Port

Return value: 1 = (integer) OK


0 = (integer) FAIL

22. sendbuf
Description: send a packet via the opened port.
Command: sendbuf (c,d)
Input parameters: c: (char pointer) the packet to send
d: (integer pointer) the length of the packet to send.
Return value: return the length of data sent out. 0 means no data sent
out.

23. GetDllVersion
Description: Read the information of this Dll
Command: GetDllVersion (o)
Input parameters: o: (string) the output reference containing Dll Version

Return value: return the length of the data containing Dll version.

You might also like