modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Function encodeQR

    • Encodes a QR Code (Model 2, versions 1-10) symbol. The mode is chosen automatically: numeric for digits only, alphanumeric for upper-case letters, digits and space $ % * + - . / :, otherwise byte mode on the UTF-8 bytes. The smallest version that fits is used.

      Parameters

      • data: string

        Text to encode.

      • Optionaloptions: { ecLevel?: QrEcLevel }

        ecLevel: error-correction level (default 'M').

      Returns BarcodeMatrix

      The symbol matrix, without quiet zone.

      Data too long for QR versions 1-10 if the data does not fit version 10 at the chosen level.