jimbauwens
Joined 8 years ago
Joined 8 years ago
In the shared link you can find a demo that I made in 2011 that allows you to print directly to many local network printers. I tried it today, and it still work in both Firefox and Chrome. It uses an XMLHttpRequest to send a request to printers on port 9100. Most printers will receive the HTTP request and parse it as a raw print job. In normal cases, the printer will just print the HTTP headers, however I use some control characters to escape to the PJL (print job language) world, where I reset the page by drawing a blank box over the headers and move the cursor to the top left. Besides PJL, it is possible to send postscript data as well.
This is extremely scary, as most printers allow you to perform firmware updates and more over PJL. But, as the Chromium team told me in 2011, this WONTFIX as it is the fault of your printer for being insecure.
You misled people and breached their privacy. This is as simple as it gets, even if it was for an experiment (though leaving the site online in some other form still raises a lot of question marks..).
My advice for you is to perform future experiments locally, not on the web and make sure people participating in your experiment are aware.
Here you go: https://github.com/jimbauwens/literature-clock-console .
It's a very simple node.js application. If you don't like node.js the logic can be easily ported to any other language. I just didn't feel like parsing the data files with a shell script.
Additionally, it'll help you stick to a compatible model that'll work with the framework itself.
I agree that the Windows-specific concept is a bit odd .. but then again maybe it can be one layer of a larger multi-os compatible framework in the future.