SwissQrBill.Output.SvgOutput (swiss_qr_bill v0.1.2)

Copy Markdown View Source

Generates SVG output by converting the PDF via pdftocairo. All text is automatically converted to glyph outlines (paths), ensuring pixel-perfect rendering on all devices without font dependencies.

Requires pdftocairo (from poppler-utils) to be installed.

  • macOS: brew install poppler
  • Ubuntu/Debian: apt install poppler-utils

Summary

Functions

Generates the payment part as an SVG binary string. Uses PdfOutput as source and converts via pdftocairo.

Functions

render(bill, opts \\ [])

@spec render(
  map(),
  keyword()
) :: {:ok, binary()} | {:error, String.t()}

Generates the payment part as an SVG binary string. Uses PdfOutput as source and converts via pdftocairo.

Options

Same as PdfOutput.render/2:

  • :language:de, :fr, :it, :en, or :rm (default: :de)