PosPrinter Class
Definition
Represents a point-of-service printer.
public ref class PosPrinter sealed
public ref class PosPrinter sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.IPosPrinterStatics, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PosPrinter final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.IPosPrinterStatics, 65536, "Windows.Foundation.UniversalApiContract")]
class PosPrinter final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.IPosPrinterStatics, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.Devices.PointOfService.IPosPrinterStatics2, 262144, "Windows.Foundation.UniversalApiContract")]
class PosPrinter final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.IPosPrinterStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PosPrinter
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.IPosPrinterStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PosPrinter
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=167772160)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.IPosPrinterStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.Devices.PointOfService.IPosPrinterStatics2), 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class PosPrinter : System.IDisposable
Public NotInheritable Class PosPrinter
Public NotInheritable Class PosPrinter
Implements IDisposable
- Inheritance
-
PosPrinter
- Attributes
- Implements
Windows 10 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 a PosPrinter object, use the FromIdAsync or GetDefaultAsync static methods.
See the POS printer sample for an example implementation.
Version history
Windows version | SDK version | Value added |
---|---|---|
1703 | 15063 | GetDeviceSelector(PosConnectionTypes) |
1903 | 18362 | GetFontProperty |
1903 | 18362 | SupportedBarcodeSymbologies |
Properties
Capabilities |
Gets the capabilities of the point-of-service printer. |
DeviceId |
Gets the identifier of the point-of-service printer. |
Status |
Gets the current status of the power and availability of the point-of-service printer. |
SupportedBarcodeSymbologies |
Gets the barcode symbologies that the point-of-service printer supports. |
SupportedCharacterSets |
Gets the list of character sets that the point-of-service printer supports. |
SupportedTypeFaces |
Gets the fonts and typefaces that the point-of-service printer supports. |
Methods
CheckHealthAsync(UnifiedPosHealthCheckLevel) |
Gets the health state of the point-of-service printer asynchronously. |
ClaimPrinterAsync() |
Claims the point-of-service printer for use, and gets an instance of the ClaimedPosPrinter class for the point-of-service printer. |
Close() |
Close the POS printer session. For C++ and JavaScript, use Close(). For C# and Visual Basic, use Dispose(). |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
FromIdAsync(String) |
Creates a PosPrinter object for point-of-service printer with the specified DeviceInformation.Id. |
GetDefaultAsync() |
Gets the default paired or locally-connected printer. |
GetDeviceSelector() |
Gets an Advanced Query Syntax (AQS) string that you can use to list the available point-of-service printers. |
GetDeviceSelector(PosConnectionTypes) |
Gets an Advanced Query Syntax (AQS) string that you can use to list the point-of-service printers available over the specified connection types |
GetFontProperty(String) |
Gets the specified font property from the point-of-service printers. |
GetStatisticsAsync(IEnumerable<String>) |
Gets the specified statistics from the point-of-service printer. |
Events
StatusUpdated |
Occurs when the status of the power or availability of the point-of-service printer changes. |