August 13th, 2003, 05:38 PM
sending bytes of a file to a printer
I am writing a program for my fathers company that takes AutoCAD plot files and sends them to the printer of their choice. I created a sort of "Windows Explorer" look where they can choose files that then go into a queue and are printed. I'm new to C# but have a lot of experience in Java and C++ so the general information to get me this far hasn't been difficult. I need help, however, accessing the printers.
August 20th, 2003, 01:57 AM
Interesting, I wanna know how to send file directly to printer as well
I use System.Drawing.Printing.PrintDocument to print to default printer, which I have to render the pages by myself using GDI+ when a document.print event is raised.
August 20th, 2003, 11:41 PM
Sockets and File Streams
Thank you Oni9 for the input. I'll definately try it. I'm operating under the impression that the file is in the format the printer needs and that the file can't be sent to another file type. If it were a graphics file we wouldn't be having this conversation. What I think I'm finding is that the libraries for these high level languages aren't low level enough to tackle this. I'm now moving toward opening a socket directly to the printer (this bites because I have to know the IP address of each printer on the network) and sending the byte stream that way.