52
CITIZEN UWP POS Print SDK - Programming Manual
2.3.21. PageModePrintAsync method
Syntax
Task<int> PageModePrintAsync (int control)
Parameter
The meaning and the setting range of the parameters are as follows.
Value
[IN/OUT]
Meaning
Setting range
control
[IN]
Page Mode control
CMP_PM_PAGE_MODE:
Enter Page Mode
CMP_PM_PRINT_SAVE:
Print PageModePrintArea and save the canvas
CMP_PM_NORMAL:
Print the print area and destroy the canvas and
exit Page Mode.
CMP_PM_CANCEL:
Clear the page and exit the Page Mode without
any printing of any print area
Description
This method is used to start or end a Page Mode.
If control is PTR_PM_PAGE_MODE, then Page Mode is entered. Subsequent methods calls will buffer the
print data. The methods applied to a Page Mode are as follows.
PrintTextAsync, PrintBitmapAsync, PrintBarCodeAsync, PrintPDF417Async, PrintQRCodeAsync,
PrintGS1DataBarStackedAsync, PrintNormalAsync
If control is PTR_PM_PRINT_SAVE, then Page Mode is not exited. If some data is buffered, then the
buffered data is saved and printed. This control is used to print the same page layout with additional
print items inside of the page.
If control is PTR_PM_NORMAL, then Page Mode is exited. If some data is buffered, then the buffered
data is printed. The buffered data will not be saved.
If control is PTR_PM_CANCEL, then Page Mode is exited. If some data is buffered, then the buffered
data is not printed and is not saved.
Note that when the PageModePrintAsync method is called, all of the data that is to be printed in the
PageModePrintArea will be printed and the paper is fed to the end of the PageModePrintArea. If more
than one PageModePrintArea is defined, then after the PageModePrint method is called, all of the data
that is to be printed in the respective PageModePrintArea(s) will be printed and the paper will be fed to
the end of the PageModePrintArea located the farthest “down” the sheet of
paper.
The entire Page Mode transaction is treated as one message.
Calling the
cancels Page Mode. Any buffered print lines are also cleared.
Return value
Return CMP_SUCCESS (0) in success. Please refer to "
" for the error code except it.