开发者

printing to a dot matrix printer on a mac

So i am designing an art project that will print to a dot matrix printer the contents of my internet history. i have found info online to parse out a plist (what os x uses to store internet history) so im all set on that front but what i am looking to find out is how to send a request to the printer to print a new line, which would happen when a new page is visited. i was wondering if it is possible in any of the following languages: objective-c, javascript, php, or开发者_如何学Go processing/java, all of which i have a decent understanding of. I am have tried to do a little research before asking here and it seems like i may need to use shell commands, which i am not familiar with at all. the printer i will most likely be using is an EPSON LX-300 Dot Matrix Printer if that matters. i would like to do this on os x, but if i have to use windows that is an option. if anyone knows how to do this or can give me some direction that would be a huge help. thanks


Here is how I might do it.

First, I suppose I might look around for a dot matrix printer with a modern interface and a Mac OS X driver. There might still be people printing multipart forms who need impact printers.

But failing that, I would then look for a serial (as in, RS-232 serial) printer and connect it to my mac via a USB-to-RS232-serial converter. Be careful, most of the generic such things don't work on the Mac, get a USB serial widget like this that specifically supports the mac.

Then, I would write the code in sh/bash and run it in a Terminal window. Those language systems you cite are overkill for this job, some lack system interfaces entirely, and the ones that can turn system knobs do it via complex interfaces. It's better to put together stty(2), echo(1), cat(1) et al and just get some strings to print.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