[go: up one dir, main page]

0% found this document useful (0 votes)
83 views31 pages

LK-TXX API Guide - English

This document provides documentation on functions for controlling a receipt printer SDK. It describes functions for opening and closing the printer port, starting and stopping prints, and printing bitmaps, text, barcodes, and normal data to the receipt printer. Each printing function describes its parameters and return values.

Uploaded by

sergii.reut
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)
83 views31 pages

LK-TXX API Guide - English

This document provides documentation on functions for controlling a receipt printer SDK. It describes functions for opening and closing the printer port, starting and stopping prints, and printing bitmaps, text, barcodes, and normal data to the receipt printer. Each printing function describes its parameters and return values.

Uploaded by

sergii.reut
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/ 31

LK-Txx

Windows ADK Manual

LK-Txx and LK-Txxx and TL, TE


Receipt Printer

1. Method
This is function for DLL(Module)

long OpenPort(
LPCTSTR szPortName,
long BaudRate
);
This function will be applied to open Port.

[Parameters]
szPortName :
[in] transmits the Name of the Port
BaudRate :
[in] transmits the information of the Port.
please refer to the sample programs.

[Return Values]
LK_SUCCESS : returns after the function success
LK_CREATE_ERROR : failure to create communication target
LK_UNKNOWN_PRINTER : returns when unknown printer has been connected.

SEWOO 1 29/06/2023
LK-Txx

long ClosePort()
This function will be applied to close the Port.

[Parameters]
None.

[Return Values]
LK_SUCCESS : returns after function success
LK_NOT_OPENED : the communication port is closed

long PrintStart()
This function is used to notify ADK about starting print.

[Parameters]
None.

[Return Values]
LK_SUCCESS : returns after function success

long PrintStop()
This function is used to notify ADK after finishing print.

[Parameters]
None.

[Return Values]
LK_SUCCESS : returns after function success

SEWOO 2 29/06/2023
LK-Txx

long PrintBitmap(
LPCTSTR BitmapName,
long Alignment,
long Options,
long Brightness,
long ImageMode
);
The function is used to print with bitmap file.

[Parameters]
BitmapName:
[in] This value is a bitmap filename.
It sets the path of the bitmap file for printing.

Alignment:
[in] This value is alignment. It sets image alignment.
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment

Options:
[in] This value is image option. It sets the value for option of image.
Variable Description
LK_BITMAP_NORMAL Original : printing of Image.
LK_BITMAP_WIDTH_DOUBLE width magnification two times.
LK_BITMAP_HEIGHT_DOUBLE height magnification two times.
LK_BITMAP_WIDTH_HEIGHT_DOUBLE width and height magnification two
times.

Brightness:
[in] This value is brightness of image.
It sets the value for brightness of printing image
[Range] : 0 ~ 10

ImageMode :
[in] This value is HalfTone Method.
It sets the value for HalfTone of printing image

SEWOO 3 29/06/2023
LK-Txx

Variable Description
LK_BITMAP_NO_DITHER Process image as B/W Level
LK_BITMAP_ERROR_DIFFUSION Process image as Error Diffusion Level

[Return Values]
LK_SUCCESS : returns after function success.

long PrintText(
LPCTSTR Data,
long Alignment,
long Options,
long TextSize
);
The function is used to print text font.

[Parameters]
Data:
[in] This value is alignment. It sets the value for text printing
Alignment:
[in] This value is alignment. It sets text alignment.
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment
Options:
[in] This value is text options. It sets the value for Options of text printing.
Variable Description
LK_FNT_DEFAULT FontA, Set up as a standard
LK_FNT_FONTB Set up as FontB
LK_FNT_BOLD Set up as Bold attribute
LK_FNT_UNDERLINE Set up as Underline attribute

TextSize:
[in] This value is size of text. It sets the value for the size of text
Variable (Set up width ratio) Description
LK_TXT_1WIDTH Set up width ratio as x1
LK_TXT_2WIDTH Set up width ratio as x2
LK_TXT_3WIDTH Set up width ratio as x3
LK_TXT_4WIDTH Set up width ratio as x4
LK_TXT_5WIDTH Set up width ratio as x5
LK_TXT_6WIDTH Set up width ratio as x6

SEWOO 4 29/06/2023
LK-Txx

LK_TXT_7WIDTH Set up width ratio as x7


