Raspberry Pi interfacing a thermal Printer

Printer Test

 

What do you get if you combine a Raspberry-Pi and a small thermal printer like those sold by Adafruit or Sparkfun?

I don’t know. You could build anything that includes a Raspberry-Pi and a small printer.

However my idea was to write a small script that could capture web pages, save them as image and print them. With this one can grab content from remote web pages or from a webserver running on the pi itself. Here some examples:

OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA OLYMPUS DIGITAL CAMERA

 

Above you can see some logos captured from Adafruits and Hackadays web pages and the capture of an austrian news site.

You can find the sources for capturing web pages and for the printer class on GitGub:

To build those projects one needs to have Qt installed. To have this scripts running without an active X-Server one can either use Xvfb which gives a virtual framebuffer running X or one can use the build system of phantomJS. phantomJS is a great javascript library which can be used to create web applications in javascript. It enabled you to build a complete QT framework that can run without a X server at all (compiling QT with QWebKit on the Raspberry-Pi can take up to two days, don’t forget to increase the size of your swap file, otherwise the build will fail!).

 

Leave a Reply

Your email address will not be published. Required fields are marked *


× nine = 54

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>