Share via


ClaimedPosPrinter Class

Definition

Represent a point-of-service printer that has been claimed for use.

public ref class ClaimedPosPrinter sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ClaimedPosPrinter final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ClaimedPosPrinter final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ClaimedPosPrinter : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ClaimedPosPrinter : System.IDisposable
Public NotInheritable Class ClaimedPosPrinter
Implements IDisposable
Inheritance
Object Platform::Object IInspectable ClaimedPosPrinter
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

To get an instance of the ClaimedPosPrinter class, use the PosPrinter.ClaimPrinterAsync method.

Version history

Windows version SDK version Value added
1809 17763 Closed

Properties

CharacterSet

Gets or sets a numeric value that indicates the character set that the application wants to use for printing characters.

DeviceId

Gets the identifier string of the claimed point-of-service printer.

IsCharacterSetMappingEnabled

Gets or sets whether the driver or provider can map Unicode characters to characters that the point-of-service printer can print, or just sends the low byte of the Unicode character to the printer directly.

IsCoverOpen

Gets whether the cover of the point-of-service printer is currently open.

IsEnabled

Gets whether the printer is powered on for use.

Journal

Gets an object that represents the journal station for a claimed point-of-service printer.

The journal station is used for simple text messages that log transaction and activity information kept by the store for audit and other purposes.

There is only one instance of this object per ClaimedPosPrinter instance. Additionally, this is only valid to access if JournalPrinterCapabilities.IsPrinterPresent indicates it is present.

MapMode

Gets or sets the mapping mode of the point-of-service printer that the app wants to use. The mapping mode defines the unit of measure used for other printer properties, such as line height and line spacing.

Receipt

Gets an object that represents the receipt station for a claimed point-of-service printer.

The receipt station is used to print transaction information that is typically given to the customer, or for store reports. The receipt station contains either a knife to automatically cut the paper between transactions, or a tear bar to manually cut the paper.

There is only one instance of this object per ClaimedPosPrinter instance. Additionally, this is only valid to access if ReceiptPrinterCapabilities.IsPrinterPresent indicates it is present.

Slip

Gets an object that represents the slip station for a claimed point-of-service printer.

The slip station is used to print information on a form that is typically given to the customer, or to print validation information on a form. The form type is usually a check or credit card slip.

There is only one instance of this object per ClaimedPosPrinter instance. Additionally, this is only valid to access if SlipPrinterCapabilities.IsPrinterPresent indicates it is present.

Methods

Close()

Disposes the claimed point-of-service printer object synchronously, releases the exclusive claim on the printer and disables it. For C++ and JavaScript, use Close(). For C# and Visual Basic, use Dispose().

DisableAsync()

Notifies the underlying hardware to turn off.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EnableAsync()

Notifies the underlying hardware asynchronously to power on for use.

ResetStatisticsAsync(IIterable<String>)

Resets the specified statistics to zero for all statistics for the point-of-service printer that can be reset.

RetainDeviceAsync()

Retains the claim on the point-of-service printer asynchronously, usually in response to the ReleaseDeviceRequested event.

UpdateStatisticsAsync(IIterable<KeyValuePair<String,String>>)

Updates the specified statistics for the point-of-service printer.

Events

Closed

Event that is raised when the ClaimedPosPrinter is closed.

ReleaseDeviceRequested

Occurs when a point-of-service printer gets a request to release its exclusive claim.

Applies to

See also