Transactionprintasync Method - Citizen CT-D101 Series Programming Manual

Hide thumbs Also See for CT-D101 Series:
Table of Contents

Advertisement

2.3.19. TransactionPrintAsync method

Syntax
Task<int> TransactionPrintAsync (int control)
Parameter
The meaning and the setting range of the parameters are as follows.
Value
control
Description
This method is used to start or end a transaction mode.
If control is CMP_TP_TRANSACTION, then transaction mode is entered. Subsequent methods calls will
buffer the print data. The methods applied to a transaction mode are as follows.
PrintTextAsync, PrintBitmapAsync, PrintNVBitmapAsync, PrintBarCodeAsync, PrintPDF417Async,
PrintQRCodeAsync, PrintGS1DataBarStackedAsync, CutPaperAsync, UnitFeedAsync,
OpenDrawerAsync, RotatePrintAsync, PageModePrintAsync, ClearePrintArea, PrintDataAsync,
PrintNormalAsync
If control is CMP_TP_NORMAL, then transaction mode is exited. If some data was buffered, then the
buffered data is printed. The entire transaction is treated as one message.
Calling the
ClearOutputAsync method
cleared.
Return value
Return CMP_SUCCESS (0) in success. Please refer to
Example
await printer.TransactionPrintAsync( ESCPOSConst.CMP_TP_TRANSACTION );
await printer.PrintNVBitmapAsync( 1 );
await printer.PrintBarCodeAsync ( "123456789012", ESCPOSConst.CMP_BCS_UPCA,
50, 2, ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_HRI_TEXT_ABOVE );
await printer.PrintTextAsync( "Line 1\n", ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_FNT_DEFAULT, ESCPOSConst.CMP_TXT_1WIDTH );
await printer.PrintTextAsync( "Line 2\n", ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_FNT_DEFAULT, ESCPOSConst.CMP_TXT_1WIDTH );
await printer.PrintTextAsync( "Line 3\n", ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_FNT_DEFAULT, ESCPOSConst.CMP_TXT_1WIDTH );
await printer.PrintBarCodeAsync ( "123456789012", ESCPOSConst.CMP_BCS_UPCA,
50, 2, ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_HRI_TEXT_ABOVE );
await printer.PrintNVBitmapAsync( 1 );
await printer.CutPaperAsync( ESCPOSConst.CMP_CUT_PARTIAL_PREFEED );
await printer.TransactionPrintAsync( ESCPOSConst.CMP_TP_NORMAL );
[IN/OUT]
Meaning
[IN]
Transaction control
cancels transaction mode. Any buffered print lines are also
CITIZEN UWP POS Print SDK - Programming Manual
Setting range
CMP_TP_TRANSACTION:
Begin a transaction.
CMP_TP_NORMAL:
End a transaction by printing the
buffered data.
"2.3.1. Return
50
value" for the error code except it.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents