I'm trying to use MS PosPrinter into UWP app, my Epson Tm-T20II printer is installed and can print using Epson oPos setup utility.
Even I installed the full windows driver and it works.
My problem comes when I run this:
DevicePicker devicePicker = new DevicePicker();
devicePicker.Filter.SupportedDeviceSelectors.Add(PosPrinter.GetDeviceSelector());
// Anchor the picker on the Find button.
GeneralTransform ge = FindButton.TransformToVisual(Window.Current.Content as UIElement);
Rect rect = ge.TransformBounds(new Rect(0, 0, FindButton.ActualWidth, FindButton.ActualHeight));
DeviceInformation deviceInfo = await devicePicker.PickSingleDeviceAsync(rect);
rootPage.deviceInfo = deviceInfo;
PosPrinter printer = null;
if (deviceInfo != null)
{
printer = await PosPrinter.FromIdAsync(deviceInfo.Id);
}
await PosPrinter.FromIdAsync(deviceInfo.Id)
always return:
System.Exception: 'A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)'
This is my test from oPos setup.
Some Idea about this problem?
User contributions licensed under CC BY-SA 3.0