Flexible Client-side QR Code Generator

Category: Javascript , Recommended | June 13, 2018
Author: nayuki
Views Total: 1,493
Official Page: Go to website
Last Update: June 13, 2018
License: MIT

Preview:

Flexible Client-side QR Code Generator

Description:

Just another flexible, customizable, client-side QR code generator built using pure JavaScript. Also supports Java, Python and C++.

Main features:

  • Error correction level: Low, Medium, Quartile and High
  • Output format: bitmap or vector
  • Custom scale and border

How to use it:

Import the QR Code Generator’s JavaScript file into the html page.

<script src="qrcodegen.js"></script>

Basic usages:

// Name abbreviated for the sake of these examples here
var QRC = qrcodegen.QrCode;

// Simple operation
var qr0 = QRC.encodeText("Hello, world!", QRC.Ecc.MEDIUM);
var svg = qr0.toSvgString(4);

// Manual operation
var segs = qrcodegen.QrSegment.makeSegments("3141592653589793238462643383");
var qr1 = QRC.encodeSegments(segs, QRC.Ecc.HIGH, 5, 5, 2, false);

Changelog:

06/13/2018

  • Updated

Leave a Reply