Special functions

All kind of specific functions that are not suited for any other category.

qrCodePNG

Generates a QR code in PNG format and returns it as a base64 encoded string (without mime header).

Accepts the following parameters in a sequence:

  1. data - The data to be encoded in the QR code. If not provided or empty, the function will return an empty string.
  2. size - The size (square) of the QR code in pixels. If not provided, the default size is 128 (128x128) pixels.
  3. ecl - The error correction level for the QR code. If not provided, the default is “M” (medium). Options:
    • L (Low) - 7% error correction
    • M (Medium) - 15% error correction
    • Q (Quartile) - 25% error correction
    • H (High) - 30% error correction
  4. encoding - The encoding for the QR code. If not provided, the default is “Auto” (tries to find most optimal encoding). Options:
    • N - Numeric encoding works only with numbers [0-9]
    • AN - AlphaNumeric encoding supports uppercase letters, numbers and Space, $, %, *, +, -, ., /, :
    • UTF-8 - Unicode encoding supports utf-8

All function parameters are optional, but should maintain the order. For example, most minimal usage would be: {{ qrCodePNG "test" }}

{{ qrCodePNG "https://automat-eu.erply.com" 128 "M" "UTF-8" }}