diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 4738ea92974..e8e43281d79 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2020 Andreu Bisquerra * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,19 +33,16 @@ * Use font C of printer * Text Bold * Disable Text Bold - * Text double height - * Text double width - * Underline text - * Underline with double line - * Emphasized text - * Print in white on black - * Ticket print width of 57mm + * Text double height + * Text double width + * Text default height and width + * Underline text + * Disable underline text * Cut ticket completely * Cut ticket partially * Open cash drawer - * Activate buzzer + * Activate buzzer * Print barcode - * Print QR Code * Print logo stored on printer. Example : 32|32 * Print logo stored on printer. Must be followed by logo code. For old printers. * Print object lines @@ -165,24 +163,15 @@ class dolReceiptPrinter extends Printer 'dol_bold', 'dol_bold_disabled', 'dol_double_height', - '/dol_double_height', 'dol_double_width', - '/dol_double_width', + 'dol_default_height_width', 'dol_underline', - '/dol_underline', - 'dol_underline_2dots', - '/dol_underline', - 'dol_emphasized', - '/dol_emphasized', - 'dol_switch_colors', - '/dol_switch_colors', - 'dol_set_print_width_57', + 'dol_underline_disabled', 'dol_cut_paper_full', 'dol_cut_paper_partial', 'dol_open_drawer', - //'dol_activate_buzzer', + 'dol_beep', 'dol_print_text', - 'dol_print_qrcode', 'dol_print_barcode', 'dol_value_date', 'dol_value_date_time', @@ -718,6 +707,24 @@ class dolReceiptPrinter extends Printer break; case 'DOL_BOLD_DISABLED': $this->printer->setEmphasis(false); + break; + case 'DOL_DOUBLE_HEIGHT': + $this->printer->setTextSize(1, 2); + break; + case 'DOL_DOUBLE_WIDTH': + $this->printer->setTextSize(2, 1); + break; + case 'DOL_DEFAULT_HEIGHT_WIDTH': + $this->printer->setTextSize(1, 1); + break; + case 'DOL_UNDERLINE': + $this->printer->setUnderline(true); + break; + case 'DOL_UNDERLINE_DISABLED': + $this->printer->setUnderline(false); + break; + case 'DOL_BEEP': + $this->printer->getPrintConnector() -> write("\x1e"); break; default: $this->printer->text($vals[$tplline]['tag']); diff --git a/htdocs/langs/en_US/receiptprinter.lang b/htdocs/langs/en_US/receiptprinter.lang index f79974558d6..9a3b28fa399 100644 --- a/htdocs/langs/en_US/receiptprinter.lang +++ b/htdocs/langs/en_US/receiptprinter.lang @@ -47,3 +47,10 @@ DOL_PRINT_LOGO=Print logo of my company DOL_PRINT_LOGO_OLD=Print logo of my company (old printers) DOL_BOLD=Bold DOL_BOLD_DISABLED=Disable bold +DOL_DOUBLE_HEIGHT=Double height size +DOL_DOUBLE_WIDTH=Double width size +DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size +DOL_UNDERLINE=Enable underline +DOL_UNDERLINE_DISABLED=Disable underline +DOL_BEEP=Beed sound +DOL_PRINT_TEXT=Print text