Manual OPOS Driver LabelPrinter English V1.10
Manual OPOS Driver LabelPrinter English V1.10
OPOS Driver
Ver. 1.10
http://www.bixolon.com
OPOS Driver
Copyright
© BIXOLON Co., Ltd. All rights reserved.
This user manual and all property of the product are protected under copyright law.
It is strictly prohibited to copy, store, and transmit the whole or any part of the manual
and any property of the product without the prior written approval of BIXOLON Co., Ltd.
The information contained herein is designed only for use with this BIXOLON product.
BIXOLON is not responsible for any direct or indirect damages, arising from or related to
use of this information.
BIXOLON Co., Ltd. maintains ongoing efforts to enhance and upgrade the functions and
quality of all our products.
In the following, product specifications and/or user manual content may be changed
without prior notice.
Caution
Some semiconductor devices are easily damaged by static electricity. You should turn
the printer “OFF”, before you connect or remove the cables on the rear side, in order to
guard the printer against the static electricity. If the printer is damaged by the static
electricity, you should turn the printer “OFF”.
Ver. 1.10 - 2 -
OPOS Driver
Introduction
This is a manual about how to set and configure device and to develop applications to
use BIXOLON label printer with BIXOLON OPOS driver.
Before use BIXOLON label printer, set and configure printer by using BIXOLON OPOS
driver Setup Utility.
[Further Source]
OLE for Retail POS committee available from http://monroecs.com/opos.htm
Driver Update from http://www.bixolon.com
Ver. 1.10 - 3 -
OPOS Driver
Table of Contents
Copyright ........................................................................................................................... 2
Ver. 1.10 - 4 -
OPOS Driver
5-2 Code page........................................................................................................................ 27
5-2-1 Basic code page .............................................................................................. 27
5-2-2 International characterset code table ......................................................... 28
5-2-3 Examples of international characterset....................................................... 29
Ver. 1.10 - 5 -
OPOS Driver
1. Development environment
1-1 Communication Configuration
• Communication Configuration for serial interface.
Ver. 1.10 - 6 -
OPOS Driver
2. Properties / Methods
2-1 Printer Type
• Property value will be determined by the printer type, as shown in the below table.
(Some property values related to Receipt may be different depending on printer model.)
SLP-TX220, SLP-TX223,
SLP-TX400, SLP-TX403,
SLP-TX420, SLP-TX423,
Thermal transfer printer list
XT5-40, XT5-43, XT5-46
XD3-40t, XD5-40t, XD5-43t
XT3-40, XT3-43
SLP-DX220, SLP-DX223,
SLP-DX420, SLP-DX423,
SLP-DL410, SLP-DL413,
SPP-L3000,
Direct thermal printer list SRP-770III, SRP-E770III
SPP-L310, SPP-L410
XD3-40d, XD5-40d, XD5-43d
XL5-40CT, XL5-43CT
XM7-40, XM7-20, SRP-S3000_LABEL
Ver. 1.10 - 7 -
OPOS Driver
2-2 Properties Range / Default Value
Ver. 1.10 - 8 -
OPOS Driver
2-2-2 Properties default value / range
1) List Properties
Property Label Printer
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,1
FontTypefaceList
8,19,20,21,22
RecBitmapRotationList 0,L90,R90,180
RecBarCodeRotationList 0,L90,R90,180
437,850,852,860,863,865,1252,8651252
(Combined),857,737,1250,1253,1254,855,
CharactersetList
862,866,1251,1255,928,864,775,1257,858,
949,932,950,936
Ver. 1.10 - 9 -
OPOS Driver
2-2-3 Description of Main Properties
1) DeviceEnabled
• Description: Indicates whether to use the printer. You should set this value to TRUE
to use the printer after calling the Open, ClaimDevice method.
• Related method: void SetDeviceEnabled(BOOL)
2) AsyncMode
• Description: When it is set to TRUE, the print-related method operates in
asynchronous mode.
If set to FALSE, the print-related method operates in synchronous mode.
In asynchronous mode, you can check the completion of printing with
OutputCompleteEvent.
• Related method : void SetAsyncMode(BOOL)
3) CharacterSetList
• Description: Gets a list of the character sets supported by the printer.
• Related method: CString GetCharacterSetList()
4) CharacterSet
• Description: The character set to use when printing the printer.
You can set any of the values in the CharacterSetList list.
Set after setting DeviceEnabled to TRUE.
• Related method: void SetCharacterSet(long)
• Examples
posPrinter.SetCharacterSet(932); // Shift-JIS – Set to Japanese
5) RecLineCharsList
• Description: Gets a list of the number of characters that can be printed on one line.
• Related method : CString GetRecLineCharsList()
Ver. 1.10 - 10 -
OPOS Driver
6) RecLineChars
• Description: The number of characters printed on one line
If the value is less than or equal to the preceding value in the list of
RecLineCharsList, it is set to A Font(12x24), and if it is greater than the
preceding value, it is set to B Font (9x17).
You should set after setting DeviceEnabled to TRUE.
• Related method: void SetRecLineChars(long)
• Examples
//Gets a list of the number of characters that can be printed on one line.
CString strRecLineCharsList = posPrinter.GetRecLineCharsList();
7) RecLineSpacing
• Description: You can set the interval between line and line.
This value can change depending on the MapMode or the selected font.
• Related method : long GetRecLineSpacing(), long SetRecLineSpacing(int)
Ver. 1.10 - 11 -
OPOS Driver
2-2-4 Methods
Method Value
beginInsertion X
beginRemoval X
changePrintSide X
clearPrintArea O
cutPaper O
drawRuledLine X
endInsertion X
endRemoval X
markFeed O
pageModePrint O
printBarCode O
printBitmap O
printImmediate O
printMemoryBitmap O
printNormal O
printTwoNormal X
rotatePrint O
setBitmap O
setLogo O
transactionPrint O
validateData O
O: Supported X: Not supported
Ver. 1.10 - 12 -
OPOS Driver
2-2-5 Description of Main Methods
1) cutPaper
• Description: In the model provided with Auto Cutter, this function cuts the paper.
• Method prototype : void CutPaper(int percentage)
• Example
posPrinter.CutPaper(90); //Cut the paper
2) printBarcode
• Description: Prints the barcode
• Method prototype : long PrintBarCode(long station, LPCTSTR data, long symbology,
long height, long width, long alignment, long textPostition)
• parameter information
- long station: The type of printer. Set to PTR_S_RECEIPT
- LPCTSTR data: Sets the data of the barcode to be printed
- long symbology: Specifies the type of barcode (See OPOS constant value)
- long height: Specifies the height of the barcode
- long width: Specifies the width of the barcode
- long alignment: Specifies the alignment position of the bar code
(See OPOS constant value)
- long textPosition: Specifies the position of the Human Readable Interpretation (HRI).
(See OPOS constant value)
• Example
//Print a 100 x 100 QR Code in the center of the paper
posPrinter.PrintBarCode(PTR_S_RECEIPT, "www.bixolon.com",
PTR_BCS_QRCODE, 100, 100, PTR_BC_CENTER, PTR_BC_TEXT_NONE);
3) printNormal
• Description: Prints the text. The Escape Sequence string is also available
• Method prototype : long PrintNormal(long station, LPCTSTR data)
• parameter information
- long station: The type of printer. Set to PTR_S_RECEIPT.
- LPCTSTR data: Sets the text to be printed
• Example
//Print Test Text print
CString CRLF = "\r\n";
posPrinter.PrintNormal(PTR_S_RECEIPT, “Print test” + CRLF);
Ver. 1.10 - 13 -
OPOS Driver
4) transactionPrint
• Description: Starts or ends transaction mode.
A series of actions consisting of transactions are performed as if they were a
single action.
• Method prototype: long TransactionPrint(long station, long control)
• parameter information
- long station: The type of printer. Set to PTR_S_RECEIPT
- long control: Sets the start and end of transaction mode (See OPOS constant value)
• Examples
//Transaction mode start
posPrinter.TransactionPrint(PTR_S_RECEIPT, PTR_TP_TRANSACTION);
// Stack text print, image print, paper cutting actions in transaction buffer
posPrinter.PrintNormal(PTR_S_RECEIPT, "Transaction test" + CRLF);
posPrinter.PrintBitmap(PTR_S_RECEIPT, (LPCTSTR)("Logo.bmp"),
PTR_BM_ASIS, PTR_BM_CENTER);
posPrinter.CutPaper(90);
5) printBitmap
• Description: Prints the image
• Method prototype : long PrintBitmap(long station, LPCTSTR fileName, long width,
long alignment)
• parameter information
- long station: The type of printer. Set to PTR_S_RECEIPT
- LPCTSTR fileName: Specifies the path to the image file to be printed
- long width: Specifies the width of the image to be printed
- long alignment: Specifies the alignment position of the image (See OPOS constant
value)
• Example
// Print the image of Logo.bmp file in the center of the paper
//PTR_BM_ASIS: Print the image at the given size
posPrinter.PrintBitmap(PTR_S_RECEIPT, (LPCTSTR)("Logo.bmp"),
PTR_BM_ASIS, PTR_BM_CENTER);
Ver. 1.10 - 14 -
OPOS Driver
6) printMemoryBitmap
• Description: Prints images stored in memory
• Method prototype : long PrintMemoryBitmap(long station, LPCTSTR data, long type,
Long width, long alignment)
• parameter information
- long station: The type of printer. Set to PTR_S_RECEIPT
- LPCTSTR data: Specifies the byte array where image information is stored.
BinaryConversion must be used
- long type: Specifies the format of the image stored in memory
- long width: Specifies the width of the image to be printed
- long alignment: Specifies the alignment position of the image (See OPOS constant
value)
• Examples
CFile BitmapFile;
BitmapFile.Open("Logo.bmp", CFile::modeRead); //Open Logo.bmp file
CString strBitmapData;
strBitmapData.Empty(); //Initialize the buffer
BitmapFile.Close();
// Print images stored in memory at half the size of paper in the center of the paper
posPrinter.SetBinaryConversion(OPOS_BC_NIBBLE);
posPrinter.PrintMemoryBitmap(PTR_S_RECEIPT, strBitmapData,
PTR_BMT_BMP, posPrinter.GetRecLineWidth() / 2, PTR_BM_CENTER);
posPrinter.SetBinaryConversion(OPOS_BC_NONE);
Ver. 1.10 - 15 -
OPOS Driver
7) setBitmap
• Description: Stores the image information to be printed later
• Method prototype : long SetBitmap(long bitmapNumber, long station,
LPCTSTR fileName, long width, long alignment)
• parameter information
- long bitmapNumber: Assigns a number to the image to be stored
- long station: The type of printer. Set to PTR_S_RECEIPT
- LPCTSTR fileName: Specifies the path to the image to be stored
- long width: Specifies the width of the image
- long alignment : Specifies the alignment position of the image (See OPOS constant
value)
• Examples
CString CRLF = "\r\n";
CString ESC = "\x1b";
Ver. 1.10 - 16 -
OPOS Driver
2-2-6 Escape Sequences
Escape Sequence Setting value Description
O
[#]P Cut the paper
(value range: 0~100)
O
[#]fP Feed and cut the paper
(value range: 0~100)
[#]sP X This function is not supported
sL X This function is not supported
O Print images saved with the setBitmap
[#]B
(value range: 1~20) method
Print the saved logo with the setLogo
tL O
method
Print the saved logo with the setLogo
bL O
method
O Feed the paper by the set value.
[#]lF
(value range: 0~9999) The # value is in line units
Feed the paper by the set value.
[#]uF Base Pitch [inch] O
The # value is in dot units.
[#]rF Maximum [inch] X This function is not supported
Transmit the data as long as the length
#E O
of the # number.
#R O This function is not supported
#dL X This function is not supported
#fT O Select the font
[!]bC O Print in bold font (! for cancellation)
[!][#]uC X Print with underline (! for cancellation)
[!]iC X This function is not supported
[#]rC O Print using custom colors
[!]rvC O Print in reverse style (! for cancellation)
[#]sC X This function is not supported
1C O Print in normal size
2C O Print in double width
3C O Print in double height
4C O Print in double width and height
Prints in the width of the font at #
#hC O
times magnification
Prints in the height of the font at #
#vC O
times magnification
[#]fC X This function is not supported
[!]tbC X This function is not supported
[!]tpC X This function is not supported
cA O Align in the center
rA O Align to the right
Ver. 1.10 - 17 -
OPOS Driver
lA O Align to the left
[!][#]stC X This function is not supported
N O Initialize the status of the printer
O: Supported X: Not supported
Ver. 1.10 - 18 -
OPOS Driver
3. Extended Functions
This section is to explain DirectIO method.
This method will operate properly only with BIXOLON POS printer.
Ver. 1.10 - 19 -
OPOS Driver
3-2-2 International characterset setting
Command PTR _DI_INTERNATIONAL_CHAR
constant value which pre-defined
PRN_DI_CHAR_USA: 0
PRN_DI_CHAR_FRANCE: 1
PRN_DI_CHAR_GERMANY: 2
PRN_DI_CHAR_UK: 3
PRN_DI_CHAR_DENMARK1: 4
Argument pData
PRN_DI_CHAR_SWEDEN: 5
PRN_DI_CHAR_ITALY: 6
PRN_DI_CHAR_SPAIN: 7
PRN_DI_CHAR_JAPAN: 8
PRN_DI_CHAR_NORWAY: 9
PRN_DI_CHAR_DENMARK2: 10
pString Empty string
Sets International characterset.
Certain characters change according to the pData argument value.
Description Refer to International characterset code table and related method.
If CharacterSet property value is changed,
International character set will be reset.
Return Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
OPOS_E_NOTCLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_BUSY 0
OPOS_E_ILLEGAL 0
OPOS_E_OFFLINE 0
OPOS_E_FAILURE 0
3-3 DirectIOEvent
• Not used.
Ver. 1.10 - 20 -
OPOS Driver
4. Error Information
This section is to explain returned error information when use POSPrinter methods.
For more details, please refer to the UPOS specifications.
Ver. 1.10 - 21 -
OPOS Driver
4-1-4 DirectIO method
Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
OPOS_E_NOTCLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_ILLEGAL 0
OPOS_E_OFFLINE 0
DirectIO
OPOS_EPTR_UNRECOVERABLE
OPOS_EPTR_CUTTER
OPOS_E_FAILURE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_OVERHEAT
OPOS_EPTR_COVER_OPEN
OPOS_E_EXTENDED OPOS_EPTR_JRN_EMPTY
OPOS_EPTR_REC_EMPTY
Ver. 1.10 - 22 -
OPOS Driver
4-1-6 PrintImmediate method
Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
OPOS_E_NOTCLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_ILLEGAL 0
OPOS_E_OFFLINE 0
PrintImmediate
OPOS_EPTR_UNRECOVERABLE
OPOS_EPTR_CUTTER
OPOS_E_FAILURE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_OVERHEAT
OPOS_EPTR_COVER_OPEN
OPOS_E_EXTENDED OPOS_EPTR_JRN_EMPTY
OPOS_EPTR_REC_EMPTY
Ver. 1.10 - 23 -
OPOS Driver
4-1-8 RotatePrint method
Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
OPOS_E_NOTCLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_ILLEGAL 0
OPOS_E_OFFLINE 0
RotatePrint
OPOS_EPTR_UNRECOVERABLE
OPOS_EPTR_CUTTER
OPOS_E_FAILURE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_OVERHEAT
OPOS_EPTR_COVER_OPEN
OPOS_E_EXTENDED OPOS_EPTR_JRN_EMPTY
OPOS_EPTR_REC_EMPTY
Ver. 1.10 - 24 -
OPOS Driver
4-1-10 SetBitmap method
Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
OPOS_E_NOTCLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_ILLEGAL 0
OPOS_E_OFFLINE 0
OPOS_EPTR_UNRECOVERABLE
OPOS_EPTR_CUTTER
SetBitmap OPOS_E_FAILURE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_OVERHEAT
OPOS_E_NOEXIST 0
OPOS_EPTR_COVER_OPEN
OPOS_EPTR_JRN_EMPTY
OPOS_EPTR_REC_EMPTY
OPOS_E_EXTENDED
OPOS_EPTR_SLP_EMPTY
OPOS_EPTR_TOOBIG
OPOS_EPTR_BADFORMAT
Ver. 1.10 - 25 -
OPOS Driver
5. Resources
Ver. 1.10 - 26 -
OPOS Driver
5-1-5 TransactionPrint
Code define Description
Initializes the buffer to empty and starts
PTR_TP_TRANSACTION
the transaction mode.
Exit transaction mode and output the
PTR_TP_NORMAL
stacked data in Buffer.
Ver. 1.10 - 27 -
OPOS Driver
5-2-2 International characterset code table
Ver. 1.10 - 28 -
OPOS Driver
5-2-3 Examples of international characterset
// Print à character
posPrinter.PrintNormal(PTR_S_RECEIPT, _T(“\x40”) + CRLF);
// Print § character
posPrinter.PrintNormal(PTR_S_RECEIPT, _T(“\x40”) + CRLF);
// Print @ character
posPrinter.PrintNormal(PTR_S_RECEIPT, _T(“\x40”) + CRLF);
Ver. 1.10 - 29 -
OPOS Driver
Revision history
Ver. 1.10 - 30 -