Share via


PosPrinter.CutPaper Method

2/27/2008

Cuts the receipt paper.

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

Syntax

'Declaration
Public MustOverride Sub CutPaper ( _
    percentage As Integer _
)
public abstract void CutPaper (
    int percentage
)
public:
virtual void CutPaper (
    int percentage
) abstract
public abstract void CutPaper (
    int percentage
)
public abstract function CutPaper (
    percentage : int
)

Parameters

  • percentage
    The percentage parameter indicates the percentage of paper to cut. If percentage is set to the constant PrinterCutPaperFullCut, this causes a full paper cut. Other percentage values request a partial cut.

Remarks

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

Many printers with paper cutting capability can perform both full and partial cuts. Some offer gradations of partial cuts, such as a perforated cut and an almost-full cut. Although the exact type of cut varies by printer capabilities, the following general guide may be used:

Value

Meaning

100

Full cut.

90

Leave only a small part of paper for very easy final separation.

70

Perforate the paper for final separation that is somewhat more difficult and unlikely to occur by accidental handling.

50

Partial perforation of the paper.

The service object will select an appropriate type of cut based on the capabilities of its device and these general guidelines.

An escape sequence (ESC|#P) embedded in a PrintNormal or PrintImmediate method call may also be used to cause a paper cut.

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

CutPaper may throw a PosControlException with the following ErrorCodes:

Value

Meaning

Busy

The Printer device is currently being used. (Can be returned only if AsyncMode is false.)

Illegal

One of the following conditions has occurred:

  • The value specified for percentage is not between 0 (zero) and 100.

  • The receipt station does not exist (that is, the CapRecPresent property is set to false).

  • The receipt printer does not have paper cutting ability (that is, the CapRecPapercut property is set to false).

  • The printer is currently in Insertion mode.

  • The printer is currently in Removal mode.

  • The specified rotation mode has to be either Normal or Rotate180.

Extended

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

ExtendedErrorRecEmpty: The receipt station is out of paper. (Can be thrown 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
CapRecPaperCut
RotateSpecial
PrintNormal
PrintImmediate