LK_TXT_8WIDTH Set up width ratio as x8
Variable (Set up height ratio) Description
LK_TXT_1HEIGHT Set up height ratio as x1
LK_TXT_2HEIGHT Set up height ratio as x2
LK_TXT_3HEIGHT Set up height ratio as x3
LK_TXT_4HEIGHT Set up height ratio as x4
LK_TXT_5HEIGHT Set up height ratio as x5
LK_TXT_6HEIGHT Set up height ratio as x6
LK_TXT_7HEIGHT Set up height ratio as x7
LK_TXT_8HEIGHT Set up height ratio as x8

[Return Values]
LK_SUCCESS : returns after function success

long PrintString(
LPCTSTR Data
);
The function is used to print text without any transformation.

[Parameters]
Data:
[in] This value is NULL-terminated Unicode string.
It sets text the string for text printing.

[Return Values]
LK_SUCCESS : returns after function success.

long PrintNormal(
LPCTSTR Data
);
This function is to use the function which is provided by OLE POS Specification.
For command list, please refer to the Page-26 ~ Page-27.

[Parameters]
Data:
[in] This value is text data. It sets the data for text printing.

SEWOO 5 29/06/2023
LK-Txx

[Return Values]
LK_SUCCESS : returns after function success.

long PrintBarCode(
LPCTSTR Data,
long Symbology,
long Height,
long Width,
long Alignment,
long TextPosition
);
This is function to print barcode.

[Parameters]
Data:
[in] This value is barcode data. It sets the data for the barcode data
Symbology:
[in] This value is type of barcode. It sets the value for the type of barcode
Variable Description
LK_BCS_UPCA Print UPC A BarCode
LK_BCS_UPCE Print UPC E BarCode
LK_BCS_EAN8 Print EAN-8 BarCode
LK_BCS_EAN13 Print EAN-13 BarCode
LK_BCS_JAN8 Print JAN-8 BarCode
LK_BCS_JAN13 Print JAN-13 BarCode
LK_BCS_ITF Print Interleaved 2 of 5
LK_BCS_Codabar Print Codabar BarCode
LK_BCS_Code39 Print Code 3 of 9 BarCode
LK_BCS_Code93 Print Code 93 BarCode
LK_BCS_Code128 Print Code 128 BarCode
LK_BCS_3OF5 Print 3 out of 5(KorMail) BarCode
Height:
[in] This value is barcode height.
It sets the value for barcode height (Default : Dot)
Width:
[in] This value is barcode width.
It sets the value for barcode width (Default : Dot)

SEWOO 6 29/06/2023
LK-Txx

Alignment:
[in] This value is barcode alignment. It sets the value for barcode alignment
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment
TextPosition :
[in] This value is printing position of HRI.
It sets the printing position of Human Readable font for barcode HRI.
Variable Description
LK_HRI_TEXT_NONE Do not print barcode data
LK_HRI_TEXT_ABOVE Print barcode data above the barcode
LK_HRI_TEXT_BELOW Print barcode data below the barcode

[Return Values]
LK_SUCCESS : returns after function success

long SetPageMode(
BOOL IsPageMode
)
The function is used to enter or exit in page mode.

[Parameters]
IsPageMode
[in] When entering the page mode, set TRUE, and set FALSE to convert from
page mode to line mode.

long PrinterSts()
The function is used to read the printer status value.

[Parameters]
None.

[Return Values]
Variable Description
LK_STS_NORMAL Success
LK_STS_COVEROPEN Cover Open ERROR

SEWOO 7 29/06/2023
LK-Txx

LK_STS_PAPEREMPTY Paper Empty ERROR


LK_STS_POWEROFF Power OFF ERROR
LK_STS_PAPERNEAREMPTY Paper Near Empty Warning

long CutPaper()
Cut Paper Method.

[Parameters]
None.
[Return Values]
LK_SUCCESS : returns after function success

long OpenDrawer(
long DrawerPinNum,
long PulseOnTime,
long PulseOffTime,
)
Cash Drawer Open Method.
[Parameters]
DrawerPinNum:
[in] This value is Drawer Pin Connector number.
It sets the value for Drawer Pin Connector.
Variable Description
LK_CD_PIN_TWO Drawer kick-out connector pin 2.
LK_CD_PIN_FIVE Drawer kick-out connector pin 5.
PulseOnTime:
[in] Pulse High Time. (Default : milliseconds)
PulseOffTime:
[in] Pulse Low Time.(Default : milliseconds)
[Return Values]
LK_SUCCESS : returns after function success

long DrawerSts()
the function is used to read the status value for cash Drawer
[Parameters]
None

SEWOO 8 29/06/2023
LK-Txx

[Return Values]
LK_SUCCESS : returns after function success ( Cash Drawer Close Status)
LK_CASHDRAWER_OPEN : Cash Drawer Open Status.

