From 104fc8d7efb71eed94b94bd0cd86e7c0caf2de07 Mon Sep 17 00:00:00 2001 From: IAN OOI Date: Thu, 5 Dec 2019 20:16:36 +0800 Subject: [PATCH] Fix double line issue Tested on 3 types of printer printing english and chinese. No more double line spacing after removed the LINE_SPACE_88 and LINE_SPACE_68 --- .../java/leesiongchan/reactnativeescpos/PrinterService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/leesiongchan/reactnativeescpos/PrinterService.java b/android/src/main/java/leesiongchan/reactnativeescpos/PrinterService.java index e79374ff..025619d7 100644 --- a/android/src/main/java/leesiongchan/reactnativeescpos/PrinterService.java +++ b/android/src/main/java/leesiongchan/reactnativeescpos/PrinterService.java @@ -225,16 +225,16 @@ private ByteArrayOutputStream generateDesignByteArrayOutputStream(String text) t } if (h1) { baos.write(TXT_4SQUARE_NEW); - baos.write(LINE_SPACE_88); + // baos.write(LINE_SPACE_88); line = line.replace("{H1}", ""); charsOnLine = charsOnLine / 2; } else if (h2) { baos.write(TXT_2HEIGHT_NEW); - baos.write(LINE_SPACE_88); + // baos.write(LINE_SPACE_88); line = line.replace("{H2}", ""); } else if (h3) { baos.write(TXT_2WIDTH_NEW); - baos.write(LINE_SPACE_68); + // baos.write(LINE_SPACE_68); line = line.replace("{H3}", ""); charsOnLine = charsOnLine / 2; }