0% found this document useful (0 votes)
139 views

Manual OPOS Driver LabelPrinter English V1.10

Manual_OPOS_Driver_LabelPrinter_english_V1.10

Uploaded by

Harry Agront
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

Manual OPOS Driver LabelPrinter English V1.10

Manual_OPOS_Driver_LabelPrinter_english_V1.10

Uploaded by

Harry Agront
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Application Programming Guide

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.

• The BIXOLON logo is the registered trademark of BIXOLON Co., Ltd.


• All other brand or product names are trademarks of their respective companies or
organizations.

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.

Throughout this manual, “OLE for Retail POS” is called “OPOS”.


Throughout this manual, “Unified for Retail POS” is called “UPOS”.

[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

1. Development environment ......................................................................................... 6


1-1 Communication Configuration ........................................................................................6
2. Properties / Methods ................................................................................................... 7
2-1 Printer Type ........................................................................................................................7
2-2 Properties Range / Default Value ....................................................................................8
2-2-1 Capability properties setting value .....................................................................8
2-2-2 Properties default value / range .........................................................................9
2-2-3 Description of Main Properties ......................................................................... 10
2-2-4 Methods .............................................................................................................. 12
2-2-5 Description of Main Methods ........................................................................... 13
2-2-6 Escape Sequences .............................................................................................. 17
3. Extended Functions .................................................................................................... 19
3-1 DirectIO Method ............................................................................................................. 19
3-1-1 BIXOLON OPOS DirectIO Commands Description ......................................... 19
3-2 DirectIO Command......................................................................................................... 19
3-2-1 Direct Output ...................................................................................................... 19
3-2-2 International characterset setting ................................................................... 20
3-3 DirectIOEvent .................................................................................................................. 20
4. Error Information ....................................................................................................... 21
4-1 ResultCode List................................................................................................................ 21
4-1-1 ClaimDevice method .......................................................................................... 21
4-1-2 CheckHealth method ......................................................................................... 21
4-1-3 ClearOutput method .......................................................................................... 21
4-1-4 DirectIO method ................................................................................................ 22
4-1-5 PrintNormal method.......................................................................................... 22
4-1-6 PrintImmediate method .................................................................................... 23
4-1-7 CutPaper method ............................................................................................... 23
4-1-8 RotatePrint method ........................................................................................... 24
4-1-9 PrintBitmap method .......................................................................................... 24
4-1-10 SetBitmap method ........................................................................................... 25
4-1-11 SetLogo method ............................................................................................... 25
4-1-12 TransactionPrint method ................................................................................ 25
5. Resources .................................................................................................................... 26
5-1 OPOS Value (defines) ..................................................................................................... 26
5-1-1 Barcode type ....................................................................................................... 26
5-1-2 Barcode alignment............................................................................................. 26
5-1-3 Barcode HRI alignment ..................................................................................... 26
5-1-4 Image alignment ................................................................................................ 26
5-1-5 TransactionPrint ................................................................................................. 27

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.

• You will set communication configuration in BIXOLON OPOS Setup Utility.


Printer
Printer Model Baud Rate etc
Type
SLP-TX220, SLP-TX400,
Thermal 203
SLP-TX420, XT5-40, XD3-40t 9600/19200/38400/57600/115200
Transfer dpi
XD5-40t, XT3-40
SLP-TX223, SLP-TX403,
Thermal 300
SLP-TX423, XT5-43, XD5-43t 9600/19200/38400/57600/115200
Transfer dpi
XT3-43
Thermal 600
XT5-46 9600/19200/38400/57600/115200
Transfer dpi
SLP-DX220, SLP-DX420,
SLP-DL410,
Direct 203
SRP-770III, SRP-E770III 9600/19200/38400/57600/115200
Thermal dpi
XD3-40d, XD5-40d, XL5-40CT
SRP-S3000_LABEL
SLP-DX223,
Direct 300
SLP-DX423, SLP-DL413 9600/19200/38400/57600/115200
Thermal dpi
XD5-43d, XL5-43CT
SPP-L310, SPP-L410 Direct 203
9600/19200/38400/57600/115200
XM7-40, XM7-20 Thermal dpi

• Check the default communication setting.


For more details refer to the user manual included in the printer
package.
• A printer which does not support Serial Interface is not indicated.

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

2-2-1 Capability properties setting value


Capability Property Label Printer
CapCompareFirmwareVersion FALSE
CapPowerReporting TRUE
CapStatisticsReporting FALSE
CapUpdateFirmware FALSE
CapUpdateStatistics FALSE
CapTransaction TRUE
CapCoverSensor TRUE
CapConcurrentRecSlp FALSE
CapConcurrentJrnSlp FALSE
CapConcurrentJrnRec FALSE
CapCharacterSet TRUE
CapRecUnderline FALSE
CapRecPageMode TRUE
CapCuncurrentPageMode FALSE
CapRecStamp FALSE
CapRecRotate180 TRUE
CapRecRight90 TRUE
CapRecPapercut TRUE
CapRecNearEndSensor FALSE
CapRecMarkFeed TRUE
CapRecLeft90 TRUE
CapRecItalic TRUE
CapRecEmptySensor TRUE
CapRecDwideDhigh TRUE
CapRecDwide TRUE
CapRecDhigh TRUE
CapRecColor FALSE
CapRecCartridgeSensor FALSE
CapRecBold TRUE
CapRecBitmap TRUE
CapRecBarCode TRUE
CapRec2Color FALSE
CapRecPresent TRUE

May be capability setting values are different depending on the


printer model.

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

2) Paper width properties