long PrintData(
unsigned char * Data,
int Size;
);
The function is used to print control command include NULL-character.

[Parameters]
Data:
[in] This value is text data with NULL character.
It sets the control command for text printing.
Size:
[in] This value is size of data.
It sets the size of data to print control command.

[Return Values]
LK_SUCCESS : returns after function success.

long PrintText2Image (
LPCTSTR FontName,
long FontStyle,
long FontDotSize,
LPCTSTR TextData,
long ReversePrint
)
This function is used to supporting True-Type font printing.

[Parameters]
FontName:
[in] It sets the True-Type Font name.
FontStyle:

SEWOO 9 29/06/2023
LK-Txx

[in] It sets the True-Type Font characteristics.


Variable Description
LK_TTF_THIN Weight of True-Type Font is THIN.
LK_TTF_NORMAL Weight of True-Type Font is NORMAL.
LK_TTF_BOLD Weight of True-Type Font is BOLD.
LK_TTF_ITALIC Style of True-Type Font is italic.
LK_TTF_UNDERLINE Style of True-Type Font is underline.
FontDotSize:
[in] It sets the True-Type Font size.(Dot Size).
TextData:
[in] Pointer to a null-terminated Unicode string. It sets Unicode text to print.
ReversePrint:
[in] It sets the value of reverse printing.
Variable Description
LK_TTF_REVERSE_NO Not Reverse Printing.
LK_TTF_REVERSE_YES Reverse Printing.

[Return Values]
LK_SUCCESS : returns after function success..

long PrintText2ImageAlignment (
LPCTSTR FontName,
long FontStyle,
long FontDotSize,
LPCTSTR TextData,
long ReversePrint,
long Alignment
)
This function is used to supporting True-Type font printing with alignment.

[Parameters]
FontName:
[in] It sets the True-Type Font name.
FontStyle:
[in] It sets the True-Type Font characteristics.
Variable Description
LK_TTF_THIN Weight of True-Type Font is THIN.
LK_TTF_NORMAL Weight of True-Type Font is NORMAL.

SEWOO 10 29/06/2023
LK-Txx

LK_TTF_BOLD Weight of True-Type Font is BOLD.


LK_TTF_ITALIC Style of True-Type Font is italic.
LK_TTF_UNDERLINE Style of True-Type Font is underline.
FontDotSize:
[in] It sets the True-Type Font size.(Dot Size).
TextData:
[in] Pointer to a null-terminated Unicode string. It sets Unicode text to print.
ReversePrint:
[in] It sets the value of reverse printing.
Variable Description
LK_TTF_REVERSE_NO Not Reverse Printing.
LK_TTF_REVERSE_YES Reverse Printing.
Alignment:
[in] This value is TTF printing alignment.
It sets the value for TTF printing alignment
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment

[Return Values]
LK_SUCCESS : returns after function success..

long OutputCompletePrinting (
long TimeDelay,
)
The function is used to check printing result.

[Parameters]
TimeDelay:
[in] Wait time to receive the printing result. (Default : milliseconds)

[Return Values]
Variable Description
LK_STS_NORMAL Success
LK_STS_COVEROPEN Cover Open ERROR
LK_STS_PAPEREMPTY Paper Empty ERROR
LK_TIMEOUT Time Out

SEWOO 11 29/06/2023
LK-Txx

long PrintQRCode (
unsigned char * Data,
long Size,
long ModuleSize,
long ECLevel,
long Alignment
)
The function is used to print QRCode using command.

[Parameters]
Data:
[in] This value is the data for QRCode with NULL character.
It sets the data for QRCode printing.
Size:
[in] This value is size of data.
It sets the size of data to print QRCode.
ModuleSize:
[in] This value is module size.
It sets the size of module to print QRCode.
[Range] : 1 ~ 20
ECLevel:
[in] This value is Error Correction Level.
It sets the Error Correction Level to print QRCode.
[Range] : 0 ~ 3
[Default] : 0
Variable Description
LK_QRCODE_EC_LEVEL_L Error Correction Level L(7%)
LK_QRCODE_EC_LEVEL_M Error Correction Level M(15%)
LK_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%)
LK_QRCODE_EC_LEVEL_H Error Correction Level H(30%)

Alignment:
[in] This value is QRCode alignment.
It sets the value for QRCode alignment
Variable Description
LK_ALIGNMENT_LEFT Left alignment

SEWOO 12 29/06/2023
LK-Txx

LK_ALIGNMENT_CENTER Center alignment


LK_ALIGNMENT_RIGHT Right alignment

[Return Values]
LK_SUCCESS : returns after function success..

