ClaimedPosPrinter
ClaimedPosPrinter
ClaimedPosPrinter
ClaimedPosPrinter
Class
Definition
Represent a point-of-service printer that has been claimed for use.
public : sealed class ClaimedPosPrinter : IClaimedPosPrinter, IClosablepublic sealed class ClaimedPosPrinter : IClaimedPosPrinter, IDisposablePublic NotInheritable Class ClaimedPosPrinter Implements IClaimedPosPrinter, IDisposable// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
To get an instance of the ClaimedPosPrinter class, use the PosPrinter.ClaimPrinterAsync method.
Properties
CharacterSet CharacterSet CharacterSet CharacterSet
Gets or sets a numeric value that indicates the character set that the application wants to use for printing characters.
public : unsigned int CharacterSet { get; set; }public uint CharacterSet { get; set; }Public ReadWrite Property CharacterSet As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The character set that the application wants to use for printing characters.
DeviceId DeviceId DeviceId DeviceId
Gets the identifier string of the claimed point-of-service printer.
public : PlatForm::String DeviceId { get; }public string DeviceId { get; }Public ReadOnly Property DeviceId As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The identifier of the claimed point-of-service printer.
IsCharacterSetMappingEnabled IsCharacterSetMappingEnabled IsCharacterSetMappingEnabled 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.
public : PlatForm::Boolean IsCharacterSetMappingEnabled { get; set; }public bool IsCharacterSetMappingEnabled { get; set; }Public ReadWrite Property IsCharacterSetMappingEnabled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the driver or provider maps Unicode characters to character that the point-of-service printer can print. False if the driver or provider sends the low byte of each Unicode character to the point-of-service printer directly.
- See Also
IsCoverOpen IsCoverOpen IsCoverOpen IsCoverOpen
Gets whether the cover of the point-of-service printer is currently open.
public : PlatForm::Boolean IsCoverOpen { get; }public bool IsCoverOpen { get; }Public ReadOnly Property IsCoverOpen As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the cover of the printer is currently open; otherwise, false.
IsEnabled IsEnabled IsEnabled IsEnabled
Gets whether the printer is powered on for use.
public : PlatForm::Boolean IsEnabled { get; }public bool IsEnabled { get; }Public ReadOnly Property IsEnabled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the printer is powered on for use; false otherwise.
Journal Journal Journal 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.
public : ClaimedJournalPrinter Journal { get; }public ClaimedJournalPrinter Journal { get; }Public ReadOnly Property Journal As ClaimedJournalPrinter// You can use this property in JavaScript.
An object that represents the journal station for a claimed point-of-service printer. Null if a journal station is not present.
Remarks
You should check the value of the JournalPrinterCapabilities.IsPrinterPresent property before you try to use the ClaimedPosPrinter.Journal property.
- See Also
MapMode MapMode MapMode 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.
public : PosPrinterMapMode MapMode { get; set; }public PosPrinterMapMode MapMode { get; set; }Public ReadWrite Property MapMode As PosPrinterMapMode// You can use this property in JavaScript.
An enumeration value that indicates the mapping mode of the point-of-service printer that the app wants to use.
- See Also
Receipt Receipt Receipt 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.
public : ClaimedReceiptPrinter Receipt { get; }public ClaimedReceiptPrinter Receipt { get; }Public ReadOnly Property Receipt As ClaimedReceiptPrinter// You can use this property in JavaScript.
An object that represents the receipt station for a claimed point-of-service printer. Null if a receipt station is not present.
Remarks
You should check the value of the ReceiptPrinterCapabilities.IsPrinterPresent property before you try to use the ClaimedPosPrinter.Receipt property.
- See Also
Slip Slip Slip 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.
public : ClaimedSlipPrinter Slip { get; }public ClaimedSlipPrinter Slip { get; }Public ReadOnly Property Slip As ClaimedSlipPrinter// You can use this property in JavaScript.
An object that represents the slip station for a claimed point-of-service printer. Null if a slip station is not present.
Remarks
You should check the value of the SlipPrinterCapabilities.IsPrinterPresent property before you try to use the ClaimedPosPrinter.Slip property.
- See Also
Methods
Close() Close() Close() 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().
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
Remarks
You cannot call Close methods through Visual C++ component extensions (C++/CX) on Windows Runtime class instances where the class implemented IClosable. Instead, Visual C++ component extensions (C++/CX) code for runtime classes should call the destructor or set the last reference to null.
DisableAsync() DisableAsync() DisableAsync() DisableAsync()
Notifies the underlying hardware to turn off.
public : IAsyncOperation<PlatForm::Boolean> DisableAsync()public IAsyncOperation<bool> DisableAsync()Public Function DisableAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
True if the attempt turn off the printer succeeded; otherwise false.
Dispose() Dispose() Dispose() Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()
EnableAsync() EnableAsync() EnableAsync() EnableAsync()
Notifies the underlying hardware asynchronously to power on for use.
public : IAsyncOperation<PlatForm::Boolean> EnableAsync()public IAsyncOperation<bool> EnableAsync()Public Function EnableAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
True if the attempt to turn on the printer succeeded; otherwise false.
ResetStatisticsAsync(IIterable)
ResetStatisticsAsync(IIterable)
ResetStatisticsAsync(IIterable)
ResetStatisticsAsync(IIterable)
Resets the specified statistics to zero for all statistics for the point-of-service printer that can be reset.
public : IAsyncOperation<PlatForm::Boolean> ResetStatisticsAsync(IIterable<PlatForm::String> statisticsCategories)public IAsyncOperation<bool> ResetStatisticsAsync(IEnumerable<String> statisticsCategories)Public Function ResetStatisticsAsync(statisticsCategories As IEnumerable<String>) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
- statisticsCategories
- IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String> IEnumerable<String>
A list of the names of the statistics that you want to reset.
- An empty string ("") retrieves all statistics.
- "U_" retrieves all UnifiedPOS-defined statistics.
- "M_" retrieves all manufacturer-defined statistics.
- Name1 and/or Name2 retrieves specific named statistics as defined by the UnifiedPOS or manufacturer.
- Any combination of individual and group names (Name3, "U_", "M_"). .
An operation that returns true if the reset succeeds, or otherwise returns false.
Remarks
This method represents a change in state.
RetainDeviceAsync() RetainDeviceAsync() RetainDeviceAsync() RetainDeviceAsync()
Retains the claim on the point-of-service printer asynchronously, usually in response to the ReleaseDeviceRequested event.
public : IAsyncOperation<PlatForm::Boolean> RetainDeviceAsync()public IAsyncOperation<bool> RetainDeviceAsync()Public Function RetainDeviceAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
True if the printer was successfully retained; otherwise, false.
- See Also
UpdateStatisticsAsync(IIterable<>>)
UpdateStatisticsAsync(IIterable<>>)
UpdateStatisticsAsync(IIterable<>>)
UpdateStatisticsAsync(IIterable<>>)
Updates the specified statistics for the point-of-service printer.
public : IAsyncOperation<PlatForm::Boolean> UpdateStatisticsAsync(IIterable<IKeyValuePair<PlatForm::String, PlatForm::String>> statistics)public IAsyncOperation<bool> UpdateStatisticsAsync(IEnumerable<KeyValuePair<String, String>> statistics)Public Function UpdateStatisticsAsync(statistics As IEnumerable<KeyValuePair<String, String>>) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
- statistics
- IIterable<IKeyValuePair<PlatForm::String, PlatForm::String>> IEnumerable<KeyValuePair<String, String>> IEnumerable<KeyValuePair<String, String>> IEnumerable<KeyValuePair<String, String>>
The statistics to update.
An operation that returns true if the update succeeds, or otherwise returns false.
Events
ReleaseDeviceRequested ReleaseDeviceRequested ReleaseDeviceRequested ReleaseDeviceRequested
Occurs when a point-of-service printer gets a request to release its exclusive claim.
public : event TypedEventHandler ReleaseDeviceRequested<ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs>public event TypedEventHandler ReleaseDeviceRequested<ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs>Public Event ReleaseDeviceRequested<ClaimedPosPrinter, PosPrinterReleaseDeviceRequestedEventArgs>// You can use this event in JavaScript.
Remarks
When this event occurs, the app has a two-second window of time to call the RetainDeviceAsync so that the app can keep exclusive claim on the device. Alternatively, the app can call Close to release the claim and end the window immediately.
- See Also