diff --git a/README.md b/README.md index 8a7ed6a..16a5ad0 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,7 @@ Prints a EAN8 barcode (height: 10mm, width: ~70% printer width, text: displayed Prints a UPC-A barcode (height: 20mm, width: ~70% printer width, text: displayed below). - `512789` : **(6 numbers)** Prints a UPC-E barcode (height: 25mm, width: ~50mm, text: hidden). -- `DantSu` : +- `DantSu` : **(string)** Prints a barcode 128 (height: 10mm, width: ~40mm, text: displayed above). **⚠ WARNING ⚠** : This tag has several constraints : diff --git a/escposprinter/README.md b/escposprinter/README.md index 8a7ed6a..16a5ad0 100644 --- a/escposprinter/README.md +++ b/escposprinter/README.md @@ -339,7 +339,7 @@ Prints a EAN8 barcode (height: 10mm, width: ~70% printer width, text: displayed Prints a UPC-A barcode (height: 20mm, width: ~70% printer width, text: displayed below). - `512789` : **(6 numbers)** Prints a UPC-E barcode (height: 25mm, width: ~50mm, text: hidden). -- `DantSu` : +- `DantSu` : **(string)** Prints a barcode 128 (height: 10mm, width: ~40mm, text: displayed above). **⚠ WARNING ⚠** : This tag has several constraints : diff --git a/escposprinter/src/main/java/com/dantsu/escposprinter/EscPosPrinterCommands.java b/escposprinter/src/main/java/com/dantsu/escposprinter/EscPosPrinterCommands.java index 12f45f6..c3d6b2c 100644 --- a/escposprinter/src/main/java/com/dantsu/escposprinter/EscPosPrinterCommands.java +++ b/escposprinter/src/main/java/com/dantsu/escposprinter/EscPosPrinterCommands.java @@ -350,7 +350,7 @@ public EscPosPrinterCommands printBarcode(Barcode barcode) { * @param size dot size of QR code pixel * @return Fluent interface */ - public EscPosPrinterCommands printQRCode(int qrCodeType, String text, int size) { + public EscPosPrinterCommands printQRCode(int qrCodeType, String text, int size) throws EscPosEncodingException { if (!this.printerConnection.isConnected()) { return this; } @@ -387,6 +387,7 @@ public EscPosPrinterCommands printQRCode(int qrCodeType, String text, int size) this.printerConnection.write(new byte[]{0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x51, 0x30}); } catch (UnsupportedEncodingException e) { e.printStackTrace(); + throw new EscPosEncodingException(e.getMessage()); } return this; }