sending data to a printer over v.24 rs232 interface to a printer under windows

Peter Alcibiades palcibiades-first at yahoo.co.uk
Thu Mar 4 04:44:59 EST 2010


It was easy enough in Linux that even I could do it, and I think it works the
same way in Windows.  The problem is essentially one of printing to a
printer without having a driver.  You first set up the printer as a raw
printer, which seems from googling to be possible in Windows.  Then you have
to invoke a command line utility to send the character stream directly to
the interface.  You do have to know what the control characters are.  And
you do have to put the control characters into a text file using a hex
editor.  At least I did.  And there may be problems with print queue
management and recognizing the printer if it is powered on after the
computer.  You have to be careful, if you use some way of sending the
characters that has no queue management, that a failed print cannot block
subsequent attempts.  Which is why my Linux friends told me to use lp + raw
printer name, rather than simple cat >.  I think you can use lp in Windows
also.  

The way I do it is to have one text file for each command, and then I send
the text file in its entirety when I want the action to take place.  So for
instance, printing is simply a dump of the characters to be printed.  To
operate the cutter is sending the file with those hex characters in it.  To
set the font to a given size is sending the file with those hex characters
in it, and so on.  Its brute force, but it should be pretty easy to get
something working.

Peter
-- 
View this message in context: http://n4.nabble.com/sending-data-to-a-printer-over-v-24-rs232-interface-to-a-printer-under-windows-tp1575516p1577818.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list