{"_id":"@dhimassudaryanta/react-native-thermal-printer","_rev":"2-c54ce0d44eee448616a195c3a7b99457","name":"@dhimassudaryanta/react-native-thermal-printer","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@dhimassudaryanta/react-native-thermal-printer","version":"1.0.1","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/AllInOneYT","name":"Edy Gunawan","email":"gunawanedy40@gmail.com"},"license":"MIT","_id":"@dhimassudaryanta/react-native-thermal-printer@1.0.1","maintainers":[{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"}],"homepage":"https://github.com/AllInOneYT/react-native-thermal-printer#readme","bugs":{"url":"https://github.com/AllInOneYT/react-native-thermal-printer/issues"},"dist":{"shasum":"fa483f6da1bc98a55f40a6ed3a0d421770cdfa8c","tarball":"https://registry.npmjs.org/@dhimassudaryanta/react-native-thermal-printer/-/react-native-thermal-printer-1.0.1.tgz","fileCount":170,"integrity":"sha512-2pvAFQASgBtYI0g0K4N6KmYjPFa+7R+jqEL2/8lP4oPAV7USVanJV9/UxZqoEtyz8ATxokquXKzTQtSZv+W1sw==","signatures":[{"sig":"MEYCIQCpFXF2SxORf4lZBgRGJEySCutIYPzJ8dlTeL8virs2MAIhANDppn5T/PVEPP2X0v8rEfB75f+8HhfY0REqlcRqdzLJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":873887},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"yarn lint && yarn typescript"}},"types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example && pod-install --quiet","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"yarn example && yarn && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"https://github.com/AllInOneYT/react-native-thermal-printer","type":"git"},"description":"native bridge for thermal printer","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Edy Gunawan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^4.2.5","react":"16.13.1","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^14.2.2","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.63.4","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-thermal-printer_1.0.1_1737503244920_0.05565453500549089","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"1.0.2":{"name":"@dhimassudaryanta/react-native-thermal-printer","version":"1.0.2","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/AllInOneYT","name":"Edy Gunawan","email":"gunawanedy40@gmail.com"},"license":"MIT","_id":"@dhimassudaryanta/react-native-thermal-printer@1.0.2","maintainers":[{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"}],"homepage":"https://github.com/AllInOneYT/react-native-thermal-printer#readme","bugs":{"url":"https://github.com/AllInOneYT/react-native-thermal-printer/issues"},"dist":{"shasum":"dc58302550df4b9e6e21b2bd8bb0bcbf92d99fe2","tarball":"https://registry.npmjs.org/@dhimassudaryanta/react-native-thermal-printer/-/react-native-thermal-printer-1.0.2.tgz","fileCount":170,"integrity":"sha512-crSU6sIw4diUX9cv3foox5BcYV1DXcWhrMdBFLzo7Jy7cisVwo92MuqewFvmTmwLrVZ2mwHnmh6HkSrI8CmeUQ==","signatures":[{"sig":"MEUCIQDKap6VrdSpWTFtGDCKg9/h2PMGXUr8sZ89BNtuivwKmwIgUtFPNgKyJr4gqZdzWCkkWa5D+YLzkk8Bn1onWagLO6I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":873642},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"yarn lint && yarn typescript"}},"types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example && pod-install --quiet","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"yarn example && yarn && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"https://github.com/AllInOneYT/react-native-thermal-printer","type":"git"},"description":"native bridge for thermal printer","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 Edy Gunawan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^4.2.5","react":"16.13.1","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^14.2.2","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.63.4","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-thermal-printer_1.0.2_1737532274869_0.08294840014230309","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"1.0.3":{"name":"@dhimassudaryanta/react-native-thermal-printer","version":"1.0.3","description":"native bridge for thermal printer","main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"test":"jest","typescript":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","prepare":"bob build","release":"release-it","example":"yarn --cwd example","pods":"cd example && pod-install --quiet","bootstrap":"yarn example && yarn && yarn pods"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"https://github.com/AllInOneYT/react-native-thermal-printer"},"author":{"name":"Edy Gunawan","email":"gunawanedy40@gmail.com","url":"https://github.com/AllInOneYT"},"license":"MIT","bugs":{"url":"https://github.com/AllInOneYT/react-native-thermal-printer/issues"},"homepage":"https://github.com/AllInOneYT/react-native-thermal-printer#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"^11.0.0","@react-native-community/eslint-config":"^2.0.0","@release-it/conventional-changelog":"^2.0.0","@types/jest":"^26.0.0","@types/react":"^16.9.19","@types/react-native":"0.62.13","commitlint":"^11.0.0","eslint":"^7.2.0","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","husky":"^4.2.5","jest":"^26.0.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"16.13.1","react-native":"0.63.4","react-native-builder-bob":"^0.18.0","release-it":"^14.2.2","typescript":"^4.1.3"},"peerDependencies":{"react":"*","react-native":"*"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"yarn lint && yarn typescript"}},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native-community","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"licenseText":"MIT License\n\nCopyright (c) 2020 Edy Gunawan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@dhimassudaryanta/react-native-thermal-printer@1.0.3","dist":{"shasum":"f8bf37acaeb2d6f386f4d5556c89c5372b0ebc51","integrity":"sha512-jfybQFrrAtQXqO+BL7azSSWG4wH62AJDLiSlpG9mLvmn/vsZ5RwiX0DZlHFK+7AwnwQ/BwMYXK72Mp9wanXweA==","tarball":"https://registry.npmjs.org/@dhimassudaryanta/react-native-thermal-printer/-/react-native-thermal-printer-1.0.3.tgz","fileCount":170,"unpackedSize":873756,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDDodYNOSw986pZfHhroi2gWlFJPD8oMJ0uaoKnVXqTcAiAhibnfbs30MwpFx5BD79PC2on3YMUqhBNYaERGcK3/iQ=="}]},"_npmUser":{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"},"directories":{},"maintainers":[{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-thermal-printer_1.0.3_1737532700493_0.9914395743552376"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-21T23:47:24.843Z","modified":"2025-01-22T07:58:20.855Z","1.0.1":"2025-01-21T23:47:25.153Z","1.0.2":"2025-01-22T07:51:15.071Z","1.0.3":"2025-01-22T07:58:20.687Z"},"bugs":{"url":"https://github.com/AllInOneYT/react-native-thermal-printer/issues"},"author":{"name":"Edy Gunawan","email":"gunawanedy40@gmail.com","url":"https://github.com/AllInOneYT"},"license":"MIT","homepage":"https://github.com/AllInOneYT/react-native-thermal-printer#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"https://github.com/AllInOneYT/react-native-thermal-printer"},"description":"native bridge for thermal printer","maintainers":[{"name":"dhimassudaryanta","email":"dhimassudaryanta@gmail.com"}],"readme":"# react-native-thermal-printer\n\nnative bridge for thermal printer\n\n### :warning: v2 breaking change\n\n- :fire: Changed to promise based <-- this might break your code\n- :fire: More flexible error handling\n- :fire: Bugs fixed\n\n### Android Only\n\nbridged library:\nhttps://github.com/DantSu/ESCPOS-ThermalPrinter-Android/tree/3.0.1\n\n## Installation\n\n```sh\nnpm install react-native-thermal-printer\n```\n\nor\n\n```sh\nyarn add react-native-thermal-printer\n```\n\n### Android Manifest\n\nmake sure you have the following permission in android/app/src/main/AndroidManifest.xml\n\nnetwork printing\n\n```xml\n<uses-permission android:name=\"android.permission.INTERNET\"/>\n```\n\nbluetooth printing\n\n```xml\n<uses-permission android:name=\"android.permission.BLUETOOTH\" />\n<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\" />\n```\n\n## Usage\n\n### Import the module\n\n```js\nimport ThermalPrinterModule from 'react-native-thermal-printer';\n```\n\n### Set the default config\n\n```js\nThermalPrinterModule.defaultConfig.ip = '192.168.100.246';\nThermalPrinterModule.defaultConfig.port = 9100;\nThermalPrinterModule.defaultConfig.autoCut = false;\nThermalPrinterModule.defaultConfig.timeout = 30000; // in milliseconds (version >= 2.2.0)\n```\n\nor\n\n```js\nThermalPrinterModule.defaultConfig = {\n  ...ThermalPrinterModule.defaultConfig,\n  ip: '192.168.100.246',\n  port: 9100,\n  autoCut: false,\n  timeout: 30000, // in milliseconds (version >= 2.2.0)\n};\n```\n\n### Send the payload\n\n```js\n// inside async function\ntry {\n  await ThermalPrinterModule.printTcp({ payload: 'hello world' });\n} catch (err) {\n  //error handling\n  console.log(err.message);\n}\n```\n\nyou can also specify the config each time calling the method\n\n```js\n// inside async function\ntry {\n  await ThermalPrinterModule.printTcp({\n    ip: '192.168.100.246',\n    port: 9100,\n    payload: 'hello world',\n    printerWidthMM: 50,\n    timeout: 30000, // in milliseconds (version >= 2.2.0)\n  });\n  await ThermalPrinterModule.printTcp({\n    ip: '192.168.100.247',\n    port: 9100,\n    payload: 'hello world',\n    autoCut: false,\n    timeout: 30000, // in milliseconds (version >= 2.2.0)\n  });\n} catch (err) {\n  //error handling\n  console.log(err.message);\n}\n```\n\n#### Bluetooth\n\npair your bluetooth device and call the printBluetooth method, all configurations remain the same\n\n```ts\n// inside async function\ntry {\n  await ThermalPrinterModule.printBluetooth({\n    payload: 'hello world',\n    printerNbrCharactersPerLine: 38,\n  });\n} catch (err) {\n  //error handling\n  console.log(err.message);\n}\n```\n\n## Method\n\nSupport both network and bluetooth printing for now\n\n| Name           | Param    | Param Type                                                             | default         |\n| -------------- | -------- | ---------------------------------------------------------------------- | --------------- |\n| printTcp       | `config` | `Partial<PrintTcpInterface> & Pick<PrinterInterface, 'payload'>`       | `defaultConfig` |\n| printBluetooth | `config` | `Partial<PrintBluetoothInterface> & Pick<PrinterInterface, 'payload'>` | `defaultConfig` |\n\n## Interfaces\n\n```ts\ninterface PrinterInterface {\n  payload: string;\n  autoCut: boolean;\n  openCashbox: boolean;\n  mmFeedPaper: number;\n  printerDpi: number;\n  printerWidthMM: number;\n  printerNbrCharactersPerLine: number;\n}\n\ninterface PrintTcpInterface extends PrinterInterface {\n  ip: string;\n  port: number;\n  timeout: number;\n}\n\ninterface PrintBluetoothInterface extends PrinterInterface {}\n```\n\n## Config\n\n### Default config\n\n```ts\nlet defaultConfig: PrintTcpInterface = {\n  ip: '192.168.192.168',\n  port: 9100,\n  payload: '',\n  autoCut: true,\n  openCashbox: false,\n  mmFeedPaper: 20,\n  printerDpi: 203,\n  printerWidthMM: 80,\n  printerNbrCharactersPerLine: 42,\n  timeout: 30000,\n};\n```\n\n### Available config\n\n| Name                        | Type      | Default           | Description                                                                  |\n| --------------------------- | --------- |-------------------| ---------------------------------------------------------------------------- |\n| ip                          | `string`  | `192.168.192.168` | printer ip address                                                           |\n| port                        | `number`  | `9100`            | printer port                                                                 |\n| payload                     | `string`  | ``                | text that you send to the printer                                            |\n| autoCut                     | `boolean` | `true`            | auto cut the paper                                                           |\n| openCashbox                 | `boolean` | `false`           | auto cut and kick the cashbox open                                           |\n| mmFeedPaper                 | `number`  | `20`              | feed paper (millimeters)                                                     |\n| printerDpi                  | `number`  | `203`             | DPI of the connected printer                                                 |\n| printerWidthMM              | `number`  | `80`              | printing width in millimeters                                                |\n| printerNbrCharactersPerLine | `number`  | `42`              | The maximum number of medium sized characters that can be printed on a line. |\n| timeout                     | `number`  | `30000`           | the maximum time to wait before the print is canceled.                       |\n\n## Payload\n\nsame as https://github.com/DantSu/ESCPOS-ThermalPrinter-Android/tree/3.0.1#formatted-text--syntax-guide\nexcept for the `<img></img>` tag\n\nplace the image url directly between the img tags\n\n### example\n\n```js\nconst text =\n  '[C]<img>https://via.placeholder.com/300.jpg</img>\\n' +\n  '[L]\\n' +\n  \"[C]<u><font size='big'>ORDER N°045</font></u>\\n\" +\n  '[L]\\n' +\n  '[C]================================\\n' +\n  '[L]\\n' +\n  '[L]<b>BEAUTIFUL SHIRT</b>[R]9.99e\\n' +\n  '[L]  + Size : S\\n' +\n  '[L]\\n' +\n  '[L]<b>AWESOME HAT</b>[R]24.99e\\n' +\n  '[L]  + Size : 57/58\\n' +\n  '[L]\\n' +\n  '[C]--------------------------------\\n' +\n  '[R]TOTAL PRICE :[R]34.98e\\n' +\n  '[R]TAX :[R]4.23e\\n' +\n  '[L]\\n' +\n  '[C]================================\\n' +\n  '[L]\\n' +\n  \"[L]<font size='tall'>Customer :</font>\\n\" +\n  '[L]Raymond DUPONT\\n' +\n  '[L]5 rue des girafes\\n' +\n  '[L]31547 PERPETES\\n' +\n  '[L]Tel : +33801201456\\n' +\n  '[L]\\n' +\n  \"[C]<barcode type='ean13' height='10'>831254784551</barcode>\\n\" +\n  \"[C]<qrcode size='20'>http://www.developpeur-web.dantsu.com/</qrcode>\\n\" +\n  '[L]\\n' +\n  '[L]\\n' +\n  '[L]\\n' +\n  '[L]\\n' +\n  '[L]\\n';\n```\n\n## Full example\n\n```js\nimport React, { useState } from 'react';\nimport { SafeAreaView, useColorScheme, Button, TextInput } from 'react-native';\n\nimport { Colors } from 'react-native/Libraries/NewAppScreen';\n\nimport ThermalPrinterModule from 'react-native-thermal-printer';\n\nThermalPrinterModule.defaultConfig = {\n  ...ThermalPrinterModule.defaultConfig,\n  ip: '192.168.100.246',\n  port: 9100,\n  timeout: 30000,\n};\n\nconst App = () => {\n  const isDarkMode = useColorScheme() === 'dark';\n\n  const [state, setState] = useState({\n    text:\n      '[C]<img>https://via.placeholder.com/300.jpg</img>\\n' +\n      '[L]\\n' +\n      \"[C]<u><font size='big'>ORDER N°045</font></u>\\n\" +\n      '[L]\\n' +\n      '[C]================================\\n' +\n      '[L]\\n' +\n      '[L]<b>BEAUTIFUL SHIRT</b>[R]9.99e\\n' +\n      '[L]  + Size : S\\n' +\n      '[L]\\n' +\n      '[L]<b>AWESOME HAT</b>[R]24.99e\\n' +\n      '[L]  + Size : 57/58\\n' +\n      '[L]\\n' +\n      '[C]--------------------------------\\n' +\n      '[R]TOTAL PRICE :[R]34.98e\\n' +\n      '[R]TAX :[R]4.23e\\n' +\n      '[L]\\n' +\n      '[C]================================\\n' +\n      '[L]\\n' +\n      \"[L]<font size='tall'>Customer :</font>\\n\" +\n      '[L]Raymond DUPONT\\n' +\n      '[L]5 rue des girafes\\n' +\n      '[L]31547 PERPETES\\n' +\n      '[L]Tel : +33801201456\\n' +\n      '[L]\\n' +\n      \"[C]<barcode type='ean13' height='10'>831254784551</barcode>\\n\" +\n      \"[C]<qrcode size='20'>http://www.developpeur-web.dantsu.com/</qrcode>\",\n  });\n\n  const backgroundStyle = {\n    backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,\n  };\n\n  const onPress = async () => {\n    try {\n      console.log('We will invoke the native module here!');\n      await ThermalPrinterModule.printTcp({ payload: state.text });\n\n      //\n      // bluetooth\n      // await ThermalPrinterModule.printBluetooth({ payload: state.text });\n      //\n\n      console.log('done printing');\n    } catch (err) {\n      //error handling\n      console.log(err.message);\n    }\n  };\n\n  return (\n    <SafeAreaView style={backgroundStyle}>\n      <TextInput\n        value={state.text}\n        onChangeText={(text) => setState((prev) => ({ ...prev, text }))}\n      />\n      <Button\n        title=\"Click to invoke your native module!\"\n        color=\"#841584\"\n        onPress={onPress}\n      />\n    </SafeAreaView>\n  );\n};\n\nexport default App;\n```\n\n## Tested devices\n\n- Epson TM-T82\n- Epson TM-T82X\n- Epson TM-T88VI\n- Epson TM-T20III\n- Zywell\n- VSC\n- EPPOS\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}