long MakeQRCodeBitmap (
unsigned char * Data,
long Size,
long ModuleSize,
long ECLevel,
long Version,
long MaskPattern,
LPCTSTR BitmapName
)
The function is used to save QRCode using QR Generator.

[Parameters]
Data:
[in] This value is the data for QRCode with NULL character.
It sets the data for QRCode printing.
Size:
[in] This value is size of data.
It sets the size of data to print QRCode.
ModuleSize:
[in] This value is module size.
It sets the size of module to print QRCode.
[Range] : 1 ~ 20
ECLevel:
[in] This value is Error Correction Level.
It sets the Error Correction Level to print QRCode.
[Range] : 0 ~ 3
[Default] : 0
Variable Description
LK_QRCODE_EC_LEVEL_L Error Correction Level L(7%)
LK_QRCODE_EC_LEVEL_M Error Correction Level M(15%)
LK_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%)
LK_QRCODE_EC_LEVEL_H Error Correction Level H(30%)

SEWOO 13 29/06/2023
LK-Txx

Version:
[in] This value is version of symbol.
It sets the value of version to print QRCode.
[Range] : 1 ~ 40
Variable Description
LK_QRCODE_VERSION_00 Auto
LK_QRCODE_VERSION_01 Symbol Version 1
LK_QRCODE_VERSION_02 Symbol Version 2
LK_QRCODE_VERSION_03 Symbol Version 3

LK_QRCODE_VERSION_39 Symbol Version 39
LK_QRCODE_VERSION_40 Symbol Version 40
MaskPattern:
[in] This value is mask pattern.
It sets the value of mask pattern to print QRCode.

Variable Description
LK_QRCODE_MASK_AUTO Auto
LK_QRCODE_MASK_0 Mask Pattern 0
LK_QRCODE_MASK_1 Mask Pattern 1
LK_QRCODE_MASK_2 Mask Pattern 2

LK_QRCODE_MASK_6 Mask Pattern 6
LK_QRCODE_MASK_7 Mask Pattern 7
Alignment:
[in] This value is QRCode alignment.
It sets the value for QRCode alignment
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment
BitmapName:
[in] This value is bitmap filename to save.
It sets the path of bitmap filename to save QRCode image.

[Return Values]
LK_SUCCESS : returns after function success..

long PrintQRCodeGenerator (
unsigned char * Data,
long Size,

SEWOO 14 29/06/2023
LK-Txx

long ModuleSize,
long ECLevel,
long Version,
long MaskPattern,
)
The function is used to print QRCode using QR Generator.

[Parameters]
Data:
[in] This value is the data for QRCode with NULL character.
It sets the data for QRCode printing.
Size:
[in] This value is size of data.
It sets the size of data to print QRCode.
ModuleSize:
[in] This value is module size.
It sets the size of module to print QRCode.
[Range] : 1 ~ 20
ECLevel:
[in] This value is Error Correction Level.
It sets the Error Correction Level to print QRCode.
[Range] : 0 ~ 3
[Default] : 0
Variable Description
LK_QRCODE_EC_LEVEL_L Error Correction Level L(7%)
LK_QRCODE_EC_LEVEL_M Error Correction Level M(15%)
LK_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%)
LK_QRCODE_EC_LEVEL_H Error Correction Level H(30%)
Version:
[in] This value is version of symbol.
It sets the value of version to print QRCode.
[Range] : 1 ~ 40
Variable Description
LK_QRCODE_VERSION_00 Auto
LK_QRCODE_VERSION_01 Symbol Version 1
LK_QRCODE_VERSION_02 Symbol Version 2
LK_QRCODE_VERSION_03 Symbol Version 3

LK_QRCODE_VERSION_39 Symbol Version 39

SEWOO 15 29/06/2023
LK-Txx

LK_QRCODE_VERSION_40 Symbol Version 40


MaskPattern:
[in] This value is mask pattern.
It sets the value of mask pattern to print QRCode.

Variable Description
LK_QRCODE_MASK_AUTO Auto
LK_QRCODE_MASK_0 Mask Pattern 0
LK_QRCODE_MASK_1 Mask Pattern 1
LK_QRCODE_MASK_2 Mask Pattern 2

LK_QRCODE_MASK_6 Mask Pattern 6
LK_QRCODE_MASK_7 Mask Pattern 7

[Return Values]
LK_SUCCESS : returns after function success..

long PrintQRCodeFromFile (
LPCTSTR File4QR,
long ModuleSize,
long ECLevel,
long Version,
long MaskPattern,
long Alignment
)
The function is used to print QRCode from file using QR Generator.

