Share via


PosPrinter.ChangePrintSide Method

2/27/2008

Selects the side of the document that it wants to print on.

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

Syntax

'Declaration
Public MustOverride Sub ChangePrintSide ( _
    side As PrinterSide _
)
public abstract void ChangePrintSide (
    PrinterSide side
)
public:
virtual void ChangePrintSide (
    PrinterSide side
) abstract
public abstract void ChangePrintSide (
    PrinterSide side
)
public abstract function ChangePrintSide (
    side : PrinterSide
)

Parameters

  • side

Remarks

ChangePrintSide allows printing on both sides of a document. You can do this by mechanical paper handling of the document or multiple print heads that are positioned to print on each side of the document.

If a document is not inserted, the service object throws an exception.

A side value equal to PrintSide.Side1 indicates the default print side of the document. (Default print side is defined as the side of the document that the printer uses after turn on, the side where printing will occur immediately after the document has been inserted. Therefore, PrintSide.Side1 is selected after the Begin/EndInsertion method is executed.)

A side value equal to PrintSide.Side2 indicates the opposite side of the document from the one that the printer uses after turn on (the reverse of PrintSide.Side1).

A side value equal to PrintSide.Opposite means that the current printing side is switched and printing will now occur on the opposite side of the slip. (For example, if the SlpPrintSide property was set to PrintSide.Side1, it is changed to PrintSide.Side2.)

If side is set to PrintSide.Opposite or to the same as the value of the SlpPrintSide property, the side of the document is changed and the document is fed to TOF.

If side is the same as SlpPrintSide, nothing occurs.

Executing ChangePrintSide can change the setting of the SlpPrintSide property.

If ChangePrintSide fails, the service object increments the Failed PrintSideChangedCount statistic; if ChangePrintSide succeeds and the print side was changed, the service object increments the PrintSideChangedCount statistic.

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

ChangePrintSide 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 slip print station is not present on this printer (that is, the CapSlpPresent property is set to false).

  • The printer does not support two-sided printing (that is, the CapSlpBothSidesPrint property is set to false).

  • No slip has been inserted—that is, the application has not called the BeginInsertion and EndInsertion methods before it calls ChangePrintSide.

  • The printer is currently in Insertion mode.

  • The printer is currently in Removal mode.

  • The side parameter contains a value that does not exist in the PrintSide enumeration.

Extended

ExtendedErrorCoverOpen: The printer cover is open.

ExtendedErrorSlpEmpty: The slip station is out of paper.

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
CapSlpPresent
CapSlpBothSidesPrint
SlpPrintSide
PrinterSide