TextExport with TextExportPrinterType and TextExportPrinterCommand
Hello,
after defining printer specific PrinterCommands with class TextExportPrinterCommand and registering these commands into a printer of type TextExportPrinterType, I can use this printer with class TextExport. How will the TextExport class use the printer specific commando sequences?
Actually I created a test code similar to this :
How will the TextExport use the corresponding TextExportPrinterCOmmands?
With best regards- Ulrich
after defining printer specific PrinterCommands with class TextExportPrinterCommand and registering these commands into a printer of type TextExportPrinterType, I can use this printer with class TextExport. How will the TextExport class use the printer specific commando sequences?
Actually I created a test code similar to this :
TextExportPrinterType printer = new TextExportPrinterType();
printer.Name = "CustomPrinter";
TextExportPrinterCommand cmd_bold = new TextExportPrinterCommand();
cmd_bold.Name = "bold";
cmd_bold.SequenceOn = new List<byte>(new byte[2] { 27, 18 });
cmd_bold.SequenceOff = new List<byte>(new byte[2] { 27, 18 });
printer.Commands.Add(cmd_bold);
TextExport export = new TextExport();
export.PrinterTypes.Add(printer);
export.PrinterType = 0;
Stream stream = new MemoryStream();
export.Export(this.Report, stream);
TextExportPrint.PrintStream("CustomPrinter", "test", 1, stream);
How will the TextExport use the corresponding TextExportPrinterCOmmands?
With best regards- Ulrich
Comments
Ok, I see. Makes it sense to assign more than one PrinterCommand? They all will send before printing the document starts?
Can you give me an idea what for the PrinterCommand could be useful?
Best regards - Ulrich