Share via


PosPrinter.PrintNormal Method

2/27/2008

Prints the string specified in data on the printer station specified in station.

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

Syntax

'Declaration
Public MustOverride Sub PrintNormal ( _
    station As PrinterStation, _
    data As String _
)
public abstract void PrintNormal (
    PrinterStation station,
    string data
)
public:
virtual void PrintNormal (
    PrinterStation station, 
    String^ data
) abstract
public abstract void PrintNormal (
    PrinterStation station, 
    String data
)
public abstract function PrintNormal (
    station : PrinterStation, 
    data : String
)

Parameters

  • station
    The printer station to be used. Possible values are defined by the PrinterStation enumeration. Valid values are as follows: PrinterStation.Journal, PrinterStation.Receipt, or PrinterStation.Slip.
  • data
    The characters to be printed. May consist of printable characters, escape sequences, carriage returns (13 decimal), and new line / line feed (10 decimal).

Remarks

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

Special character values within data is as follows:

Value

Meaning

Newline / Line Feed (10 Decimal)

Print any data in the line buffer, and feed to the next print line. (A carriage return is not required in order to print the line.)

Carriage Return (13 Decimal)

If a carriage return immediately comes before a line feed, or if the line buffer is empty, then it is ignored.

Otherwise, the line buffer is printed and the printer does not feed to the next print line.

On some printers, print without feed may be directly supported.

On others, a print may always feed to the next line. In this case, the service object will print the line buffer and perform a reverse line feed if supported.

If the printer does not support either of these features, then carriage return functions like a line feed.

The ValidateData method can be used to determine whether a carriage return without line feed is possible, and whether a reverse line feed is required to support it.

Before it calls this method, the application must open, claim, and enable the device.

PrintNormal may throw a PosControlException with the following ErrorCodes:

Value

Meaning

Illegal

One of the following conditions has occurred:

  • The specified station is invalid.

  • The specified station does not exist (that is, the appropriate CapJrnPresent, CapRecPresent, or CapSlpPresent property is set to false).

Busy

Cannot perform while output is in progress. (Can be returned only if AsyncMode is false.)

Extended

ExtendedErrorCoverOpen: The printer cover is open. (Can be returned only if AsyncMode is false.)

ExtendedErrorJrnEmpty: The journal station was specified but is out of paper. (Can be returned only if AsyncMode is false.)

ExtendedErrorJrnCartridgeEmpty: A journal cartridge is empty. (Can be returned only if AsyncMode is false.)

ExtendedErrorJrnCartridgeRemoved: A journal cartridge is removed. (Can be returned only if AsyncMode is false.)

ExtendedErrorJrnHeadCleaning: A journal head is being cleaned. (Can be returned only if AsyncMode is false.)

ExtendedErrorRecEmpty: The receipt station was specified but is out of paper. (Can be returned only if AsyncMode is false.)

ExtendedErrorRecCartridgeEmpty: A receipt cartridge is empty. (Can be returned only if AsyncMode is false.)

ExtendedErrorRecCartridgeRemoved: A receipt cartridge is removed. (Can be returned only if AsyncMode is false.)

ExtendedErrorRecHeadCleaning: A receipt head is being cleaned. (Can be returned only if AsyncMode is false.)

ExtendedErrorSlpEmpty: The slip station was specified, but a form is not inserted (can be returned only if AsyncMode is false.)

ExtendedErrorSlpCartridgeEmpty: A slip cartridge is empty. (Can be returned only if AsyncMode is false.)

ExtendedErrorSlpCartridgeRemoved: A slip cartridge is removed. (Can be returned only if AsyncMode is false.)

ExtendedErrorSlpHeadCleaning: A slip head is being cleaned. (Can be returned only if AsyncMode is false.)

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

PosPrinter Class
PosPrinter Members
Microsoft.PointOfService Namespace
CapRecPresent
CapJrnPresent
CapSlpPresent
PosPrinter.PrintNormal Method
PrintTwoNormal
ValidateData