{"id":22859611,"url":"https://github.com/malik12tree/capacitor-thermal-printer","last_synced_at":"2025-04-30T17:44:06.936Z","repository":{"id":260181954,"uuid":"872980184","full_name":"Malik12tree/capacitor-thermal-printer","owner":"Malik12tree","description":"High-speed, reliable bluetooth ESC thermal printer and encoder Capacitor plugin. 🖨️⚡","archived":false,"fork":false,"pushed_at":"2025-02-05T16:33:38.000Z","size":8781,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T05:47:15.421Z","etag":null,"topics":["android","bluetooth","capacitor","capacitor-plugin","encoder","esc","ios","native","plugin","printer","thermal"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malik12tree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-15T12:05:07.000Z","updated_at":"2025-03-05T07:30:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2863264-59d3-4979-8781-37d8425ad66a","html_url":"https://github.com/Malik12tree/capacitor-thermal-printer","commit_stats":null,"previous_names":["malik12tree/capacitor-thermal-printer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malik12tree%2Fcapacitor-thermal-printer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malik12tree%2Fcapacitor-thermal-printer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malik12tree%2Fcapacitor-thermal-printer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malik12tree%2Fcapacitor-thermal-printer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malik12tree","download_url":"https://codeload.github.com/Malik12tree/capacitor-thermal-printer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251753689,"owners_count":21638367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bluetooth","capacitor","capacitor-plugin","encoder","esc","ios","native","plugin","printer","thermal"],"created_at":"2024-12-13T09:07:33.117Z","updated_at":"2025-04-30T17:44:06.910Z","avatar_url":"https://github.com/Malik12tree.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg\n    src=\"https://raw.githubusercontent.com/Malik12tree/capacitor-thermal-printer/main/assets/Logo.png\"\n    width=\"64\"\n    valign=\"middle\"\n  /\u003e\n  \u003ccode\u003ecapacitor-thermal-printer\u003c/code\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/badge/bluetooth-6796f9?\u0026logo=bluetooth\u0026logoColor=white\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Capacitor-119EFF?logo=Capacitor\u0026logoColor=white\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-007ACC?logo=typescript\u0026logoColor=white\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Android-3DDC84?logo=android\u0026logoColor=white\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/iOS-157EFB?logo=apple\u0026logoColor=white\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/Malik12tree/capacitor-thermal-printer?color=orange\"\u003e\n\n\u003c/h1\u003e\n\nHigh-speed, reliable bluetooth ESC thermal printer and encoder Capacitor plugin. Both on Android and iOS!\n\n- [x] Using the official RTPrinter SDK by [Rongta Technology](https://www.rongtatech.com/) \u003c3\n- [x] Cross-platform compatibility (Android \u0026 iOS)\n- [x] **_Swift_** speeds on iOS of [BLE](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy) **(known for it's pain-in-the-ass speed)**\n\n## Install\n\n```bash\nnpm install capacitor-thermal-printer --save\nnpx cap sync\n```\n\n### Additional iOS Setup\n\n\u003cimg src=\"./assets/ios-include.png\" /\u003e\n\nOpen your iOS project in Xcode, then:\n\n1. In the left sidebar, select your project (usually named \"App\").\n2. Select your main target (usually also named \"App\").\n3. Navigate to \"Build Phases\" tab.\n4. Under \"Copy Bundle Resources\", click the \"+\" button and choose \"Add Other...\"\n5. Navigate to the `node_modules/capacitor-thermal-printer/ios/Plugin/Resources/ble_serial.plist` file and select it\n\nAnd voilà! You're all set!\n\n## Example\n\nMake sure to check the Ionic Angular example in the [example](./example) folder.\n\n### 1. Import the plugin\n\n```ts\nimport { CapacitorThermalPrinter } from 'capacitor-thermal-printer';\n```\n\n### 2. Connect to printer\n\n```ts\nconst device = await CapacitorThermalPrinter.connect({\n  address: 'XX:XX:XX:XX:XX:XX',\n});\nif (device === null) {\n  console.log('Woops, failed to connect!');\n} else {\n    console.log('Connected!', device.name, device.address);\n}\n```\n\nYou can also use the `startScan` method to discover nearby devices.\n\n- On Android, only printers will be discovered.\n- On iOS, all bluetooth devices will be discovered.\n\n```ts\nCapacitorThermalPrinter.addListener('discoverDevices', (devices) =\u003e {\n  console.log('Discovered devices list:', devices);\n});\n\nawait CapacitorThermalPrinter.startScan();\n```\n\n### 3. Print sample receipt\n\n```ts\nawait CapacitorThermalPrinter.begin()\n  .align('center')\n\n  .image('https://raw.githubusercontent.com/Malik12tree/capacitor-thermal-printer/main/assets/Logo-Black.png')\n\n  .bold()\n  .underline()\n  .text('The amazing store\\n')\n\n  .doubleWidth()\n  .text('RECEIPT\\n')\n  .clearFormatting()\n\n  .text('Item 1: $10.00\\n')\n  .text('Item 2: $15.00\\n')\n\n  .align('right')\n  .text('Total: $25.00\\n')\n\n  .align('center')\n  .qr('https://example.com')\n  .barcode('UPC_A', '123456789012')\n\n  .cutPaper()\n\n  .write()\n  .then(() =\u003e console.log('Printed!'))\n  .catch((e) =\u003e console.error('Failed to print!', e));\n```\n\n## Documentation\n\nCheck out the [Docs](./docs/README.md)!\n\n## Issues\n\nIf you encounter any issues with this plugin, please report them at [Issues](https://github.com/Malik12tree/capacitor-thermal-printer/issues)\n\n## Contributing\n\nWe're open to, and grateful for, any contributions made! Make sure to check [Contribution Guidelines](./CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalik12tree%2Fcapacitor-thermal-printer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalik12tree%2Fcapacitor-thermal-printer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalik12tree%2Fcapacitor-thermal-printer/lists"}