WalletPasses.Barcode (wallet_passes v0.12.0)

Copy Markdown View Source

Barcode image generation for previews.

Optional — requires the eqrcode and barlix dependencies. Used only to render preview images; the pass builders never call this module (Apple Wallet and Google Wallet render the barcode on-device from the message).

Supports two formats:

  • :qr — rendered via EQRCode. Honors :foreground_color and :size.
  • :code_128 — rendered via Barlix. Honors :xdim and :height; :foreground_color is ignored (Barlix renders black bars).

Summary

Functions

Generates a barcode as a PNG binary for the given format.

Generates a barcode as an SVG string for the given format.

Functions

png(format, message, opts \\ [])

Generates a barcode as a PNG binary for the given format.

svg(format, message, opts \\ [])

Generates a barcode as an SVG string for the given format.