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

3/2/2014

Prints two strings on two print stations simultaneously. When supported, this may give increased print performance.

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

Syntax

'Declaration
Public Overrides Sub PrintTwoNormal ( _
    stations As PrinterStation, _
    data1 As String, _
    data2 As String _
)
public override void PrintTwoNormal (
    PrinterStation stations,
    string data1,
    string data2
)
public:
virtual void PrintTwoNormal (
    PrinterStation stations, 
    String^ data1, 
    String^ data2
) override
public void PrintTwoNormal (
    PrinterStation stations, 
    String data1, 
    String data2
)
public override function PrintTwoNormal (
    stations : PrinterStation, 
    data1 : String, 
    data2 : String
)

Parameters

  • stations
    The printer stations to be used. Possible values are defined by the PrinterStation enumeration. Valid values are: PrinterStation.TwoReceiptJournal, PrinterStation.TwoSlipJournal, or PrinterStation.TwoSlipReceipt.
  • data1
    The characters to be printed on the first station. May consist of printable characters and escape sequences as listed in the PosPrinter topic. The characters must all fit on one printed line, so that the printer may attempt to print on both stations simultaneously.
  • data2
    The characters to be printed on the second station. (Restrictions are the same as data1.) If this string is the empty string (“”), then print the same data as data1. On some printers, using this format may give additional increased print performance.

Remarks

The PosPrinterBase class verifies that the application has the device opened, claimed, and enabled. PosPrinterBase validates the parameters and device state, and may throw PosControlException exceptions with the following values:

Value

Meaning

Other values

A physical condition exists that would preclude the operation—for example, the cover is open, the paper is removed, and so on. A full list of these exceptions is provided under PosPrinter.PrintTwoNormal.

Busy

The State property is set to ControlState.Busy (applies only if the AsyncMode property has been set to false); or

Illegal

a) the requested printer station isn’t PrinterStation.TwoReceiptJournal, PrinterStation.TwoSlipJournal, or PrinterStation.TwoSlipReceipt; b) the requested printer station doesn’t exist (that is, the value of the CapRecPresent, CapJrnPresent, or CapSlpPresent property is false); c) concurrent printing isn’t supported (that is, the value of CapConcurrentJrnRec, CapConcurrentRecSlp, or CapConcurrentJrnSlp is set to false); d) the stations aren’t in Rotation.Normal rotation mode; or e) the data1 parameter is null;

If no exception is thrown, the PosPrinterBase class calls PrintTwoNormalImpl and updates statistics based on the values returned in the PrintResults class.

PrintTwoNormalImpl is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.

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.PrintTwoNormal Method
PrintTwoNormalImpl