Printing Single Line without formfeed on Dot matrix Printer

How would you print a single line at a time to a dot matrix printer without the driver causing a formfeed. The line actually has to print on the paper. Just buffering lines until you have a page full is not what is needed. Microsoft had raw.drv for 16 bit apps that worked. Haven't seen anything for 32 programming. Thanks.
glaporteAsked:
Who is Participating?
 
dnavarroConnect With a Mentor Commented:
Simply open the printer as a file and print to it.  From Visual Basic:

OPEN "LPT1" FOR OUTPUT AS #1
PRINT  "This is my text";   <--  The semicolon is the key
CLOSE

We use EPSON dot matrix printers here at work for printing labels and this is how we print to the printers without going through the printer drivers.

--Dave

0
 
dnavarroCommented:
Oops, I meant:

PRINT#1, "This is my text";

--Dave
0
 
glaporteAuthor Commented:
Use CreateFile() for opening the port.
WriteFile() to write to the port.
CloseHandle() for closing the port.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.