Skip to content

Barcode support #12

@Cellivar

Description

@Cellivar

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:

  1. Printer Feature Detection #11
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions