receipt-print-hq / chrome-raw-print

Chrome app to enable raw printing from a browser
MIT License
67 stars 23 forks source link

Enable ESCPOS commands to be printed via browser with standart print dialog (eg. Chrome) with Generic/Text driver #16

Open tjunussov opened 7 years ago

tjunussov commented 7 years ago

This is not issue, I write you directly, but think my message get to spam,

I found interesting proposal here Request for printing ZPL codes directly to Generic/Text printer (100.000+ barcode printers use ZPL), and I saw that google guys responding to this issue, and I wrote them new issue about ESC/POS support with GenericText Raw printing

Think about it, if they allow directly write ASCI ( ESC/POS ) formatted text to GenericText Raw printer, when all that staff with USB devices, and middleware would gone...

Mike and Others, Could you please answer to Google guys about this topic https://bugs.chromium.org/p/chromium/issues/detail?id=764669, at least vote it ?

ps As I understood, it is possible to pass data to printer, but the other team wich is responsible to drawing ESCPOS data in "print preview window " dont know hot to render it in "skia" ?, i think they can at lease render it as simle text without formatting, or it not so hard to implement rendering ESCPOS formated ASCI to PDF, Mike already dit it ti IMAGE

tjunussov commented 6 years ago

Why nobody react to this post ? It would be great feature, you would print from JS code directly to Themal Printer via Browser without any middleware

mike42 commented 6 years ago

Hi, good feature request, and I agree that it would be useful.

You are clearly aware that HTML -> ESC/POS printing in a browser currently involves creating a raster of the page or falling back to plaint ext, both of which are pretty bad, hence the need for raw printing.

I have seen that thread, but I don't think that raw printing is a good move for browsers. In the case of ESC/POS printers, they are configured in-band and do not expect malicious input, so an intentionally malformed print job would do a lot of damage.

I believe that exposing hardware features over a local web agent would be an acceptable way for users to opt-out of the regular printing system to perform kiosk printing, since you also need to bypass the print dialog. While we wait for the Web-USB API (USB or USB/Serial or USB/Parallel) to let users connect to local printers from the browser, you can already do any kind of printing from a browser in Linux with a WebSocket/TCP gateway plus socat!