PosPrinter.PrintNormal Method

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

Usage

'Usage
Dim station As PrinterStation
Dim data As String
Dim posPrinter1 As PosPrinter
posPrinter1.PrintNormal(station, data)

Syntax

'Declaration
Public MustOverride Sub PrintNormal( _
    ByVal station As PrinterStation, _
    ByVal data As String _
)
public abstract void PrintNormal(
    PrinterStation station,
    string data
);
public: abstract Void PrintNormal(
    PrinterStation^ station,
    String^ data
);
public abstract void PrintNormal(
    PrinterStation station,
    System.String data
);
public abstract function PrintNormal(
     station : PrinterStation,
     data : String
) : Void;

Parameters

  • station
    The printer station to be used. Possible values are defined by the PrinterStation enumeration. Valid values are: 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 newline / line feed (10 decimal).

Remarks

The application calls PrintNormal to print the string specified in data on the printer station specified in station.

PrintNormal is performed synchronously if AsyncMode is FALSE, and asynchronously if AsyncMode is TRUE.

Special character values within data are:

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 precedes 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 which 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 acts 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 calling this method, the application must open, claim, and enable the device.

PrintNormal returns void if successful, and it can throw the following exceptions:

Value

Meaning

Illegal

One of the following conditions has occurred:

a) The specified station is invalid; or

b) 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.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

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