Recently I needed to send raw data containing printer-specific control characters to a serial printer. At first I started looking into a solution through direct serial communication. But since .NET 1.1 does not come with serial communication support, and I needed to access printers over a network, it seemed logical to send the data through the native Win32 Spooler API.

After some googling and surfing I ended up finding this article in the Microsoft Knowledge Base. It exactly addresses the problem I had and contains full source code for a RawPrinterHelper class.