Dotmatrix printer - again

  • Thread starter Thread starter Claudio
  • Start date Start date
C

Claudio

I asked if there was a way to print directly to a dotmatrix printer. The
answer was yes, but I need to know how to do it.
 
If the Printer has Windows Drivers, you can use the Classes in the
namespace: System.Drawing.Printing
 
Hi Claudio, again ;)


I told you yes, it's possible just open the port and send the data to it.
Depending of the printer you may need the contorl characters or not.

I have done this using a serial Epson printer.
 
Ok, I don't see a problem here, you can use the printing clases to print
text to any printer that have a windows driver.

I don't know if I get you rigth, but you like to connect and send low level
printer comands for the port lpt1?

Regards,
 
Yes, I want to send low level (like: expand and compact charater comands)
and text, for the port lpt1 or a remote printer (\\servername\printername).
 
How did you do it? What functions you open the COM port? It is possible to
do the same for a LPT port?
 
If you like to Open the port ltp1 from C# you need to call the windows API
CreateFile
 
Hi,



Bela Istok said:
If you like to Open the port ltp1 from C# you need to call the windows API
CreateFile

That's correct.

IIRC there is an article in either MSDN mag or gotdotnet about how to do
this. I used it last year when I had the same issue.
 
Hi,


Claudio said:
Yes, I want to send low level (like: expand and compact charater comands)
and text, for the port lpt1 or a remote printer
(\\servername\printername).


That may be another completely different history, you never mentioned
nothing about it being remote. If so you cannot use the port directly. You
will depend of the windows driver you have installed in your local computer
 
I know I need the driver. What I want is to send text and control characters
directly to a printer. I do not want use windows spool to manage the
printing job. I have already done it, using the API CreateFile function. It
is working well. Thanks for the help.
 
Back
Top