Model Max Width
XM7-20 384
SLP-TX220, SLP-DX220, 432
SLP-TX223, SLP-DX223 672
SLP-TX400, SLP-TX420,
SLP-DX420, SLP-DL410,
864
XD5-40d, XL5-40CT, XD5-40t
XT3-40
SLP-TX403, SLP-TX423
1248
SLP-DX423, SLP-DL413
SRP-770III, SRP-E770III 832
SPP-L3000
SPP-L310 576
SRP-S3000_LABEL
SPP-L410, XM7-40 832
XT5-40, XD3-40d, XD3-40t 832
XT5-43, XD5-43d, XL5-43CT
1248
XD5-43t, XT3-43
XT5-46 2496

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

posPrinter.SetCharacterSet(949); // KSC5601 – Set to Korean

posPrinter.SetCharacterSet(936); // GB2312 – Set of Simplified Chinese

posPrinter.SetCharacterSet(950); // BIG5 – Set to Traditional Chinese

Refer to '5-2-1 Basic Code Page' for information on supported code


pages.

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();

//If RecLineCharsList value is 48,64


posPrinter.SetRecLineChars(48); //Set to A Font

posPrinter.SetRecLineChars(64); //Set to B Font

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)

※ RecLineHeight vs. RecLineSpacing

First line text RecLineHeight


RecLineSpacin

Second line text


ㄱ g

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);

//Transaction mode end. This time, all actions are performed


posPrinter.TransactionPrint(PTR_S_RECEIPT, PTR_TP_NORMAL);

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

// Read 1 byte at a time and apply BinaryConversion


while (BitmapFile.Read(&byBuffer, sizeof(BYTE)) == sizeof(BYTE))
{
strBitmapData += TCHAR(0x30 + ((byBuffer >> 4) & 0x0F));
strBitmapData += TCHAR(0x30 + (byBuffer & 0x0F));
}

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);

Refer to the UPOS 1.14 protocol document for a detailed description of


BinaryConversion.

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";

//Store Logo.bmpfile as no. 1


posPrinter.SetBitmap(1, PTR_S_RECEIPT, (LPCTSTR)("Logo.bmp"),
PTR_BM_ASIS, PTR_BM_CENTER);

// Print the image stored as no.1 using Escape Sequence


posPrinter.PrintNormal(PTR_S_RECEIPT, ESC + "|1B" + CRLF);

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

To know more about Escape Sequence, please refer to


