I want to make a program that turns a printer to a typewriter: you type a character, it is printed immediately, the page only goes up when a line is finished and only a bit etc.
The question is, is this possible to do with JAVA?
Printable View
I want to make a program that turns a printer to a typewriter: you type a character, it is printed immediately, the page only goes up when a line is finished and only a bit etc.
The question is, is this possible to do with JAVA?
you want the printer to print one character at a time, and pause until you type another character? As in the printer actually printing letter by letter upon keypress?
That is what I thought you meant by your question...
By printing less than the height of a character, you probably mean a more modern printer which makes several passes to complete the height of one line of text, and you would be correct.
However, on that note, some printers that print in this manner (my inkjet for example), rolls the page up and down per section adding different colors with multiple side-to-side passes. To watch the page print, it moves up and down about 1/2" several times before scrolling to the next ~1/2" section.
I am not very experienced in printers as far as your question goes, but I would guess it would be possible to do, however making it happen may force you to dig into the driver for the printer.
Hopefully someone with more info can post details. I would like to know if it is possible myself.
...Not that I can think of a reason to do it, other than to say you did it, but I find it interesting just the same...
Did you try reading PrinterJob JavaTM 2 Platform
Std. Ed. v1.4.2 ? And by using this, record Graphics on the printer. You must have to work a little to accomplish your requirements.