PosPrinterBase.PageModePrint Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Enters or exits Page Mode for the station specified in the PageModeStation property.

Namespace: Microsoft.PointOfService.BaseServiceObjects
Assembly: Microsoft.PointOfService.ControlBase (in microsoft.pointofservice.controlbase.dll)

Syntax

'Declaration
Public Overrides Sub PageModePrint ( _
    control As PageModePrintControl _
)
public override void PageModePrint (
    PageModePrintControl control
)
public:
virtual void PageModePrint (
    PageModePrintControl control
) override
public void PageModePrint (
    PageModePrintControl control
)
public override function PageModePrint (
    control : PageModePrintControl
)

Parameters

  • control
    The page mode control.

Remarks

If control is PageMode, then Page Mode is entered. Subsequent calls to PrintNormal, PrintBarCode, and PrintBitmap will buffer the print data (either at the printer or the Service, depending on the printer capabilities) until PageModePrint is called with the control parameter set to PrintSave, Normal, or Cancel. (In this case, the print methods only validate the method parameters and buffer the data – they do not initiate printing. Also, the value of the AsyncMode property does not affect their operation: No OutputID will be assigned to the request, nor will an OutputCompleteEvent be queued.)

If control is PrintSave, then Page Mode is not exited. If some data is buffered by calls to the methods PrintNormal, PrintBarCode, and PrintBitmap, 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 Normal, then Page Mode is exited. If some data is buffered by calls to the methods PrintNormal, PrintBarCode, and PrintBitmap, then the buffered data is printed. The buffered data will not be saved.

If control is Cancel, then Page Mode is exited. If some data is buffered by calls to the methods PrintNormal, PrintBarCode, and PrintBitmap, then the buffered data is not printed and is not saved.

Note that when the PageModePrint 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. This method is performed synchronously if AsyncMode is FALSE, and asynchronously if AsyncMode is TRUE.

Calling the ClearOutput method cancels Page Mode. Any buffered print lines are also cleared.

Page Mode can be used within a transaction print, but not within a rotate print.

The PageModeStation property must be set to a valid station before invoking PageModePrintControl.

PageModePrint may throw a PosControlException with the following ErrorCode:

Value

Meaning

Illegal

The specified PageModeStation does not exist (see the CapRecPresent and CapSlpPresent properties), or CapxxxPageMode is false, or the specified PageModeStation is not in Page Mode and control is set to Normal, PrintSave, or Cancel.

Busy

Cannot perform while output is in progress. (Can only apply if AsyncMode is false and control is Normal, PrintSave, or Cancel.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

PosPrinterBase Class
PosPrinterBase Members
Microsoft.PointOfService.BaseServiceObjects Namespace
PosPrinter.PageModePrintArea Property
PosPrinter.PageModeStation Property