Thermal printers: Difference between revisions

From PrePostPrint
(Added WebUSB resources)
 
(started cups/lp for thermal printing section)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
=== '''Thermal printer with a Web Browser''' ===
=== '''Thermal printer''' ===
 
=== '''Via a Web Browser''' ===
You can print “directly” from the browser to a printer using WebUSB.
You can print “directly” from the browser to a printer using WebUSB.


Web compatibility: <nowiki>https://caniuse.com/webusb</nowiki>
Web compatibility: [https://caniuse.com/webusb caniuse.com/webusb]


WebUSB Documentation: <nowiki>https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API</nowiki>
WebUSB Documentation: [https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API developer.mozilla.org/en-US/docs/Web/API/WebUSB_API]


==== Tools and libraries ====
==== Tools and libraries ====
- <nowiki>https://cellivar.github.io/WebReceiptLinePrinter/demo/</nowiki>
- [https://cellivar.github.io/WebReceiptLinePrinter/demo/ cellivar.github.io/WebReceiptLinePrinter/demo/=]
 
- [https://receiptline.github.io/designer/ receiptline.github.io/designer/=]
 
- [https://github.com/NielsLeenheer/WebUSBReceiptPrinter github.com/NielsLeenheer/WebUSBReceiptPrinter] (and a [https://noti.st/nielsleenheer/zP0qdm/slides fantastic talk] on how it was built)
 
==== Demo ====
Created in January 2024 in [[PPPrototypes workshop @ Césure]] by Thomas: [https://glitch.com/edit/#!/webusb2print glitch.com/edit/#!/webusb2print]
 
=== Thermal printers @ XPUB ===
Resources from our dear experimental publishers friends:
 
https://pzwiki.wdka.nl/mediadesign/Thermal_printers
 
=== Using the lp command from cups ===
https://openprinting.github.io/cups/


- <nowiki>https://receiptline.github.io/designer/</nowiki>
Bellow are examples, considering your thermal printer is the default one, otherwise you would have to precise which one you would like to print with, using the -d option :
lp image.png -d TM-T20II
Print text from standard input
echo hello | lp


- <nowiki>https://github.com/NielsLeenheer/WebUSBReceiptPrinter</nowiki> (and a [https://noti.st/nielsleenheer/zP0qdm/slides fantastic talk] on how it was built)
lp book.pdf -o PageSize=Custom.68.5x69mm


DEMO (created in January 2024 in [[PPPrototypes workshop @ Césure]])&nbsp;: <nowiki>https://glitch.com/edit/#!/webusb2print</nowiki>
==== Tools ====
- [https://git.vvvvvvaria.org/clemtre/banderole.sh banderole.sh] (CC4r) A tool for printing banners on cash receipts, it's 25 lines of shell using image magick to generate the text and lp to send it to the printer.

Latest revision as of 20:02, 12 February 2024

Thermal printer

Via a Web Browser

You can print “directly” from the browser to a printer using WebUSB.

Web compatibility: caniuse.com/webusb

WebUSB Documentation: developer.mozilla.org/en-US/docs/Web/API/WebUSB_API

Tools and libraries

- cellivar.github.io/WebReceiptLinePrinter/demo/=

- receiptline.github.io/designer/=

- github.com/NielsLeenheer/WebUSBReceiptPrinter (and a fantastic talk on how it was built)

Demo

Created in January 2024 in PPPrototypes workshop @ Césure by Thomas: glitch.com/edit/#!/webusb2print

Thermal printers @ XPUB

Resources from our dear experimental publishers friends:

https://pzwiki.wdka.nl/mediadesign/Thermal_printers

Using the lp command from cups

https://openprinting.github.io/cups/

Bellow are examples, considering your thermal printer is the default one, otherwise you would have to precise which one you would like to print with, using the -d option :

lp image.png -d TM-T20II

Print text from standard input

echo hello | lp
lp book.pdf -o PageSize=Custom.68.5x69mm

Tools

- banderole.sh (CC4r) A tool for printing banners on cash receipts, it's 25 lines of shell using image magick to generate the text and lp to send it to the printer.