
Public static bool SendBytesToPrinter(string szPrinterName, IntPtr pBytes, Int32 dwCount)īool bSuccess = false // Assume failure unless you specifically succeed. SendBytesToPrinter(szPrinterName, pBytes, dwCount) Send the converted ANSI string to the printer. PBytes = Marshal.StringToCoTaskMemAnsi(szString) Assume that the printer is expecting ANSI text, and then convert How many characters are in the string?

Public static bool SendStringToPrinter(string szPrinterName, string szString) RawPrinterHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName, s)
