/// <summary> /// When printing the order/invoice, this method inserts the header of document, with logo or company details. /// The original method has been overloaded to allow to remove some details from order document. /// Please see IN009055 for more details. /// </summary> /// <param name="isOrder">"true" when Order, and "false" when Invoice</param> protected void PrintHeader(bool isOrder) { try { //Align Center _thermalPrinterGeneric.SetAlignCenter(); string logo = string.Format( @"{0}{1}", GlobalFramework.Path["assets"], _companyLogo ); //Print Logo or Name + BusinessName //TK016249 - Impressoras - Diferenciação entre Tipos if (File.Exists(logo) && GlobalFramework.LoggedTerminal.ThermalPrinter.ThermalPrintLogo) { _thermalPrinterGeneric.PrintImage(logo); } else if (isOrder) /* IN009055 */ { _thermalPrinterGeneric.WriteLine(_customVars["COMPANY_BUSINESS_NAME"], WriteLineTextMode.DoubleHeightBold); } else { _thermalPrinterGeneric.WriteLine(_customVars["COMPANY_BUSINESS_NAME"], WriteLineTextMode.Big); _thermalPrinterGeneric.WriteLine(_customVars["COMPANY_NAME"]); } //Reset to Left _thermalPrinterGeneric.SetAlignLeft(); //Line Feed _thermalPrinterGeneric.LineFeed(); } catch (Exception ex) { _log.Error(ex.Message, ex); throw ex; } }
protected void PrintHeader() { try { //Align Center _thermalPrinterGeneric.SetAlignCenter(); string logo = string.Format( @"{0}{1}", GlobalFramework.Path["assets"], _companyLogo ); //Print Logo or Name + BusinessName if (File.Exists(logo) && GlobalFramework.LoggedTerminal.Printer.ThermalPrintLogo) { _thermalPrinterGeneric.PrintImage(logo); } else { _thermalPrinterGeneric.WriteLine(_customVars["COMPANY_NAME"], WriteLineTextMode.Big); _thermalPrinterGeneric.WriteLine(_customVars["COMPANY_BUSINESS_NAME"]); } //Reset to Left _thermalPrinterGeneric.SetAlignLeft(); //Line Feed _thermalPrinterGeneric.LineFeed(); } catch (Exception ex) { _log.Error(ex.Message, ex); throw ex; } }