From 07d0adbadc9e3e0742574b0ee6af8d8285dfde3b Mon Sep 17 00:00:00 2001 From: Aliaksei Astafyeu Date: Mon, 13 Nov 2023 14:07:46 +0100 Subject: [PATCH] Update QUICK_START.md --- docs/QUICK_START.md | 106 +------------------------------------------- 1 file changed, 1 insertion(+), 105 deletions(-) diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md index b61a484..9915e93 100644 --- a/docs/QUICK_START.md +++ b/docs/QUICK_START.md @@ -5,108 +5,4 @@ height="300" /> -```javascript -import EscPosPrinter, { getPrinterSeriesByName } from 'react-native-esc-pos-printer'; - - -async function testPrint() { - try { - const printers = await EscPosPrinter.discover() - - const printer = printers[0] - - await EscPosPrinter.init({ - target: printer.target, - seriesName: getPrinterSeriesByName(printer.name), - language: 'EPOS2_LANG_EN', - }) - - const printing = new EscPosPrinter.printing(); - - const status = await printing - .initialize() - .align('center') - .size(3, 3) - .line('DUDE!') - .smooth(true) - .line('DUDE!') - .smooth(false) - .size(1, 1) - .text('is that a ') - .bold() - .underline() - .text('printer?') - .newline() - .bold() - .underline() - .align('left') - .text('Left') - .newline() - .align('right') - .text('Right') - .newline() - .size(1, 1) - .textLine(48, { - left: 'Cheesburger', - right: '3 EUR', - gapSymbol: '_', - }) - .newline() - .textLine(48, { - left: 'Chickenburger', - right: '1.5 EUR', - gapSymbol: '.', - }) - .newline() - .size(2, 2) - .textLine(48, { left: 'Happy Meal', right: '7 EUR' }) - .newline() - .align('left') - .text('Left') - .newline() - - .align('right') - .text('Right') - .newline() - - .align('center') - .image(require('./store.png'), { - width: 75, - halftone: 'EPOS2_HALFTONE_THRESHOLD', - }) - - .image({ uri: base64Image }, { width: 75 }) - .image( - { - uri: - 'https://raw.githubusercontent.com/tr3v3r/react-native-esc-pos-printer/main/ios/store.png', - }, - { width: 75 } - ) - .barcode({ - value: 'Test123', - type: 'EPOS2_BARCODE_CODE93', - width: 2, - height: 50, - hri: 'EPOS2_HRI_BELOW', - }) - .qrcode({ - value: 'Test123', - level: 'EPOS2_LEVEL_M', - width: 5, - }) - .cut() - .send(); - - console.log('Success:', status) - - } catch(e) { - console.log('Error:', status) - } -} - - -testPrint() - -``` -See example folder and [API docs](./API.md) for more details. +See the [example](https://github.com/tr3v3r/react-native-esc-pos-printer/tree/main/example) folder.