Пример #1
0
 public void StartDocument()
 {
     if (_hprinter == IntPtr.Zero)
     {
         _hprinter = PrinterHelper.GetPrinter(_printerName);
     }
 }
Пример #2
0
        public static void SendBytesToPrinter(string szPrinterName, byte[] pBytes)
        {
            var hPrinter = PrinterHelper.GetPrinter(szPrinterName);
            int dwWritten;

            if (!PrinterHelper.WritePrinter(hPrinter, pBytes, pBytes.Length, out dwWritten))
            {
                BombWin32();
            }
            PrinterHelper.EndPrinter(hPrinter);
        }