Share via


FiscalPrinter.SetHeaderLine Method (POS for .NET v1.14 SDK Documentation)

3/2/2014

Sets one of the fiscal receipt header lines.

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

Syntax

'Declaration
Public MustOverride Sub SetHeaderLine ( _
    lineNumber As Integer, _
    text As String, _
    doubleWidth As Boolean _
)
public abstract void SetHeaderLine (
    int lineNumber,
    string text,
    bool doubleWidth
)
public:
virtual void SetHeaderLine (
    int lineNumber, 
    String^ text, 
    bool doubleWidth
) abstract
public abstract void SetHeaderLine (
    int lineNumber, 
    String text, 
    boolean doubleWidth
)
public abstract function SetHeaderLine (
    lineNumber : int, 
    text : String, 
    doubleWidth : boolean
)

Parameters

  • lineNumber
    Line number of the header line to set.
  • text
    Text to which to set the header line.
  • doubleWidth
    Print this line in double-wide characters.

Remarks

The text set by SetHeaderLine is stored by the printer and retained across power losses.

lineNumber must be between 1 and the value of the NumHeaderLines property.

If headerText is an empty string (““), the header line is unset and is not printed.

doubleWidth characters are printed if the printer supports them. See the CapDoubleWidth property to determine if they are supported.

SetHeaderLine is supported only if CapSetHeader is true.

SetHeaderLine can be called only while DayOpened is false.

SetHeaderLine may cause a PosControlException to be thrown with one of the following ErrorCodes:

Value

Description

Illegal

One of the following errors occurred:

  • The printer has already begun the fiscal day (see the DayOpened property).

  • The lineNumber parameter is invalid.

ExtendedErrorBadItemDescription:

The headerText parameter is too long or contains a reserved word. (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

FiscalPrinter Class
FiscalPrinter Members
Microsoft.PointOfService Namespace
CapDoubleWidth
CapMultiContractor
CapSetHeader
ContractorId
DayOpened
NumHeaderLines