Class RawPrinterHelper
Utility class to send raw data to a printer queue, becase .Net library does not provide this functionalyty, it uses the pinvoke to call library functions
Inherited Members
Namespace: Reportman.Drawing.Forms
Assembly: Reportman.Drawing.Forms.dll
Syntax
public class RawPrinterHelper
Constructors
RawPrinterHelper()
Declaration
public RawPrinterHelper()
Methods
SendBytesToPrinter(string, byte[])
Sends a bytes to printer, in raw mode, useful for dot matrix printers or pos devices
Declaration
public static bool SendBytesToPrinter(string printerName, byte[] abytes)
Parameters
| Type | Name | Description |
|---|---|---|
| string | printerName | Printer name |
| byte[] | abytes |
Returns
| Type | Description |
|---|---|
| bool | Returns true if successful |
SendFileToPrinter(string, string)
Sends a full file to the printer in raw mode, useful for dot matrix printers or pos device
Declaration
public static bool SendFileToPrinter(string printerName, string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | printerName | Printer name |
| string | fileName | Full parh to the file to send |
Returns
| Type | Description |
|---|---|
| bool | Returns true if sucessful |
SendStringToPrinter(string, string)
Sends a string directly to printer, in raw mode, useful for dot matrix printers or pos devices
Declaration
public static bool SendStringToPrinter(string printerName, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | printerName | Printer name |
| string | text | Text to send |
Returns
| Type | Description |
|---|---|
| bool | Returns true if successful |
SendStringToPrinterAsync(string, string)
Sends a string directly to printer, in raw mode, useful for dot matrix printers or pos devices
Declaration
public static Task SendStringToPrinterAsync(string printerName, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | printerName | Printer name |
| string | text | Text to send |
Returns
| Type | Description |
|---|---|
| Task | Returns true if successful |