-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The ReceiptLine spec has an option for adding barcodes of various sorts. Implement that in the parser.
This will also require two pieces on the ESC/POS side to work well:
- Printer Feature Detection #11
- Barcode-To-Image translation with Image Support #10
The bwip-js library has a huuuuueeeegg number of symbologies supported, far more than ESC/POS has ever had. While native on-device barcode rendering will always be preferred for a variety of reasons, having a fall-back to an image-to-barcode process would eliminate the guesswork on the library consumer side.
The dependency on bwip and the barcode fallback feature should be optional, that is, if you don't install bwip-js alongside web-receiptline-printer then web-receiptline-printer throws an error when trying to print unsupported symbologies.
Maybe have an internal fallback for QR codes, which are going to be far and away the most popular type of receipt to print.