Difference between revisions of "Sticker printer"
(Added post stamp printer) |
(→QR Codes: Updated printing method, lowering the print time to 3 sec) |
||
Line 1: | Line 1: | ||
Print all the things! | Print all the things! | ||
− | Using the thermal sticker printer (located on the | + | Using the thermal sticker printer (located on the wooden crate across from tron next to the elevators), you can print all sorts of fun things, notably QR codes (with links to stuff, text, phone numbers, btc addresses,...). The printer is a [http://support.brother.com/g/b/producttop.aspx?c=gb&lang=en&prod=lpql700euk Brother QL-700], a 300dpi b/w thermal (no ink) sticker/label printer that is connected via the Pi used for the [[doorbell]]. |
== Features == | == Features == | ||
=== QR codes === | === QR codes === | ||
− | Printing QR codes is quite easy, all you need to do is to | + | Printing QR codes is quite easy, all you need to do is to type in your URLs or text on the giant screen behind the printer. For vcards, btc addresses, and other 'fancy' QR codes, you will need to write in the syntax yourself (e.g. <code>bitcoin:161s5cgPRMvyVNaCu3zcgXxVeKpUTXGIOU</code>). After you click the print button, it will take 3~5 seconds for the QR code to generate, and print. You are encouraged to use these stickers responsibly (for example, shalf doesn't like when a qr code with 'penis' is stuck on his macbook charger). |
− | The interface is written in html + php + | + | The interface is written in html + php + python, and currently generates the QR codes using [[QR_codes#QR_from_stdin | python's qrcode library]], and then resizes them to max size (720x720px - somewhere bigger than that the printer crashes) using the imaging library. It then prints directly to the printer device file using a [https://github.com/sudomesh/ql570 reverse engineered program] which is significantly faster than CUPS. Whereas in the first iteration (generating QR codes using Google's API + spooling and printing over CUPS) took 15-20 seconds per sticker, the current version takes 3-5 seconds and can be optimized to print almost instantly with a bit of hacking. If someone wants to write an app in C that generates the right kind of QR code and then prints it with the ql570 printer library, please feel free to do so! |
+ | |||
+ | |||
+ | Other future feature ideas include: detailed print status, advanced QR code generation (vcard, sms, geolocation, calendar, wifi,...), QR code settings, or even your suggestions. | ||
=== Text === | === Text === | ||
Line 40: | Line 43: | ||
Then print with <code>lp -d Brother_QL-700 file.jpg</code>. Use <code>-o media=Custom.62x13mm</code> for custom size (theoretically unlimited length, but do note that the roll costs ~18 chf). | Then print with <code>lp -d Brother_QL-700 file.jpg</code>. Use <code>-o media=Custom.62x13mm</code> for custom size (theoretically unlimited length, but do note that the roll costs ~18 chf). | ||
− | Challenge: disable standby/find a way to wake form standby | + | <s>Challenge: disable standby/find a way to wake form standby</s> use the brother utility on a windows or mac to disable this |
http://download.brother.com/welcome/docp000675/ql700_ukeng_usr_b.pdf | http://download.brother.com/welcome/docp000675/ql700_ukeng_usr_b.pdf |
Revision as of 12:27, 18 May 2015
Print all the things!
Using the thermal sticker printer (located on the wooden crate across from tron next to the elevators), you can print all sorts of fun things, notably QR codes (with links to stuff, text, phone numbers, btc addresses,...). The printer is a Brother QL-700, a 300dpi b/w thermal (no ink) sticker/label printer that is connected via the Pi used for the doorbell.
Contents
[hide]Features
QR codes
Printing QR codes is quite easy, all you need to do is to type in your URLs or text on the giant screen behind the printer. For vcards, btc addresses, and other 'fancy' QR codes, you will need to write in the syntax yourself (e.g. bitcoin:161s5cgPRMvyVNaCu3zcgXxVeKpUTXGIOU
). After you click the print button, it will take 3~5 seconds for the QR code to generate, and print. You are encouraged to use these stickers responsibly (for example, shalf doesn't like when a qr code with 'penis' is stuck on his macbook charger).
The interface is written in html + php + python, and currently generates the QR codes using python's qrcode library, and then resizes them to max size (720x720px - somewhere bigger than that the printer crashes) using the imaging library. It then prints directly to the printer device file using a reverse engineered program which is significantly faster than CUPS. Whereas in the first iteration (generating QR codes using Google's API + spooling and printing over CUPS) took 15-20 seconds per sticker, the current version takes 3-5 seconds and can be optimized to print almost instantly with a bit of hacking. If someone wants to write an app in C that generates the right kind of QR code and then prints it with the ql570 printer library, please feel free to do so!
Other future feature ideas include: detailed print status, advanced QR code generation (vcard, sms, geolocation, calendar, wifi,...), QR code settings, or even your suggestions.
Text
Prints in a monospaced font, 24 columns, no margins. A bit ugly, but there isn't an easy way to change the print settings. What I'm trying to do right now is to figure out how to print a properly formatted page, and if that's possible, then printing text or other fancy elements would be easier.
Images
Supports printing images, but this feature is deactivated currently due to security considerations. Although it appears to print in greyscale, this scale isn't too large - so low contrast/dark pictures won't print well. Lots of fun things can be done with images:
Bitcoin wallets
In development. Uses electrum to generate new wallets, and then generates QR codes for the public and the private keys. If there is no activity with the wallet after 6 months, the bitcoins will be taken back to avoid loss.
Post stamps
Buy post stamps via webstamp with bitcoins and then print them out.
Resources
wget http://download.brother.com/welcome/dlfp002192/ql700lpr-1.0.1-1.i386.deb sudo dpkg -i --force-all ql700lpr-1.0.1-1.i386.deb sudo apt-get install cups sudo usermod -a -G lpadmin pi sudo nano /etc/cups/cupsd.conf // I don't actually remember what I did here sudo service cups restart
Then print with lp -d Brother_QL-700 file.jpg
. Use -o media=Custom.62x13mm
for custom size (theoretically unlimited length, but do note that the roll costs ~18 chf).
Challenge: disable standby/find a way to wake form standby use the brother utility on a windows or mac to disable this
http://download.brother.com/welcome/docp000675/ql700_ukeng_usr_b.pdf