I am following the example from the following Repo: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/PosPrinter.
In the Scenario1_ReceiptPrinter.xaml.cs I have modified the FindReceiptPrinter to run a FindAllAsync() like below:
DeviceInformationCollection deviceCollection = await DeviceInformation.FindAllAsync();
When running the function that way versus passing in a device selector I am able to find the device ID which matches the printer SymbolicName in my Registry for the installed printer. However, the printer object is always null even when I explicitly pass in the printer Id.
I'm not sure if there is an issue with the way my printer is installed or if I need to call it differently when it is a USB Printer. Below are some screen shots of my modified code for debugging purposes:
Device Collection Populated:
Printer Found:
Printer Object Null:
According to the official document, USB connected printers are currently not supported.
Support is currently limited to the Network and Bluetooth device models listed in the tables below. USB connected printers are currently not supported. Please check back for additional support to be added in the future.
For mor info, please see Device support in POS Printer.