[Parameters]
File4QR:
[in] This value is the data for QRCode with NULL character.
It sets the data for QRCode printing.
ModuleSize:
[in] This value is module size.
It sets the size of module to print QRCode.
[Range] : 1 ~ 20
ECLevel:
[in] This value is Error Correction Level.
It sets the Error Correction Level to print QRCode.

SEWOO 16 29/06/2023
LK-Txx

[Range] : 0 ~ 3
[Default] : 0
Variable Description
LK_QRCODE_EC_LEVEL_L Error Correction Level L(7%)
LK_QRCODE_EC_LEVEL_M Error Correction Level M(15%)
LK_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%)
LK_QRCODE_EC_LEVEL_H Error Correction Level H(30%)
Version:
[in] This value is version of symbol.
It sets the value of version to print QRCode.
[Range] : 1 ~ 40
Variable Description
LK_QRCODE_VERSION_00 Auto
LK_QRCODE_VERSION_01 Symbol Version 1
LK_QRCODE_VERSION_02 Symbol Version 2
LK_QRCODE_VERSION_03 Symbol Version 3

LK_QRCODE_VERSION_39 Symbol Version 39
LK_QRCODE_VERSION_40 Symbol Version 40
MaskPattern:
[in] This value is mask pattern.
It sets the value of mask pattern to print QRCode.

Variable Description
LK_QRCODE_MASK_AUTO Auto
LK_QRCODE_MASK_0 Mask Pattern 0
LK_QRCODE_MASK_1 Mask Pattern 1
LK_QRCODE_MASK_2 Mask Pattern 2

LK_QRCODE_MASK_6 Mask Pattern 6
LK_QRCODE_MASK_7 Mask Pattern 7
Alignment:
[in] transmits the value for QRCode alignment
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment

[Return Values]
LK_SUCCESS : returns after function success..

long PrintPDF417 (

SEWOO 17 29/06/2023
LK-Txx

LPCTSTR PdfData,
long DataLength,
long NumberOfColumns,
long CellWidth,
long Alignment
)
The function is used to print PDF417 using command.

[Parameters]
PdfData:
[in] This value is the data for PDF417 with NULL character.
It sets the data for PDF417 printing.
DataLength:
[in] This value is size of data.
It sets the size of data to print PDF417.
NumberOfColumns:
[in] This value is Column counter.
It sets the size of Column to print PDF417.
[Range] : 3 ~ 13
CellWidth:
[in] This value is size of CellWidth.
It sets the size of Cell to print PDF417.
[Range] : 2 ~ 5
Cell width = 2 Number of columns ( 3 ~ 13 )
Cell width = 3 Number of columns ( 3 ~8)
Cell width = 4 Number of columns ( 3 ~5)
Cell width = 5 Number of columns ( 3 )
Alignment:
[in] This value is PDF417alignment.
It sets the value for PDF417alignment
Variable Description
LK_ALIGNMENT_LEFT Left alignment
LK_ALIGNMENT_CENTER Center alignment
LK_ALIGNMENT_RIGHT Right alignment

[Return Values]
LK_SUCCESS : returns after function success..

SEWOO 18 29/06/2023
LK-Txx

long SetMasterUnit ( long UnitMeasure )


The function is used to setup the unit measure.

[Parameters]
UnitMeasurea:
[in] This value is the data for Unit of length.
Variable Description
0 Dot
1 Millimeter
2 Centimeter
3 Inch

[Return Values]
LK_SUCCESS : returns after function success..

long PrintingWidth ( long pwidth)


The function is used to setup the width of printing.

[Parameters]
pwidth:
[in] This value is the width of printing.

[Return Values]
LK_SUCCESS : returns after function success..

long SetLabelSize (long widthsize, long heightsize)


The function is used to setup the printing area.

[Parameters]
widthsize:
[in] This value is the width size of printing area.
heightsize:
[in] This value is the height size of printing area.

[Return Values]
LK_SUCCESS : returns after function success..

SEWOO 19 29/06/2023
LK-Txx

long PrintLabel ()
The function is used to print the buffer in printing aread.

[Parameters]
None

[Return Values]
LK_SUCCESS : returns after function success..

long PrintTTFXY (
long BaseUnitX,
long BaseUnitY,
LPCTSTR FontName,
long FontStyle,
long FontDotSize,
LPCTSTR TextData,
long ReversePrint
)
This function is used to supporting True-Type font printing.

