0

I need to print labels in a UWP application. It's intended to function as a customer facing Kiosk which makes the standard UWP printing options unattractive, because they require the user to click through a windows print confirmation dialog.

Automatic printing is only possible using the POS (Point Of Sale) printing mode. Microsoft's documentation lists several receipt only (not label) printers as having been tested/proven compatible but that other ESC/POS mode printers may work.

Windows supports network and Bluetooth connected receipt printers using the Epson ESC/POS printer control language. The printers listed below are discovered automatically using POSPrinter APIs. Additional receipt printers which provide an ESC/POS emulation may also work but would need to be associated using an out of band pairing process.

I have a Brother QL-810W label printer, that I've put into ESC mode using Brother's configuration software and connected via USB. Unfortunately it's not currently being detected by the POS printing app from Microsoft's UWP sample/demo application collection.

The MS documentation mentions possibly needing an "out of band pairing", I would assume that's limited to setting up bluetooth printers. However the link associated with the text has gone bad, in that the page it redirects to doesn't say a word about pairing.

Terry Warwick
  • 235
  • 2
  • 7
  • Check following webpage and check to make sure you have correct driver installed : https://support.bindo.com/article/40-setting-up-the-brother-label-printer-with-windows – jdweng Sep 06 '18 at 15:04
  • @jdweng the brother drivers are installed, and outside of in POS mode I can print with the printer. – Dan Is Fiddling By Firelight Sep 06 '18 at 15:08
  • Change the default printer options in the driver : http://support.brother.com/g/b/faqend.aspx?c=us&lang=en&prod=hl2230_us&faqid=faq00003060_001&pfs=1 – jdweng Sep 06 '18 at 15:36
  • @jdweng Which options to what? The printer is set to ESC/P mode, and none of the other settings available in my printers settings tool (which looks completely different than the XP era software for the printer whose docs you linked to) seem relevant. I don't see an equivalent pictoral document, but the settings available for the 810W are listed beginning on p38 in this PDF http://download.brother.com/welcome/docp100287/cv_ql820nwb_useng_usr_c.pdf – Dan Is Fiddling By Firelight Sep 06 '18 at 16:02
  • If your application was just sending text to the print driver and letting the default settings in the printer select the font and font size there would be know issue. But there is a driver and the application is looking at the driver settings to determine the font and font size. Font and size is done by using a best match between the app and the driver. So changing the driver settings in the device manager where the printer is installed may solve issue. – jdweng Sep 06 '18 at 17:54
  • @jdweng Anything related to fonts/etc are beyond the point I'm currently at. My problem is that unlike the normal print APIs, the POS one refuses to acknowledge the printer exists. I've been all over the printer settings app and nothing other than setting ESC/P mode in brothers app looks even vaguely relevant, and there's zero documentation from MS that I can find about what else might be needed. Without some idea of what to look for a generic "look at the settings" is just repeating what I'd done prior to posting here. – Dan Is Fiddling By Firelight Sep 06 '18 at 18:19
  • The POS is refusing to print because the FONT selected isn't compatible. The print driver is sending a command selecting a mode not supported by the printer. Configuring the driver to use a different mode is the solution. – jdweng Sep 06 '18 at 20:31
  • my problem is not detecting the printer, not detecting and failing when it tries to print where a font problem would be a more plausible source of error. That said, the printer is in ESC/P mode, the one that MS's documentation says is appropriate, although I've tried the other 2 (raster and ptouch template) neither works either. – Dan Is Fiddling By Firelight Sep 06 '18 at 21:10
  • The printer configuration tools from Brother and Windows themselves don't allow specifying a font. Drilling into the sample app, neither `Windows.Devices.PointOfService.PosPrinter.GetDeviceSelector()` nor `Windows.Devices.Enumeration.DeviceInformation.CreateWatcher()` take a font parameter (and the latter returning nothing that is my visible point of failure), so where could the invalid font you think is the problem be getting set? – Dan Is Fiddling By Firelight Sep 06 '18 at 21:10
  • It is not getting set (or set so for a mode the POS does not accept) and that is why the POS is refusing to ACK. – jdweng Sep 06 '18 at 21:45
  • Again, where should it be getting set? – Dan Is Fiddling By Firelight Sep 06 '18 at 21:52
  • As what I can see, the [out of band pairing](https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/point-of-service#out-of-band-pairing) has a series of documents to use `Windows.Devices.PointOfService` to interact with peripherals found in retail and hospitality environments, have you tried them? – Breeze Liu - MSFT Sep 10 '18 at 05:31
  • @BreezeLiu-MSFT Yes, I've read the documents on that page none of which correspond to the #out-of-band-pairing anchor (which is why I called the link as broken above) or explain what is needed beyond simply installing the Brother drivers and setting the printer in ESC/P mode via their setting tool. I've done that, but your POS Printing sample fails to detect the printer and I'm unable to proceed as a result. – Dan Is Fiddling By Firelight Sep 10 '18 at 17:24

1 Answers1

2

@Dan Neely,

The fundamental problem that you are encountering is that the Brother QL-810W label printer supports ESC/P as opposed to ESC/POS. These are two printer control languages both designed by Epson, but they are not the same. ESC/P is used for page printers and ESC/POS is used for receipt printers. Furthermore, the documentation that you cite states that our ESC/POS implementation supports network and Bluetooth attached printers with no mention of USB connections. The out of band pairing, which is simply a manually authored connector string, will not help in this situation due to the two issues noted above.

The only way to interact with a USB connected printer via Windows.Devices.PointOfService at the time of this response is through our OPOS Bridge implementation which requires the installation of OPOS and a OPOS service object from the hardware vendor. If OPOS is in a working state, we will attempt to communicate with the OPOS Common Controls however Brother does not offer an OPOS service object for this printer today.

In the future we hope to provide support for additional printer control languages and modern driver interfaces that do not require OPOS to access a locally connected printer.

Please use the PointOfService tag when referring to implementations using the Windows.Devices.PointofService API namespace to make it easier for us to find questions on this topic in the future.

Terry Warwick, Microsoft

Terry Warwick
  • 235
  • 2
  • 7