SwissQrBill.Output.PdfOutput (swiss_qr_bill v0.1.3)

Copy Markdown View Source

Generates the complete Swiss QR bill payment part as PDF. Uses the pdf library. Layout matches the SIX style guide. The QR code is drawn directly as filled rectangles from the QR matrix.

Summary

Functions

Generates the payment part as a PDF binary.

Functions

render(bill, opts \\ [])

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

Generates the payment part as a PDF binary.

Options

  • :language:de, :fr, :it, :en, or :rm (default: :de)
  • :output_size:payment_slip (default), :a4, or :qr_code
  • :branding — when true, adds a small localized "Created by qrbill.dev" line (default: false). Placement depends on :output_size: above the payment slip (:a4), at the bottom edge of the payment part (:payment_slip), or below the code on a slightly taller canvas (:qr_code).