[Parameters]
BaseUnitX:
[in] It sets the x-coordinates for printing the True-Type Font.
BaseUnitY:
[in] It sets the y-coordinates for printing the True-Type Font.
FontName:
[in] It sets the True-Type Font name.
FontStyle:
[in] It sets the True-Type Font characteristics.
Variable Description
LK_TTF_THIN Weight of True-Type Font is THIN.
LK_TTF_NORMAL Weight of True-Type Font is NORMAL.
LK_TTF_BOLD Weight of True-Type Font is BOLD.
LK_TTF_ITALIC Style of True-Type Font is italic.
LK_TTF_UNDERLINE Style of True-Type Font is underline.
FontDotSize:
[in] It sets the True-Type Font size.(Dot Size).
TextData:

SEWOO 20 29/06/2023
LK-Txx

[in] Pointer to a null-terminated Unicode string. It sets Unicode text to print.


ReversePrint:
[in] It sets the value of reverse printing.
Variable Description
LK_TTF_REVERSE_NO Not Reverse Printing.
LK_TTF_REVERSE_YES Reverse Printing.

[Return Values]
LK_SUCCESS : returns after function success..

long PrintTTFAlign (
long Alignment,
long BaseUnitY,
LPCTSTR FontName,
long FontStyle,
long FontDotSize,
LPCTSTR TextData,
long ReversePrint
)
This function is used to supporting True-Type font printing according to
alignment.

[Parameters]
Alignment:
[in] It sets justification for printing the True-Type Font.
BaseUnitY:
[in] It sets the y-coordinates for printing the True-Type Font.
FontName:
[in] It sets the True-Type Font name.
FontStyle:
[in] It sets the True-Type Font characteristics.
Variable Description
LK_TTF_THIN Weight of True-Type Font is THIN.
LK_TTF_NORMAL Weight of True-Type Font is NORMAL.
LK_TTF_BOLD Weight of True-Type Font is BOLD.
LK_TTF_ITALIC Style of True-Type Font is italic.
LK_TTF_UNDERLINE Style of True-Type Font is underline.

SEWOO 21 29/06/2023
LK-Txx

FontDotSize:
[in] It sets the True-Type Font size.(Dot Size).
TextData:
[in] Pointer to a null-terminated Unicode string. It sets Unicode text to print.
ReversePrint:
[in] It sets the value of reverse printing.
Variable Description
LK_TTF_REVERSE_NO Not Reverse Printing.
LK_TTF_REVERSE_YES Reverse Printing.

[Return Values]
LK_SUCCESS : returns after function success..

long PrintBitmapXY (
long BaseUnitX,
long BaseUnitY,
LPCTSTR BitmapName
);
The function is used to print with bitmap file.

[Parameters]
BaseUnitX:
[in] It sets the x-coordinates for printing the bitmap image.
BaseUnitY:
[in] It sets the y-coordinates for printing the bitmap image.
BitmapName:
[in] This value is a bitmap filename.
It sets the path of the bitmap file for printing.
[Return Values]
LK_SUCCESS : returns after function success.

long PrintBitmapAlign (
long Alignment,
long BaseUnitY,
LPCTSTR BitmapName
);

SEWOO 22 29/06/2023
LK-Txx

The function is used to print with bitmap file.

[Parameters]
Alignment:
[in] It sets justification for printing the bitmap image.
BaseUnitY:
[in] It sets the y-coordinates for printing the bitmap image.
BitmapName:
[in] This value is a bitmap filename.
It sets the path of the bitmap file for printing.
[Return Values]
LK_SUCCESS : returns after function success.

long PrintQRCodeXY (
long BaseUnitX,
long BaseUnitY,
unsigned char * Data,
long Size,
long ModuleSize,
long ECLevel,
long Version,
long MaskPattern,
)
The function is used to print QRCode using QR Generator.

[Parameters]
BaseUnitX:
[in] It sets the x-coordinates for printing the QR Code.
BaseUnitY:
[in] It sets the y-coordinates for printing the QR Code.
Data:
[in] This value is the data for QRCode with NULL character.
It sets the data for QRCode printing.
Size:
[in] This value is size of data.

SEWOO 23 29/06/2023
LK-Txx

It sets the size of data to print QRCode.


ModuleSize:
[in] This value is module size.
It sets the size of module to print QRCode.
[Range] : 1 ~ 20
ECLevel:
[in] This value is Error Correction Level.
It sets the Error Correction Level to print QRCode.
[Range] : 0 ~ 3
[Default] : 0
Variable Description
LK_QRCODE_EC_LEVEL_L Error Correction Level L(7%)
LK_QRCODE_EC_LEVEL_M Error Correction Level M(15%)
LK_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%)
LK_QRCODE_EC_LEVEL_H Error Correction Level H(30%)
Version:
[in] This value is version of symbol.
It sets the value of version to print QRCode.
[Range] : 1 ~ 40
Variable Description
LK_QRCODE_VERSION_00 Auto
LK_QRCODE_VERSION_01 Symbol Version 1
LK_QRCODE_VERSION_02 Symbol Version 2
LK_QRCODE_VERSION_03 Symbol Version 3

