diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 4738ea92974..0c37832f00c 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']); @@ -826,3 +833,4 @@ class dolReceiptPrinter extends Printer return $error; } } +