d030bbabe2
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 766 git-svn-id: svn://10.65.10.50/trunk@14628 c028cbd2-c16b-5b4b-a496-9718f37d4682
1133 lines
53 KiB
Plaintext
Executable File
1133 lines
53 KiB
Plaintext
Executable File
/******************************************************************************
|
||
Module: BWIN-API.TXT
|
||
All commands for PPLB in Dynamic Link Library under Windows
|
||
Notices: Copyright (c) 1998-2006 ARGOIMPREX
|
||
Version: 3.04BW 2006/02/15
|
||
******************************************************************************/
|
||
Contents
|
||
===============================================================================
|
||
B_Bar2d_Maxi() => Create the 2D barcode object - Maxicode.
|
||
|
||
B_Bar2d_Maxi_N() => Create the 2D barcode object - Maxicode.
|
||
|
||
B_Bar2d_PDF417() => Create the 2D barcode object - PDF-417.
|
||
|
||
B_ClosePrn() => Stop printer operation.
|
||
|
||
B_CreatePrn() => Start printer opreation.
|
||
|
||
B_Del_Form() => Delete a "form" data.
|
||
|
||
B_Del_Pcx() => Clean the stored "graphic data" in RAM or Flash memory.
|
||
|
||
B_Draw_Box() => Create a "box" object.
|
||
|
||
B_Draw_Line() => Create an "line" object.
|
||
|
||
B_Error_Reporting() => Enable/Disable error report.
|
||
|
||
B_Get_DLL_Version() => Get or show this verison for library.
|
||
B_Get_DLL_VersionA() => Get or show this verison for library.
|
||
|
||
B_Get_Graphic_ColorBMP() => Convert the colorBMP data from PC into mono graphic(
|
||
dithering pattern) and download it into printer's RAM.
|
||
|
||
B_Get_Pcx() => Download graph data for PCX format from PC into the
|
||
printer's RAM or Flash memory.
|
||
|
||
B_Initial_Setting() => Perform the initial paprameter setting (send the
|
||
command code into printer directly).
|
||
|
||
B_Load_Pcx() => Acquire the graphic data which stored in the RAM or
|
||
Flash memory.
|
||
|
||
B_Open_ChineseFont() => Open Chinese dot font file (16*15 and 24*24).
|
||
|
||
B_Print_Form() => Perform printing function. And acquire the form data
|
||
which stored in RAM or Flash memory.
|
||
|
||
B_Print_MCopy() => Perform printing function and make multi copy.
|
||
|
||
B_Print_Out() => Perform printing function.
|
||
|
||
B_Prn_Barcode() => Create a "barcode" object and a "counter" object.
|
||
|
||
B_Prn_Configuration() => Configuration print out.
|
||
|
||
B_Prn_Text() => Create a "text" object and a "counter" object.
|
||
|
||
B_Prn_Text_Chinese() => Create a "text" object with Chinese dot font file
|
||
(16*15 or 24*24).
|
||
|
||
B_Prn_Text_TrueType() => Create a "True Type Font" text object.
|
||
B_Prn_Text_TrueType_W() => Create a "True Type Font" text object with Height and Width.
|
||
|
||
B_Select_Option() => Select function - transfer type, cutter and dispenser.
|
||
B_Select_Option2() => Select function - transfer type, cutter and dispenser.
|
||
|
||
B_Select_Symbol() => Select function - symbol set.
|
||
|
||
B_Set_Backfeed() => Setup the "back feed" function.
|
||
|
||
B_Set_BMPSave() => Save Image File.
|
||
|
||
B_Set_Darkness() => Setup the "darkness" function (heating level).
|
||
|
||
B_Set_DebugDialog() => Enable Debug Message Dialog.
|
||
|
||
B_Set_Direction() => Setup the "print direction".
|
||
|
||
B_Set_Form() => Download a form from PC into printers RAM or Flash memory.
|
||
|
||
B_Set_Labgap() => Setup the "label length" and "gap length".
|
||
|
||
B_Set_Labwidth() => Setup the "label width".
|
||
|
||
B_Set_Originpoint() => Setup the "origin point".
|
||
|
||
B_Set_Prncomport() => Setup the "serial port".
|
||
|
||
B_Set_Speed() => Setup the "print speed".
|
||
|
||
B_Set_ProcessDlg() => Set the Process Dialog.
|
||
|
||
B_GetUSBBufferLen() => Get USB port data length
|
||
|
||
B_EnumUSB() => Enum USB port
|
||
|
||
B_CreateUSBPort() => Open USB port
|
||
|
||
B_ResetPrinter() => Reset Printer
|
||
|
||
*******************************************************************************
|
||
Attention
|
||
===============================================================================
|
||
1.Please set up execute path as: \\Windows\system\winpplb.dll or current path
|
||
2.All sample descriptions are based on the syntax of Visual C++.
|
||
|
||
*******************************************************************************
|
||
B_GetUSBBufferLen()
|
||
B_EnumUSB()
|
||
===============================================================================
|
||
PURPOSE Preper to Open USB port
|
||
|
||
SYNTAX int B_GetUSBBufferLen();
|
||
int B_EnumUSB(char *buf);
|
||
|
||
PARAMETER char *buf; To save the USB port data
|
||
|
||
RETURN
|
||
B_GetUSBBufferLen() return the USB data buffer length;
|
||
|
||
B_EnumUSB(char *buf) 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE
|
||
char *buf;
|
||
int nLen = B_GetUSBBufferLen()+1;
|
||
buf = malloc(nLen);
|
||
memset(buf, 0, nLen);
|
||
B_EnumUSB(buf);
|
||
|
||
REMARK Above functions shall co-work together. While request for USB data,
|
||
first to call B_GetUSBBufferLen() to get the length, then share the
|
||
memory to buf. After that, call B_EnumUSB(), to split each data with
|
||
("0x0d0x0a"). e.q. A-200(0x0d)(0x0a)R-400ZIP stands for two printers
|
||
are connected to PC, port 1 is A-200 and port 2 is R-400Zip
|
||
|
||
******************************************************************************
|
||
B_CreatePrn()
|
||
B_CreateUSBPort()
|
||
==============================================================================
|
||
PURPOSE Start printer opreation.
|
||
|
||
SYNTAX int B_CreatePrn(int selection, LPCTSTR filename);
|
||
int B_CreateUSBPort(int nPort)
|
||
|
||
PARAMETER int selection; To select the printer port.
|
||
0 -> print to file.
|
||
1 -> lpt1, 2 -> lpt2, 3 -> lpt3
|
||
4 -> com1, 5 -> com2, 6 -> com3
|
||
10 -> net
|
||
LPCTSTR filename; If selection is 0 , print to file.
|
||
If selection is 10,filename is the path.
|
||
The "file name" can be under current
|
||
directory or full directory path or NULL.
|
||
int nPort; USB port
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_CreatePrn(1,NULL); or B_CreatePrn(0,"C:\TEMP\out.prn");
|
||
B_CreatePrn(10,"\\allen\Label"); or A_CreateUSBPort(1);
|
||
|
||
REMARK The B_CreatePrn and B_CreateUSBPort function will activate a valid
|
||
printer port or "print to file" path. This function must be performed
|
||
before all commands.
|
||
B_CreatePrn or B_CreateUSBPort() must use one of it at once.
|
||
|
||
******************************************************************************
|
||
B_ClosePrn()
|
||
==============================================================================
|
||
PURPOSE Stop printer operation.
|
||
|
||
SYNTAX void B_ClosePrn(void);
|
||
|
||
EXAMPLE B_ClosePrn();
|
||
|
||
REMARK The B_ClosePrn function will access the port that you choiced or
|
||
close file. The function must be performed after all commands placed.
|
||
|
||
*******************************************************************************
|
||
B_Bar2d_Maxi()
|
||
===============================================================================
|
||
PURPOSE Create the 2D barcode object - Maxicode.
|
||
|
||
SYNTAX int B_Bar2d_Maxi(int x,int y,int cl,int cc,long int pc,LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
int cl; A 3-digit Class code.
|
||
int cc; A 3-digits Country code.
|
||
long int pc; Post code, 4 or 5 digits for USA and 6
|
||
characters for other countries.
|
||
LPCTSTR data; Data string. Up to 84 characters.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Bar2d_Maxi(50,50,300,400,93065,"This MaxiCode");
|
||
|
||
******************************************************************************
|
||
B_Bar2d_PDF417()
|
||
==============================================================================
|
||
PURPOSE Create the 2D barcode object - PDF-417.
|
||
|
||
SYNTAX int B_Bar2d_PDF417(int x,int y,int w,int v,int s,int c,int px,
|
||
int py,int r,int l,int t,int o,LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
int w; Maximum print width in dots.
|
||
int v; Maximum print height in dots.
|
||
int s; Error correction level , 0 ~ 8.
|
||
int c; Data compression level , 0 or 1 .
|
||
int px; Module width , 2 ~ 9 in dots.
|
||
int py; Module height , 4 ~ 99 in dots.
|
||
int r; Maximum row count.
|
||
int l; Maximum column count.
|
||
int t; Truncation flag, 0 = normal.
|
||
1 = truncated.
|
||
int o; Rotation. 0 ~ 3.
|
||
LPCTSTR data; A data string.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Bar2d_PDF417(10,10,400,300,0,0,3,7,10,2,0,0,"ARGOXINFO");
|
||
|
||
******************************************************************************
|
||
B_Del_Form()
|
||
==============================================================================
|
||
PURPOSE Delete a "form" data.
|
||
|
||
SYNTAX int B_Del_Form(char formname[10]);
|
||
|
||
PARAMETER char formname[10]; form name with a maximum of 9 characters.
|
||
Value "*": All forms will be deleted form
|
||
RAM or flash memory.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Del_Form("demo");
|
||
|
||
REMARK The B_Del_Form function causes the printer to delete forms
|
||
currently stored in RAM or flash memory. Once a form is deleted.
|
||
It can not be retrieved and printed except it is reloaded again.
|
||
|
||
******************************************************************************
|
||
B_Del_Pcx()
|
||
==============================================================================
|
||
PURPOSE Clean the stored "graphic data" in RAM or Flash memory.
|
||
|
||
SYNTAX int B_Del_Pcx(char pcxname[10]);
|
||
|
||
PARAMETER char pcxname[10]; Maximum 9 characters for the graghic data
|
||
name. The value is "*" that clearns all
|
||
graphic datas form RAM or flash memory.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Del_Pcx("*");
|
||
|
||
REMARK The B_Del_Pcx function will delete the graphics data which already
|
||
stored in printers RAM or flash memory. If certain gragics data
|
||
was deleted, it will not be retrieved and printed unless be
|
||
reloaded.
|
||
|
||
******************************************************************************
|
||
B_Draw_Box()
|
||
==============================================================================
|
||
PURPOSE Create a "box" object.
|
||
|
||
SYNTAX int B_Draw_Box(int x,int y,int thickness,int hor_dots,int ver_dots);
|
||
|
||
PARAMETER int x; X coordinate of star point in dots.
|
||
int y; Y coordinate of star point in dots.
|
||
int thickness; Thickness of four edges.
|
||
int hor_dots; X coordinate of end point in dots.
|
||
int ver_dots; Y coordinate of end point in dots.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Draw_Box(50,120,5,250,150);
|
||
|
||
REMARK The B_Draw_Box function will draw a box by "OR" operation.
|
||
|
||
******************************************************************************
|
||
B_Draw_Line()
|
||
==============================================================================
|
||
PURPOSE Create an "line" object.
|
||
|
||
SYNTAX int B_Draw_Line(char mode,int x,int y,int hor_dots,int ver_dots);
|
||
|
||
PARAMETER char mode; See as follows:
|
||
+------+----------------------------+
|
||
| mode | operation. |
|
||
+------+----------------------------+
|
||
| E | Exclusive OR |
|
||
+------+----------------------------+
|
||
| O | OR |
|
||
+------+----------------------------+
|
||
| W | White line, so it may erase|
|
||
| | previous image. |
|
||
+------+----------------------------+
|
||
int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
int hor_dots; Horizontal length in dots.
|
||
int ver_dots; Vertical length in dots.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Draw_Line('O',50,30,100,10);
|
||
|
||
REMARK The B_Draw_Line function will draw a line by "OR" or "XOR" operation.
|
||
|
||
******************************************************************************
|
||
B_Error_Reporting()
|
||
==============================================================================
|
||
PURPOSE Enable/Disable error report.
|
||
|
||
SYNTAX int B_Error_Reporting(char option);
|
||
|
||
PARAMETER char option; N will disable feedback of printer status.
|
||
S will enable feedback of printer status.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Error_Reporting('S');
|
||
|
||
REMARK The B_Error_Reporting function is used to enable/disable the
|
||
feedback of printer status. The feedback channel is through the
|
||
RS232 port. The default is "disable".
|
||
|
||
******************************************************************************
|
||
B_Get_DLL_Version()
|
||
B_Get_DLL_VersionA()
|
||
==============================================================================
|
||
PURPOSE Get or show this verison for library.
|
||
|
||
SYNTAX char* B_Get_DLL_Version(int nShowMessage);
|
||
int B_Get_DLL_VersionA(int nShowMessage);
|
||
|
||
PARAMETER int nShowMessage; 0 -> The message dailog isn't showed.
|
||
1 -> The message dailog is showed.
|
||
RETURN B_Get_DLL_Version() -> Library verison string, if fail return null.
|
||
B_Get_DLL_VersionA() -> return version value.
|
||
|
||
EXAMPLE B_Get_DLL_Version(1);
|
||
|
||
REMARK The B_Get_DLL_Version function is used to get or show this
|
||
verison for library.
|
||
|
||
*******************************************************************************
|
||
B_Get_Graphic_ColorBMP()
|
||
===============================================================================
|
||
PURPOSE Convert the colorBMP data from PC into mono graphic (dithering
|
||
pattern) and download it into printer's RAM.
|
||
|
||
SYNTAX int B_Get_Graphic_ColorBMP(int x, int y, LPCTSTR filename);
|
||
|
||
PARAMETER int x; X coordinate.
|
||
int y; Y coordinate.
|
||
LPCTSTR filename; File name of graphic with path.
|
||
The format is XXXXXXXX.XXX or X:\XXX\XXX.XXX
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Get_Graphic_ColorBMP(30,20,"girl.bmp");
|
||
|
||
REMARK The B_Get_Graphic_ColorBMP function will convert color file into mono
|
||
file for data Storing and Printing.But you must install Window's
|
||
Driver for Dr.200 or Dr.300 first. And adjust the darkness. This
|
||
function will first search the Windows driver (Dr.200 or Dr.300)
|
||
from PCs existing default driver. If the default driver is for
|
||
other printer, it will sreach Dr.200 and then Dr.300.
|
||
|
||
******************************************************************************
|
||
B_Get_Pcx()
|
||
==============================================================================
|
||
PURPOSE Download graph data from PC into the printer's RAM or Flash memory.
|
||
|
||
SYNTAX int B_Get_Pcx(int x,int y,LPCTSTR filename);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
LPCTSTR filename; File name of graphic data for PCX with path.
|
||
The format is XXXXXXXX.XXX or X:\XXX\XXX.XXX
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Get_Pcx(50,30"phone.pcx");
|
||
|
||
REMARK The B_Get_PCX function will store graphic object for PCX in RAM memory.
|
||
|
||
******************************************************************************
|
||
B_Initial_Setting()
|
||
===============================================================================
|
||
PURPOSE Perform the initial paprameter setting (send the command code into
|
||
printer directly).
|
||
|
||
SYNTAX int B_Initial_Setting(int Type,LPCTSTR Source);
|
||
|
||
PARAMETER int Type; To choose type to input.
|
||
The value is 0 -> to import a string.
|
||
The value is 1 -> to import a file.
|
||
LPCTSTR Source; The data source is string or file name
|
||
in path.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE LPCTSTR aa = "ZT\r\n\0"; B_Initial_Setting(0,aa);
|
||
or
|
||
B_Initial_Setting(1,"initfile.txt");
|
||
|
||
REMARK The B_Initial_Setting function is prescored to send some commands
|
||
defined by user. The function will send a string with some commands
|
||
or a file. The command should be placed after the B_Create_Prn() function.
|
||
|
||
*******************************************************************************
|
||
B_Load_Pcx()
|
||
==============================================================================
|
||
PURPOSE Acquire the graphic data which stored in the RAM or Flash memory.
|
||
|
||
SYNTAX int B_Load_Pcx(int x,int y,char pcxname[10]);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
char pcxname[10]; Graph name with a maximum of 9 characters.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Load_Pcx(50,30,"phone");
|
||
|
||
REMARK The B_Load_Pcx function will print a graphic data which has
|
||
been downloaded into the printer.
|
||
|
||
*******************************************************************************
|
||
B_Open_ChineseFont()
|
||
===============================================================================
|
||
PURPOSE Open Chinese dot font file (16*15 and 24*24).
|
||
|
||
SYNTAX int B_Open_ChineseFont(char* path);
|
||
|
||
PARAMETER char* path; The Chinese dot font file source path.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Open_ChineseFont("C:\\ET3");
|
||
|
||
REMARK The B_Open_ChineseFont function will open Chinese dot font file.
|
||
And give B_Prn_Text_Chinese function to used.
|
||
|
||
******************************************************************************
|
||
B_Print_Form()
|
||
==============================================================================
|
||
PURPOSE Perform printing function. And acquire the form data which stored
|
||
in RAM or Flash memory.
|
||
|
||
SYNTAX int B_Print_Form(int labset,int copies,char form_out[10],LPTSTR var);
|
||
|
||
PARAMETER int labset; Number of label sets, 1 ~ 32767.
|
||
int copies; Number of copies per label, 1 ~ 32767.
|
||
char form_out[10]; Form name of store in printer.The name
|
||
is same inter form name of printer.
|
||
LPTSTR var; VAR,COUNT in accordance with forms.Use
|
||
"," to differentiate between VAR or COUNT
|
||
of string.You would want to use ",".You
|
||
can use ";,".This ";," is "," mean.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Print_form(3,2,"demo","2000,Bicycle");
|
||
|
||
REMARK The B_Print_Form function access data of all commands in the form.
|
||
First used B_Set_form() to store a form in printer. The command
|
||
have to be placed after all commands. Befor B_ClosePrn().
|
||
The labset parameter will make increment or decrement for field
|
||
values.
|
||
|
||
******************************************************************************
|
||
B_Print_MCopy()
|
||
===============================================================================
|
||
PURPOSE Perform printing function and make multi copy.
|
||
|
||
SYNTAX int B_Print_MCopy(int labset,int copies)
|
||
|
||
PARAMETER int labset; Number of label sets, 1 ~ 32767.
|
||
int copies; Number of copies per label, 1 ~ 32767.
|
||
If the value is number one, it is same
|
||
B_Print_Out() function.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Print_MCopy(2,2);
|
||
|
||
REMARK The B_Print_MCopy function will send all data to the printer.
|
||
The function has to be performed befor ClosePrn function.
|
||
The Print_Out function will not be activated when Print_MCopy is setup.
|
||
The labset parameter will make increment or decrement for field
|
||
values.
|
||
|
||
*******************************************************************************
|
||
B_Print_Out()
|
||
==============================================================================
|
||
PURPOSE Perform printing function.
|
||
|
||
SYNTAX int B_Print_Out(int labset);
|
||
|
||
PARAMETER int labset; You want to print pieces.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Print_Out(1);
|
||
|
||
REMARK The B_Print_Out function access data of all commands. This command has
|
||
to be placed after all function and before B_ClosePrn().
|
||
|
||
******************************************************************************
|
||
B_Prn_Barcode()
|
||
==============================================================================
|
||
PURPOSE Create a "barcode" object and a "counter" object.
|
||
|
||
SYNTAX int B_Prn_Barcode(int x,int y,int ori,char type[4],int narrow,
|
||
int width,int height, char human,LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
int ori; Orientation or print direction.
|
||
Value: 0, 1, 2, 3.
|
||
char type[4]; Bar code type as follows:
|
||
+========================================================================+
|
||
| type| Bar Code | type| Bar Code |
|
||
+========================================================================+
|
||
| 0 | Code 128 UCC (shipping cont-| E30| EAN-13 |
|
||
| | ainer code) +-----+------------------------------+
|
||
+-----+-----------------------------+ E32| EAN-13 2 digit add-on |
|
||
| 1 | Code 128 subset A,B and C +-----+------------------------------+
|
||
+-----+-----------------------------+ E35| EAN-13 5 digit add-on |
|
||
| 1E | UCC/EAN +-----+------------------------------+
|
||
+-----+-----------------------------+ E80| EAN-8 |
|
||
| 2 | Interleaved 2 of 5 +-----+------------------------------+
|
||
+-----+-----------------------------+ E82| EAN-8 2 digit add-on |
|
||
| 2C | Interleaved 2 of 5 with che-+-----+------------------------------+
|
||
| | ck sum digit | E85| EAN-8 5 digit add-on |
|
||
+-----+-----------------------------+-----+------------------------------+
|
||
| 2D | Interleaved 2 of 5 with hum-| K | Codabar |
|
||
| | an readable check digit +-----+------------------------------+
|
||
+-----+-----------------------------+ P | Postnet |
|
||
| 2G | German Postcode +-----+------------------------------+
|
||
+-----+-----------------------------+ UA0| UPC-A |
|
||
| 2M | Matrix 2 of 5 +-----+------------------------------+
|
||
+-----+-----------------------------+ UA2| UPC-A 2 digit add-on |
|
||
| 2U | UPC Interleaved 2 of 5 +-----+------------------------------+
|
||
+-----+-----------------------------+ UA5| UPC-A 5 digit add-on |
|
||
| 3 | Code 3 of 9 +-----+------------------------------+
|
||
+-----+-----------------------------+ UE0| UPC-E |
|
||
| 3C | Code 3 of 9 with check sum +-----+------------------------------+
|
||
| | digit | UE2| UPC-E 2 digit add-on |
|
||
+-----+-----------------------------+-----+------------------------------+
|
||
| 9 | Code 93 | UE5| UPC-E 5 digit add-on |
|
||
+-----+-----------------------------+-----+------------------------------+
|
||
int narrow; Narrow bar width in pixels.
|
||
int width; Wide bar width in pixels.
|
||
int height; Bar code height in pixels.
|
||
char human; N -no text is printed or B - the human
|
||
readable text is printed.
|
||
LPCTSTR data; A text string. When the data is added the
|
||
format for <Operation Number> is added
|
||
counter. Operation: "+" or "-" sign,
|
||
Number: 0 ~ 32768 number.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Prn_Barcode(650,15,0,"E80",2,2,51,'B',"1234567"); // no counter
|
||
or
|
||
B_Prn_Barcode(650,15,0,"E80",2,2,51,'B',"1234567<+10>");//have a counter
|
||
|
||
******************************************************************************
|
||
B_Prn_Configuration()
|
||
==============================================================================
|
||
PURPOSE Configuration print out.
|
||
|
||
SYNTAX void B_Prn_Configuration(void);
|
||
|
||
EXAMPLE B_Prn_Configuration();
|
||
|
||
REMARK The B_Prn_Configuration function will print out the printer
|
||
configuration includeing settings, firmware version, accessories,
|
||
etc...
|
||
|
||
******************************************************************************
|
||
B_Prn_Text()
|
||
==============================================================================
|
||
PURPOSE Create a "text" object and a "counter" object.
|
||
|
||
SYNTAX int B_Prn_Text(int x,int y,int ori,int font,int hor_factor,
|
||
int ver_factor,char mode,LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
int ori; Orientation or print direction.
|
||
Value: 0, 1, 2, 3.
|
||
int font; ID number for font selection.
|
||
Value: 1 ~ 5 select resident font.
|
||
int hor_factor; Horizontal scale factor. Value: 1 ~ 24.
|
||
int ver_factor; Vertical scale factor. Value: 1 ~ 24.
|
||
char mode; N for normal text or R for reverse.
|
||
LPCTSTR data; A text string. When the data is added the
|
||
format for <Operation Number> is added
|
||
counter. Operation: "+" or "-" sign,
|
||
Number: 0 ~ 32768 number.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Prn_Text(50,110,0,4,1,1,'N',"A123456"); // no counter
|
||
or
|
||
B_Prn_Text(50,110,0,4,1,1,'N',"A123456<-1>"); // have a counter
|
||
|
||
*******************************************************************************
|
||
B_Prn_Text_Chinese()
|
||
===============================================================================
|
||
PURPOSE Create a "text" object with Chinese dot font file (16*15 or 24*24).
|
||
|
||
SYNTAX int B_Prn_Text_Chinese(int x,int y,int fonttype,LPCTSTR id_name,LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinates.
|
||
int y; Y coordinates.
|
||
int fonttype; Select Chinese dot font file.
|
||
0 -> 16*15<31>B1 -> 24*24.
|
||
LPCTSTR id_name; To give a id name to store in printer after
|
||
calling text by Load_Pcx().
|
||
LPCTSTR data; A text string.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Open_ChineseFont("C:\\ET3");
|
||
B_Prn_Text_Chinese(100, 100, 0,"A01","<22><><EFBFBD>a<EFBFBD>Q<EFBFBD>q<EFBFBD><71><EFBFBD>e<EFBFBD>Ϣ<EFBFBD><CFA2>Ѣ<EFBFBD><D1A2>Ң<EFBFBD>");
|
||
|
||
REMARK The B_Prn_Text_Chinese function is able to print a text for Chinese
|
||
dot font file (16*15 or 24*24).
|
||
But you must install Window's Driver for Dr.200 or Dr.300
|
||
first. And adjust the darkness. This function will first search the
|
||
Windows driver (Dr.200 or Dr.300) from PCs existing default driver.
|
||
If the default driver is for other printer, it will sreach Dr.200
|
||
and then Dr.300.
|
||
|
||
******************************************************************************
|
||
B_Prn_Text_TrueType()
|
||
B_Prn_Text_TrueType_W()
|
||
===============================================================================
|
||
PURPOSE Create a "True Type Font" text object.
|
||
|
||
SYNTAX int B_Prn_Text_TrueType(int x, int y, int FSize, LPCTSTR FType,
|
||
int Fspin, int FWeight, int FItalic, int FUnline,
|
||
int FStrikeOut, LPCTSTR id_name, LPCTSTR data,
|
||
int mem_mode);
|
||
int B_Prn_Text_TrueType_W(int x,int y,int FHeight,int FWidth,LPCTSTR FType,
|
||
int Fspin,int FWeight,int FItalic,int FUnline,
|
||
int FStrikeOut,LPCTSTR id_name,LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinates.
|
||
int y; Y coordinates.
|
||
int FSize; TrueType font size,unit is (dot).
|
||
FSize = (dpi * point) / 72.
|
||
int FHeight; Font Height, unit is (dot).
|
||
FHeight = (dpi * point) / 72.
|
||
int FWidth; Font Width, unit is (dot).
|
||
FWidth = (dpi * point) / 72.
|
||
LPCTSTR FType; TrueType font type name.
|
||
int Fspin; TrueType font to rotate.
|
||
1 -> 0, 2 -> 90, 3 -> 180, 4 -> 270
|
||
int FWeight; TrueType font thickness bellow:
|
||
0 and NULL and 400 -> standard,
|
||
100 -> special thin,200 -> very thin,
|
||
300 -> thin ,500 -> middle,
|
||
600 -> half thick ,700 -> thick,
|
||
800 -> special thick,900 ->blackbody.
|
||
int FItalic; TrueType font italic.
|
||
0 -> FALSE, 1 -> TRUE.
|
||
int FUnline; TrueType font underline.
|
||
0 -> FALSE, 1 -> TRUE.
|
||
int FStrikeOut; TrueType font StrikeOut.
|
||
0 -> FALSE, 1 -> TRUE.
|
||
LPCTSTR id_name; To give a id name to store in printer after
|
||
calling text by Load_Pcx().
|
||
LPCTSTR data; A text string.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Prn_Text_TrueType(30,35,40,"Times New Roman",4,400,0,0,0,"AA","ABCDEF");
|
||
B_Prn_Text_TrueType_W(30,35,40,40,"Times New Roman",4,400,0,0,0,"AA","ABCDEF");
|
||
|
||
REMARK The B_Prn_Text_TrueType function is able to print a text for True
|
||
Type Font, But you must install Window's Driver for Dr.200 or Dr.300
|
||
first. And adjust the darkness. This function will first search the
|
||
Windows driver (Dr.200 or Dr.300) from PCs existing default driver.
|
||
If the default driver is for other printer, it will sreach Dr.200
|
||
and then Dr.300.
|
||
|
||
*******************************************************************************
|
||
B_Select_Option()
|
||
B_Select_Option2()
|
||
===============================================================================
|
||
PURPOSE Setup print mode, enable Cutter or Peel.
|
||
|
||
SYNTAX int B_Select_Option(int object);
|
||
int B_Select_Option2(int object, int p)
|
||
|
||
PARAMETER int object; Printer mode selection.
|
||
1 -> thermal transfer, disable Cutter and Peel.
|
||
2 -> direct thermal, disable Cutter and Peel.
|
||
3 -> direct thermal, Cutter, disable Peel.
|
||
4 -> direct thermal, Peel, disable Cutter.
|
||
5 -> thermal transfer, Cutter, disable Peel.
|
||
6 -> thermal transfer, Peel, disable Cutter.
|
||
int p; The number of label to print before cut.
|
||
RETREN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE: B_Select_Option(1);
|
||
B_Select_Option2(2, 3);
|
||
|
||
REMARK: The B_Select_Option(B_Select_Option2) function is to setup Printer print mode.
|
||
|
||
*******************************************************************************
|
||
B_Select_Symbol()
|
||
==============================================================================
|
||
PURPOSE Select function - Symbol Set.
|
||
|
||
SYNTAX int B_Select_Symbol(int num_bit,int symbol,int country);
|
||
|
||
PARAMETER int num_bit; Data bit number.8 for 8-bit data and 7
|
||
for 7-bit data.
|
||
int symbol; Symbol set.
|
||
NOTE:The factory default symbol set is
|
||
Code page 437(English).
|
||
int country; KDU country code.
|
||
+---------------------------+---------------------------+
|
||
| 8 bit data | 7 bit data |
|
||
+------+--------------------+------+--------------------+
|
||
|symbol| Code page |symbol| Code page |
|
||
+------+--------------------+------+--------------------+
|
||
| 0 |English(437) | 0 |USASCII |
|
||
+------+--------------------+------+--------------------+
|
||
| 1 |Latin(850) | 1 |British |
|
||
+------+--------------------+------+--------------------+
|
||
| 2 |Slavic(852) | 2 |German |
|
||
+------+--------------------+------+--------------------+
|
||
| 3 |Portugal(860) | 3 |French |
|
||
+------+--------------------+------+--------------------+
|
||
| 4 |Canadian?French(863)| 4 |Danish |
|
||
+------+--------------------+------+--------------------+
|
||
| 5 |Nordic(865) | 5 |Italian |
|
||
+------+--------------------+------+--------------------+
|
||
| | | 6 |Spanish |
|
||
+------+--------------------+------+--------------------+
|
||
| | | 7 |Swedish |
|
||
+------+--------------------+------+--------------------+
|
||
| | | 8 |Swiss |
|
||
+------+--------------------+------+--------------------+
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Select_Symbol(7,5,1);
|
||
|
||
REMARK The B_Select_Symbol function is used to select the proper symbol
|
||
set.
|
||
|
||
******************************************************************************
|
||
B_Set_Backfeed()
|
||
==============================================================================
|
||
PURPOSE Setup the "back feed" function.
|
||
|
||
SYNTAX int B_Set_Backfeed(char option);
|
||
|
||
PARAMETER char option; B is disable back feed.
|
||
F is the printer will feed about one
|
||
more inch so that the user can see the
|
||
whole label.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Backfeed('B');
|
||
|
||
REMARK The B_Set_Backfeed() function enables the label to be fed a little
|
||
bit ahead after printing which user could tear it off easily.
|
||
And the label roll will be fed withdraw to proper position before
|
||
the next label printed.
|
||
|
||
*******************************************************************************
|
||
B_Set_BMPSave()
|
||
===============================================================================
|
||
PURPOSE Save Image File.
|
||
|
||
SYNTAX int B_Set_BMPSave(int nSave, char *pstrBMPFName);
|
||
|
||
PARAMETER int nSave; 1 -> Save Image.
|
||
0 -> Don't Save Image.
|
||
|
||
char *pstrBMPFName; File Name.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_BMPSave(1, "C:\TempBMP.bmp");
|
||
|
||
REMARK The B_Set_BMPSave function can decide to save image to file.
|
||
|
||
******************************************************************************
|
||
B_Set_Darkness()
|
||
==============================================================================
|
||
PURPOSE Setup the "darkness" function (heating level).
|
||
|
||
SYNTAX int B_Set_Darkness(int darkness);
|
||
|
||
PARAMETER int darkness; Acceptable values from 0 to 15.The default
|
||
darkness value is 8.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Darkness(9);
|
||
|
||
REMARK The B_Set_Darkness function will define the printers darkness.
|
||
Different media material, print-out pattern and printing speed will
|
||
cause different printout darkness; and which can be adjusted by this
|
||
function.
|
||
|
||
*******************************************************************************
|
||
B_Set_DebugDialog()
|
||
===============================================================================
|
||
PURPOSE Enable Debug Message Dialog.
|
||
|
||
SYNTAX int B_Set_DebugDialog(int nEnable);
|
||
|
||
PARAMETER int nEnable; 1 -> Enable.
|
||
0 -> Disable.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_DebugDialog(1);
|
||
|
||
REMARK The B_Set_DebugDialog function set debug message dialog.
|
||
|
||
******************************************************************************
|
||
B_Set_Direction()
|
||
==============================================================================
|
||
PURPOSE Setup "Print Direction".
|
||
|
||
SYNTAX int B_Set_Direction(char direction);
|
||
|
||
PARAMETER char direction; Acceptable values are B or T.They are
|
||
diagonally symmetrical.The default
|
||
value is T.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Direction('T');
|
||
|
||
REMARK The B_Set_Direction function will setup the print direction
|
||
for all graphics,texts,bar codes,lines and boxes.
|
||
|
||
******************************************************************************
|
||
B_Set_Form()
|
||
==============================================================================
|
||
PURPOSE Download a form from PC into printers RAM or Flash memory.
|
||
|
||
SYNTAX int B_Set_Form(LPCTSTR formfile);
|
||
|
||
PARAMETER LPCTSTR formfile; File name for form. The form must use
|
||
DOS's drive make a form in PPLB utility
|
||
of Driver Disk.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_form("demo.prn");
|
||
|
||
REMARK The B_Set_Form function activates a form store sequence to be printed.
|
||
The function is used befor B_Print_Form().
|
||
|
||
******************************************************************************
|
||
B_Set_Labgap()
|
||
==============================================================================
|
||
PURPOSE Setup the "Label and Gap Length".
|
||
|
||
SYNTAX int B_Set_Labgap(int lablength,int gaplength);
|
||
|
||
PARAMETER int lablength; Form length after the last image line.
|
||
int gaplength; Gap length.For continuous media(without
|
||
gap)this field should be set to 0.
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Labgap(100,20);
|
||
|
||
******************************************************************************
|
||
B_Set_Labwidth()
|
||
==============================================================================
|
||
PURPOSE Setup the "Label Width".
|
||
|
||
SYNTAX int B_Set_Labwidth(int labwidth);
|
||
|
||
PARAMETER int labwidth; Label width in dots.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Labwidth(250);
|
||
|
||
REMARK The B_Set_Labwidth function will set the label width.
|
||
This is an alternative to sending a B_Set_Originpoint function for
|
||
centering labels.
|
||
|
||
******************************************************************************
|
||
B_Set_Originpoint()
|
||
==============================================================================
|
||
PURPOSE Setup the "Origin point".
|
||
|
||
SYNTAX int B_Set_Originpoint(int hor,int ver);
|
||
|
||
PARAMETER int hor; Horizontal margin measured in dots.
|
||
int ver; Vertical margin measured in dots.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Originpoint(0,0);
|
||
|
||
REMARK The B_Set_Originpoint function will move the origin point for
|
||
the X and Y axes.
|
||
After sending this function, all coordinates will be moved
|
||
according to the new orgin.
|
||
|
||
******************************************************************************
|
||
B_Set_Prncomport()
|
||
==============================================================================
|
||
PURPOSE Setup the "Serial Port".
|
||
|
||
SYNTAX int B_Set_Prncomport(int baud,char parity,int data,int stop);
|
||
|
||
PARAMETER int baud; Baud rate.Acceptable values are:
|
||
value speed
|
||
38 38,400 baud
|
||
19 19,200 baud
|
||
96 9,600 baud
|
||
48 4,800 baud
|
||
24 2,400 baud
|
||
char parity; Parity.O -odd,E -even parity and N -none
|
||
parity.
|
||
int data; Data bit number,7 or 8.
|
||
int stop; Stop bit number,1 or 2.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Prncomport(96,'N',8,1);
|
||
|
||
REMARK The B_Set_Prncomport function will setup the serial port parameters
|
||
as to match your hosts configuration. The protocol between host
|
||
and printer must be in identical condition.
|
||
|
||
*******************************************************************************
|
||
B_Set_Prncomport_PC()
|
||
===============================================================================
|
||
PURPOSE Setup the serial port for PC.
|
||
|
||
SYNTAX int B_Set_Prncomport_PC(int nBaudRate, int nByteSize, int nParity,
|
||
int nStopBits, int nDsr, int nCts, int nXonXoff);
|
||
|
||
PARAMETER int nBaudRate; Baud rate:
|
||
1 -> 110 9 -> 19200
|
||
2 -> 300 10 -> 38400
|
||
3 -> 600 11 -> 56000
|
||
4 -> 1200 12 -> 57600
|
||
5 -> 2400 13 -> 115200
|
||
6 -> 4800 14 -> 128000
|
||
7 -> 9600 15 -> 256000
|
||
8 -> 14400 0 -> 9600
|
||
|
||
int nByteSize; Data bit number:
|
||
0 -> 7-bit data
|
||
7 -> 7-bit data
|
||
8 -> 8-bit data
|
||
|
||
int nParity; Parity:
|
||
0 -> none parity
|
||
1 -> even parity
|
||
2 -> odd parity
|
||
|
||
int nStopBits; Stop bit number:
|
||
0 -> 1 stop bit
|
||
1 -> 1 stop bit
|
||
2 -> 2 stop bits
|
||
|
||
int nDsr; Setup hardware flow control
|
||
1 -> DTR CONTROL HANDSHAKE;
|
||
0 -> DTR CONTROL ENABLE;
|
||
|
||
int nCts; Setup hardware flow control
|
||
1 -> RTS CONTROL HANDSHAKE;
|
||
0 -> RTS CONTROL ENABLE;
|
||
|
||
int nXonXoff; Setup software flow control
|
||
0 -> Enable;
|
||
1 -> Disable;
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Prncomport_PC(0, 0, 0, 0, 1, 1, 1);
|
||
|
||
<20>@REMARK The fuction of B_Set_Prncomport_PC is to setup the value of PC
|
||
serial Port. For successful communication between PC and Printer,
|
||
this value should be commanded in accrodance with the setting
|
||
value of printer. Besides, this command should be set before
|
||
B_Print_Out() executed.
|
||
|
||
******************************************************************************
|
||
B_Set_Speed()
|
||
==============================================================================
|
||
PURPOSE Setup the "print speed".
|
||
|
||
SYNTAX int B_Set_Speed(int speed);
|
||
|
||
PARAMETER int speed; A single char acter(0 to 7) representing
|
||
a particular speed setting.The range
|
||
depends on your printer model.
|
||
+-------------+------------------+
|
||
| speed Value | SPEED |
|
||
+-------------+------------------+
|
||
| 0 or 1 | 1 ips (25 mmps) |
|
||
+-------------+------------------+
|
||
| 2 | 2 ips (50 mmps) |
|
||
+-------------+------------------+
|
||
| 3 | 3 ips (75 mmps) |
|
||
+-------------+------------------+
|
||
| 4 | 4 ips (100 mmps) |
|
||
+-------------+------------------+
|
||
| 5 | 5 ips (125 mmps) |
|
||
+-------------+------------------+
|
||
| 6 | 6 ips (150 mmps) |
|
||
+-------------+------------------+
|
||
| 7 | 7 ips (175 mmps) |
|
||
+-------------+------------------+
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_Speed(2);
|
||
|
||
REMARK The B_Set_Speed function will set a particular speed for the
|
||
label or batch of labels being printed.
|
||
|
||
******************************************************************************
|
||
B_Set_ProcessDlg()
|
||
==============================================================================
|
||
PURPOSE Set the Process bar.
|
||
|
||
SYNTAX int B_Set_ProcessDlg(int nShow);
|
||
|
||
PARAMETER int nShow; 0:Close Process bar.
|
||
1:Open Process bar.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Set_ProcessDlg(1);
|
||
|
||
REMARK The B_Set_ProcessDlg function is used to open or close the Process
|
||
bar Dialog.
|
||
|
||
*******************************************************************************
|
||
B_Bar2d_PDF417_N()
|
||
==============================================================================
|
||
PURPOSE Create the 2D barcode object - PDF-417.
|
||
|
||
SYNTAX int B_Bar2d_PDF417_N(int x, int y, int w, int h, LPCTSTR pParameter, LPCTSTR data);
|
||
|
||
PARAMETER int x; X coordinate in dots.
|
||
int y; Y coordinate in dots.
|
||
int w; Maximum print width in dots.
|
||
int h; Maximum print height in dots.
|
||
Error correction level(s), 0 ~ 8.
|
||
Data compression level(c), 0 or 1 .
|
||
print human readble(pxxx,yyy,mm)
|
||
xxx:Human readable horizontal start location, 0 ~ 999.
|
||
yyy:Human readable vertical start location, 0 ~ 999.
|
||
mm:Maximum characters per line, 0 ~ 99.
|
||
Bar code origin point(f), 0 or 1.
|
||
Module width(x), 2 ~ 9 in dots.
|
||
Module height(y), 4 ~ 99 in dots.
|
||
Maximum row count(r).
|
||
Maximum column count(l).
|
||
Truncation flag(t), 0 = normal,1 = truncated.
|
||
LPCTSTR data; A data string.
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_Bar2d_PDF417_N(10,10,400,300,<2C><>s0,c0,p400,400,10,f0,x3,y7,r10,l2,f0<66><30>,"ARGOXINFO");
|
||
To ignore the whole pParameter or even part of the sub-parameters of pParameter is
|
||
accepted.
|
||
1. To ignore the whole pParameter: Simply issue the value as "NULL".
|
||
2. To ignore part of the sub-parameters of pParameter, please notice the sub-parameters
|
||
that controls "print human readable" (pxxx,yyy,mm) should be ignored as a sub-parameter set.
|
||
For example, you can ignore s0, c0, f0, x3, y7, r10, l2, or f0 individually, but you should
|
||
ignore the p400, 400, 10 together.
|
||
s0,c0,p400,400,10,f0,x3,y7,r10,l2,f0
|
||
|
||
REMARK Support printer: R-400 -- R2B0 3.08
|
||
|
||
*******************************************************************************
|
||
B_ResetPrinter()
|
||
==============================================================================
|
||
PURPOSE This function emulates Power Off and then Power On.
|
||
|
||
SYNTAX int B_ResetPrinter();
|
||
|
||
RETURN 0 -> OK.
|
||
Reference BW-Error.txt file.
|
||
|
||
EXAMPLE B_ResetPrinter();
|
||
|
||
*******************************************************************************
|