i m using Dotmatrix printer EPSON for printing the reports, and i need the of how to print the reports without using crystalReport and print dialog, i.e. i want the code for DOS based printing in C#.net.........
+2
A:
I know a very old and dirty way. Just open LPT1 (or the printer port you are using) as a stream and output the characters.
tekBlues
2009-06-18 17:14:28
I have done this with C# and it works fine with the old printers. Obviously, it is your responsibility to dump the formatting codes down the stream as well, but it is easier than one would think (impact printers come from a simpler time).
Godeke
2009-06-18 17:20:30
A:
Does your printer appear in windows? In other words, can your print to it from notepad? Then you can still use the System.Drawing.Printing namespace and send data to your printer that way.
This is if you need to print anything other than character data - otherwise, do like tekBlues said.
hometoast
2009-06-18 17:17:35
This works great, we use it all the time when we have 'print ready' files such as PCL, Postscript, PPDS etc. that we've created programatically in our apps. Simply install printer in Windows using whatever driver you want (doesn't matter) and connect it to the port where the printer is. Use this code and it will be spooled through the Windows printer queue.
Douglas Anderson
2009-06-18 18:06:02