QR code
Version 0.3 is under development. Do not use in a production.
Documentation is under development.
var docDefinition = {
content: [
// basic usage
{ qr: 'text in QR' },
// colored QR
{ qr: 'text in QR', foreground: 'red', background: 'yellow' },
// resized QR
{ qr: 'text in QR', fit: '500' },
]
}
Properties:
qr
:string
- text in QR codeforeground
:string
(optional, default black) - foreground colorbackground
:string
(optional, default white) - background colorfit
:integer
(optional) - fit the output QR imageversion
:integer
(optional) - QR version range from 1 to 40 (for details see wikipedia.orgeccLevel
:string
(optional, default L) - error correction capability (for details see wikipedia.org), possible values:- L - Level L (Low), approx 7% of codewords can be restored
- M - Level M (Medium), approx 15% of codewords can be restored
- Q - Level Q (Quartile), approx 25% of codewords can be restored
- H - Level H (High), approx 30% of codewords can be restored
mode
:string
(optional) - encoding mode, possible values: numeric, alphanumeric, octet (for details see wikipedia.org)mask
:integer
(optional) - mask pattern, range from 0 to 7 (for details see wikipedia.org)