This repository contains an example SvelteKit project that allows for printing to a Star TSP100III printer (TSP143III etc) using WebUSB. It uses the following dependencies:
- buffer (to use Node.JS'
buffer.from
) - receiptline (to format and create the printer commands)
This could be correct, ensure you're using one of the browsers that support the WebUSB standard. A list of browsers can be found on Caniuse WebUSB
For windows you'll need to install Zadig to overwrite the printer driver from usbprint.sys to winusb.sys.
- Run Zadig as administrator
- In the menubar select Options -> List all devices
- Select the Star printer
- Ensure the dropdown menu shows WinUSB.
- Click "Reinstall WCID Driver"
We use browserify (npm run browserify
) to convert the receiptline
dependency from Node.JS to plain JS. This should run at install time because of the postinstall
script in the package.json, however if this is not the case for you please run it manually.