QrCodeGenerator

Pure-Kotlin QR Code (Model 2, ISO/IEC 18004) encoder.

Implements byte-mode (UTF-8) encoding across versions 1–40 with full Reed-Solomon error correction over GF(256), per-version block interleaving, all eight data masks with penalty-based selection, and BCH-protected format and version information. There are no platform dependencies, so the encoder runs on every PdfKmp target.

Functions

Link copied to clipboard
fun encode(data: String, errorCorrection: QrErrorCorrection = QrErrorCorrection.M): QrMatrix

Encodes data as a QR Code at the given errorCorrection level.