Changes

Sticker printer

183 bytes added, 09:27, 18 May 2015
/*QR Codes*/ Updated printing method, lowering the print time to 3 sec
Print all the things!
Using the thermal sticker printer (located on the shelf with the coffee machine wooden crate across from tron next to the fridgeelevators), 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 ==
=== QR codes ===
Printing QR codes is quite easy, all you need to do is to go to the URL that's type in your URLs or text on the sticker on giant screen behind the printer, and you can print directly URLs or text. 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, make sure that the printer is on, then expect to wait 8it will take 3~15 5 seconds for the QR code to generate, spool, and print. The auto-cut functionality is disabled (otherwise all the stickers would fall into the void), so you need to push the cut button to get the sticker from the printer. 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 + bash (meh)python, and currently fetches generates the QR codes from Googleusing [[QR_codes#QR_from_stdin | python's depreciated QR code generating 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://chart.googleapisgithub.com/chart?cht=qr&chs=300x300&chl=text service]. It then spools it with <code>lp<sudomesh/code>, ql570 reverse engineered program] which prints it over is significantly faster than CUPS. As soon as I 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 figure out how be optimized to print properly formatted pages almost instantly with js a bit of hacking. If someone wants to write an app in them, C that generates the service will likely be migrated locallyright kind of QR code and then prints it with the ql570 printer library, possibly even using things like [http://bitcoinqrcode.org/ this] for bitcoins. 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 ===
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).
<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
462
edits