UPOS 1.14.

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.

3-1 DirectIO Method

Argument Explanation Type


Command Pre-define constant Long
Number of output data / Value defined by
pData Long
command
pString Output Data String

3-1-1 BIXOLON OPOS DirectIO Commands Description


Command Constant Description
PTR _DI_OUTPUT 0 Output the pString data
Define the international
PTR _DI_INTERNATIONAL_CHAR 1
characterset
* The constant of Command can be set at inf file of Printer model in BIXOLON OPOS
Driver installation folder.

3-2 DirectIO Command

3-2-1 Direct Output


Command PTR_DI_OUTPUT
Argument pData Null
pString Output data
Sends data without any process after checking printer status.
Description
“pString” is not affected by “BinaryConversion”
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

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.

4-1 ResultCode List

4-1-1 ClaimDevice method


Method Result Code ResultCodeExtended
OPOS_EPTR_UNRECOVERABLE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_CUTTER
ClaimDevice OPOS_E_ILLEGAL
OPOS_EPTR_OVERHEAT
OPOS_EPTR_REC_EMPTY
OPOS_EPTR_JRN_EMPTY

4-1-2 CheckHealth method


Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_ILLEGAL 0
CheckHealth
OPOS_E_OFFLINE 0
OPOS_EPTR_UNRECOVERABLE
OPOS_EPTR_CUTTER
OPOS_E_FAILURE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_OVERHEAT

4-1-3 ClearOutput method


Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
ClearOutput
OPOS_E_CLAIMED 0
OPOS_E_NOTCLAIMED 0

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

4-1-5 PrintNormal 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
PrintNormal
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

4-1-7 CutPaper 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
CutPaper
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

4-1-9 PrintBitmap 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
PrintBitmap 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 - 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

4-1-11 SetLogo method


Method Result Code ResultCodeExtended
OPOS_SUCCESS 0
OPOS_E_CLOSED 0
OPOS_E_CLAIMED 0
SetLogo
OPOS_E_NOTCLAIMED 0
OPOS_E_DISABLED 0
OPOS_E_ILLEGAL 0

4-1-12 TransactionPrint 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
TransactionPrint
OPOS_EPTR_CUTTER
OPOS_E_FAILURE
OPOS_EPTR_MECHANICAL
OPOS_EPTR_OVERHEAT
OPOS_E_NOEXIST 0
OPOS_EPTR_COVER_OPEN
OPOS_EPTR_JRN_EMPTY
OPOS_E_EXTENDED
OPOS_EPTR_REC_EMPTY
OPOS_EPTR_SLP_EMPTY

Ver. 1.10 - 25 -
OPOS Driver
5. Resources

5-1 OPOS Value (defines)

5-1-1 Barcode type


Code define Description
PTR_BCS_UPCA: UPC-A
PTR_BCS_UPCE
PTR_BCS_UPCE: UPC-E
PTR_BCS_JAN8
PTR_BCS_JAN8: JAN 8 (= EAN 8)
PTR_BCS_JAN13
PTR_BCS_JAN13 JAN 13 (= EAN 13)
PTR_BCS_ITF Interleaved 2 of 5
PTR_BCS_Codabar Codabar
PTR_BCS_Code39 Code 39
PTR_BCS_Code93 Code 93
PTR_BCS_Code128 Code 128
PTR_BCS_Code128_Parsed Code 128 with parsing
PTR_BCS_GS1DATABAR GS1 DataBar Omnidirectional
PTR_BCS_GS1DATABAR_E GS1 DataBar Expanded
PTR_BCS_GS1DATABAR_S GS1 DataBar Stacked Omnidirectional
PTR_BCS_GS1DATABAR_E_S GS1 DataBar Expanded Stacked
PTR_BCS_PDF417 PDF 417
PTR_BCS_MAXICODE MAXI Code
PTR_BCS_DATAMATRIX Data Matrix
PTR_BCS_QRCODE QR Code
PTR_BCS_AZTEC Aztec

5-1-2 Barcode alignment


