Return to site

Flexmail send directly to printer

broken image

WritePrinter(lhPrinter,PCL5Commands,PCL5Commands.Length, ref pcWritten) OpenPrinter(printerName, ref lhPrinter,0) System.IntPtr lhPrinter= new System.IntPtr() Public static void SendToPrinter( string jobName, string PCL5Commands, string printerName) Public static extern long ClosePrinter(IntPtr hPrinter) Public static extern long EndDocPrinter(IntPtr hPrinter) Public static extern long EndPagePrinter(IntPtr hPrinter)

broken image

[ DllImport( 'winspool.drv' ,CharSet=CharSet.Unicode,ExactSpelling= true , Public static extern long WritePrinter(IntPtr hPrinter, string data, [ DllImport( 'winspool.drv',CharSet=CharSet.Ansi,ExactSpelling= true , Public static extern long StartPagePrinter(IntPtr hPrinter) Public static extern long StartDocPrinter(IntPtr hPrinter, Public static extern long OpenPrinter( string pPrinterName, Ref int pcchBuffer // size of name buffer StringBuilder pszBuffer, // printer name buffer Public static extern bool GetDefaultPrinter( I have attempted using the following code to produce the results: They want this to print directly to their printer.

broken image

This text file contains commands that is used by their thermal printer, i.e.:

broken image

I have a client that has a process which builds a text file.

broken image