LK_QRCODE_VERSION_39 Symbol Version 39
LK_QRCODE_VERSION_40 Symbol Version 40
MaskPattern:
[in] This value is mask pattern.
It sets the value of mask pattern to print QRCode.

Variable Description
LK_QRCODE_MASK_AUTO Auto
LK_QRCODE_MASK_0 Mask Pattern 0
LK_QRCODE_MASK_1 Mask Pattern 1
LK_QRCODE_MASK_2 Mask Pattern 2

LK_QRCODE_MASK_6 Mask Pattern 6
LK_QRCODE_MASK_7 Mask Pattern 7

[Return Values]

SEWOO 24 29/06/2023
LK-Txx

LK_SUCCESS : returns after function success..

long PrintQRCodeAlign (
long Alignment,
long BaseUnitY,
unsigned char * Data,
long Size,
long ModuleSize,
long ECLevel,
long Version,
long MaskPattern,
)
The function is used to print QRCode using QR Generator.

[Parameters]
Alignment:
[in] It sets justification for printing the QR Code.
BaseUnitY:
[in] It sets the y-coordinates for printing the QR Code.
Data:
[in] This value is the data for QRCode with NULL character.
It sets the data for QRCode printing.
Size:
[in] This value is size of data.
It sets the size of data to print QRCode.
ModuleSize:
[in] This value is module size.
It sets the size of module to print QRCode.
[Range] : 1 ~ 20
ECLevel:
[in] This value is Error Correction Level.
It sets the Error Correction Level to print QRCode.
[Range] : 0 ~ 3
[Default] : 0
Variable Description
LK_QRCODE_EC_LEVEL_L Error Correction Level L(7%)
LK_QRCODE_EC_LEVEL_M Error Correction Level M(15%)

SEWOO 25 29/06/2023
LK-Txx

LK_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%)


LK_QRCODE_EC_LEVEL_H Error Correction Level H(30%)
Version:
[in] This value is version of symbol.
It sets the value of version to print QRCode.
[Range] : 1 ~ 40
Variable Description
LK_QRCODE_VERSION_00 Auto
LK_QRCODE_VERSION_01 Symbol Version 1
LK_QRCODE_VERSION_02 Symbol Version 2
LK_QRCODE_VERSION_03 Symbol Version 3

LK_QRCODE_VERSION_39 Symbol Version 39
LK_QRCODE_VERSION_40 Symbol Version 40
MaskPattern:
[in] This value is mask pattern.
It sets the value of mask pattern to print QRCode.

Variable Description
LK_QRCODE_MASK_AUTO Auto
LK_QRCODE_MASK_0 Mask Pattern 0
LK_QRCODE_MASK_1 Mask Pattern 1
LK_QRCODE_MASK_2 Mask Pattern 2

LK_QRCODE_MASK_6 Mask Pattern 6
LK_QRCODE_MASK_7 Mask Pattern 7

[Return Values]
LK_SUCCESS : returns after function success..

long BlackMarkON(
long FeedValue
)
This function is used to support the Black Mark Function.

[Parameters]
* FeedValue
- It sets the feed length after meet black mark.[Default : mm]

[Return Values]
LK_SUCCESS : returns after function success.

SEWOO 26 29/06/2023
LK-Txx

long BlackMarkSearch()
This function is used to search the Black Mark.

[Return Values]
LK_SUCCESS : returns after function success..

BYTE* PrintDirectCommand(
LPSTR Data
);
The function is used to send direct command.

[Parameters]
Data:
[in] This value is ESC/POS Command.

[Return Values]
Return to Byte array.

long SetTransactionMode(
BOOL IsMode
)
The function is used to enter or exit in transaction mode.

[Parameters]
IsMode
[in] When entering the Transaction mode, set TRUE, and set FALSE

long PrintTransactionMode()
The function is used to print transaction mode.

[Return Values]
LK_SUCCESS : returns after function success.

SEWOO 27 29/06/2023
LK-Txx

long SetPrintingArea(
long PageHeight
)
The function is used to set printing area(height) in page mode.

[Parameters]
PageHeight
[in] The value is printing area in page mode(unit is mm)

long SetAbsoluteVertical2(
long AbsolutePosition
)
The function is used to set vertical position in page mode.

