51
CITIZEN UWP POS Print SDK - Programming Manual
2.3.20. RotatePrintAsync method
Syntax
Task<int> RotatePrintAsync (int rotation)
Parameter
The meaning and the setting range of the parameters are as follows.
Value
[IN/OUT]
Meaning
Setting range
rotation
[IN]
Direction of rotation CMP_RP_ROTATE180:
Start rotated printing 180°, that is, print
upside-down
CMP_RP_BARCODE
:
Start rotated bar code printing. This value is
ORed with the above start rotated print values.
CMP_RP_BITMAP
:
Start rotated bitmap printing. This value is ORed
with the above start rotated print values.
CMP_RP_NORMAL
:
End rotated printing
Description
This method is used to start or end a rotation print mode.
If rotation includes PTR_RP_ROTATE180, then upside-down print mode is entered. The methods applied
to a rotation print mode are as follows.
PrintTextAsync, PrintNormalAsync
If rotation includes PTR_RP_BARCODE and/or PTR_RP_BITMAP, the following methods are printed also
rotated.
PrintBarcodAsync, PrintPDF417Async, PrintQRCodeAsync, PrintGS1DataBarStackedAsync and/or
PrintBitmapAsync
If rotation is CMP_RP_NORMAL, then rotation mode is exited.
Return value
Return CMP_SUCCESS (0) in success. Please refer to "
" for the error code except it.
Example
await printer.RotatePrintAsync( ESCPOSConst.CMP_RP_ROTATE180 |
ESCPOSConst.CMP_RP_BARCODE | ESCPOSConst.CMP_RP_BITMAP );
await printer.PrintBitmapAsync ( "samplebitmap.bmp", ESCPOSConst.CMP_BM_ASIS,
ESCPOSConst.CMP_ALIGNMENT_CENTER );
await printer.PrintBarCodeAsync ( "123456789012", ESCPOSConst.CMP_BCS_UPCA,
50, 2, ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_HRI_TEXT_ABOVE );
await printer.PrintTextAsync( "Line 3\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 1\n", ESCPOSConst.CMP_ALIGNMENT_LEFT,
ESCPOSConst.CMP_FNT_DEFAULT, ESCPOSConst.CMP_TXT_1WIDTH );
await printer.RotatePrintAsync( ESCPOSConst.CMP_RP_NORMAL );