Code define Description
PTR_BC_LEFT Left alignment
PTR_BC_CENTER
PTR_BCS_UPCE: Center정렬alignment
PTR_BC_RIGHT
PTR_BCS_JAN8: Right alignment
정렬
PTR_BCS_JAN13 정렬
5-1-3 Barcode HRI alignment
Code define Description
PTR_BC_TEXT_NONE Do not print HRI
PTR_BC_TEXT_ABOVE
PTR_BCS_UPCE: Print HRI on top of barcode
brrrrrrrrrrrrrrfrrreeeeeechcccreadingcerchracte
PTR_BC_TEXT_BELOW
PTR_BCS_JAN8: Print HRI at the
barcodeove바코드
r문자(HRI)를 bottom
출력하지 상단에 of barcode
육안판독 문자를
않습니다.
PTR_BCS_JAN13 barcode
출력합니다. of력합니다.
5-1-4 Image alignment
Code define Description
PTR_BM_LEFT Left alignment
PTR_BM_CENTER
PTR_BCS_UPCE: Center
좌측alignment
정렬
PTR_BM_RIGHT
PTR_BCS_JAN8: Right alignment
중앙 정렬
PTR_BCS_JAN13 우측 정렬

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.

5-2 Code page

5-2-1 Basic code page


Code page number Description
PC437 U.S.A
PC850 LATIN 1
PC852 LATIN 2
PC860 PORTUGUESE
PC863 CANADIAN FRENCH
PC865 NORDIC
PC1252 WINDOWS LATIN 1
PC865 + PC1252 EUROPEAN COMBINED
PC857 TURKISH
PC737 GREEK
PC1250 WINDOWS LATIN 2
PC1253 GREEK
PC1254 TURKISH
PC855 CYRILLIC
PC862 HEBREW
PC866 CYRILLIC
PC1251 CYRILLIC
PC1255 HEBREW
PC928 GREEK
PC864 Arabic
PC775 Baltic
PC1257 Baltic
PC858 Latin 1 + Euro
PC932 Shift-JIS
PC936 GB2312
PC949 KSC5601
PC950 BIG5

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

CString CRLF = _T("\r\n");


CString cStr = _T(“”);
BSTR pString = cStr.AllocSysString();

//Select French character code


long pData = PRN_DI_CHAR_FRANCE;
posPrinter.DirectIO(PTR_DI_INTERNATIONAL_CHAR, &pData, &pString);

// Print à character
posPrinter.PrintNormal(PTR_S_RECEIPT, _T(“\x40”) + CRLF);

// Select German character code


pData = PRN_DI_CHAR_GERMANY;
posPrinter.DirectIO(PTR_DI_INTERNATIONAL_CHAR, &pData, &pString);

// Print § character
posPrinter.PrintNormal(PTR_S_RECEIPT, _T(“\x40”) + CRLF);

// Select Italian character code


pData = PRN_DI_CHAR_ITALY;
posPrinter.DirectIO(PTR_DI_INTERNATIONAL_CHAR, &pData, &pString);

// Print @ character
posPrinter.PrintNormal(PTR_S_RECEIPT, _T(“\x40”) + CRLF);

Ver. 1.10 - 29 -
OPOS Driver
Revision history

Rev. Date Description


1.00 2018-03-09 New
Changing of the label printer model name and adding of
1.01 2018-05-25
contents
1.02 2019-01-10 Add model SPP-L310, SPP-L410
1.03 2019-03-05 Add model XD3-40d
Add model XD3-40t, XD5-40d, XD5-43d,
1.04 2019-06-21
XL5-40, XL5-43
1.05 2019-10-24 Changing of the label printer model name
1.06 2019-11-21 Add model XD5-40t, XD5-43t, XM7-40
1.07 2020-03-10 Add model XM7-20
1. Add model SRP-S3000
1.08 2020-09-16
2. Typo correction
1.09 2021-02-26 Change the font in the manual
1.10 2021-08-26 Add model XT3-40, XT3-43

Ver. 1.10 - 30 -

You might also like