[Parameters]
AbsolutePosition
[in] The value is vertical position in page mode(unit is mm)

long SetAbsoluteHorizontal2(
long AbsolutePosition
)
The function is used to set horizontal position in page mode.

[Parameters]
AbsolutePosition
[in] The value is horizontal position in page mode(unit is mm)

long SetPageModeWidth(
long widthDots
)
The function is used to set printing area(width) in page mode.

[Parameters]

SEWOO 28 29/06/2023
LK-Txx

widthDots
[in] The value is printing area in page mode(unit is dots)
**Default is 512 dots

long SetPageModeDPI(
long dpi
)
The function is used to printer dpi in page mode.

[Parameters]
dpi
[in] The value is printer dpi in page mode
**Default is 180 DPI

long SetReverseBitmap(
BOOL Reverse
)
The function is used for the bitmap reverse option .

[Parameters]
Reverse
[in] When entering the Reverse mode, set TRUE, otherwise set FALSE
**Default is false

SEWOO 29 29/06/2023
LK-Txx

Reference

Print Normal () Method


One Shots Perform indicated action.

Name Data Remarks


Paper cut ESC |#P Cuts receipt paper. The character ‘#’ is replaced by an
ASCII decimal string telling the percentage cut desired.
If ‘#’ is omitted, then a full cut is performed. For
example: The C string “\x1B|75P” requests a 75% partial
cut.
Feed and Paper cut ESC |#fP Cuts receipt paper, after feeding the paper by the
RecLinesToPaperCut lines. The character ‘#’ is defined
by the “Paper cut” escape sequence.
Feed, Per cut, and Stamp ESC |#sP Cuts and stamps receipt paper, after feeding the paper by
the RecLinesToPaperCut lines. The character ‘#’ is
defined by the “Paper cut” escape sequence.
Fire stamp ESC |sL Fires the stamp solenoid, which usually contains a
graphical store emblem.
Print bitmap ESC |#B Prints the pre-stored bitmap. The character ‘#’ is replaced
by the bitmap number.
Feed lines ESC |#lF Feed the paper forward by lines. The character ‘#’ is
replaced by an ASCII decimal string telling the number of
lines to be fed. If ‘#’ is omitted, then one line is fed.
Feed units ESC |#uF Feed the paper forward by mapping mode units. The
character ‘#’ is replaced by an ASCII decimal string telling
the number of units to be fed. If ‘#’ is omitted, then one
unit is fed.
Feed reverse ESC |#rF Feed the paper backward. The character ‘#’ is replaced
by an ASCII decimal string telling the number of lines to
be fed. If ‘#’ is omitted, then one line is fed.

Print Mode Characteristics that are remembered until explicitly changed.

Name Data Remarks


Font typeface selection ESC |#fT Selects a new typeface for the following data. Values for
the character ‘#’ are:
0 = Default typeface.
1 = Select first typeface from the FontTypefaceList
property.
2 = Select second typeface from the FontTypefaceList
property.
And so on.

SEWOO 30 29/06/2023
LK-Txx

Print Line Characteristics that are reset at the end of each print method or by a “Normal”
sequence.

Name Data Remarks


Bold ESC |bC Prints in bold or double-strike.
Underline ESC |#uC Prints with underline. The character ‘#’ is replaced by an
ASCII decimal string telling the width of the underline in
printer dot units. If ‘#’ is omitted, then a printer-specific
default width is used.
Italic ESC |iC Prints in italics.
Alternate color (Red) ESC |rC Prints in alternate color.
Reverse video ESC |rvC Prints in a reverse video format.
Shading ESC |#sC Prints in a shaded manner. The character ‘#’ is replaced
by an ASCII decimal string telling the percentage shading
desired. If ‘#’ is omitted, then a printer-specific default
level of shading is used.
Single high & wide ESC |1C Prints normal size.
Double wide ESC |2C Prints double-wide characters.
Double high ESC |3C Prints double-high characters.
Double high & wide ESC |4C Prints double-high/double-wide characters.
Scale horizontally ESC |#hC Prints with the width scaled ‘#’ times the normal size,
where ‘#’ is replaced by an ASCII decimal string.
Scale vertically ESC |#vC Prints with the height scaled ‘#’ times the normal size,
where ‘#’ is replaced by an ASCII decimal string.
Center ESC |cA Aligns following text in the center.
Right justify ESC |rA Aligns following text at the right.
Normal ESC |N Restores printer characteristics to normal condition.

* Please refer to the source on Visual Basic, VC++, Delphi, Java, PowerBuilder
and .Net program attached for the detail information

SEWOO 31 29/06/2023

You might also like