@thermal-label/labelmanager-web
v0.3.0
Published
WebUSB browser driver for DYMO LabelManager printers
Maintainers
Readme
@thermal-label/labelmanager-web
WebHID browser driver for DYMO LabelManager printers.
Use this package to connect and print labels directly from supported browsers.
Install
pnpm add @thermal-label/labelmanager-webnpm install @thermal-label/labelmanager-webQuick Start
import { requestPrinter } from '@thermal-label/labelmanager-web';
const printer = await requestPrinter();
await printer.printText('Hello WebHID', { tapeWidth: 12 });Usage
Print text
import { requestPrinter } from '@thermal-label/labelmanager-web';
const printer = await requestPrinter();
await printer.printText('Shipping Label', {
tapeWidth: 12,
density: 'high',
copies: 1,
});Print image URL
import { requestPrinter } from '@thermal-label/labelmanager-web';
const printer = await requestPrinter();
await printer.printImageURL('/assets/label.png', { tapeWidth: 12, dither: true });Requirements
- Browser with WebHID support (for example recent Chromium-based browsers).
- Secure context (
https://orhttp://localhost). requestPrinter()must be triggered from a user gesture (button click, etc.).
Links
- Homepage: https://thermal-label.github.io/labelmanager/
- Repository: https://github.com/thermal-label/labelmanager
- Issues: https://github.com/thermal-label/labelmanager/issues
License
MIT
