qrcode.js

WebJar for qrcode.js

License

License

MIT
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

qrcode
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

qrcode.js
WebJar for qrcode.js
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/janantala/qrcode.js

Download qrcode

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/qrcode/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>qrcode</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/qrcode/
implementation 'org.webjars.bower:qrcode:1.0.2'
// https://jarcasting.com/artifacts/org.webjars.bower/qrcode/
implementation ("org.webjars.bower:qrcode:1.0.2")
'org.webjars.bower:qrcode:jar:1.0.2'
<dependency org="org.webjars.bower" name="qrcode" rev="1.0.2">
  <artifact name="qrcode" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='qrcode', version='1.0.2')
)
libraryDependencies += "org.webjars.bower" % "qrcode" % "1.0.2"
[org.webjars.bower/qrcode "1.0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Build Status Coverage Status

qrcode.js v1.0.2

QR code generator, supports Numeric, Alphanumeric and Binary inputMode up to lvl 40.

Installation

Bower

We use bower for dependency management. Add

dependencies: {
    "qrcode": "latest"
}

To your bower.json file. Then run

bower install

Usage

Create QR code

var qr = new QRCode(typeNumber, correction, inputMode);
qr.addData(text);
qr.make();

Get module count

var modules = qr.getModuleCount();

Get tile color

for (var row = 0; row < modules; row++) {
  for (var col = 0; col < modules; col++) {
    var color = qr.isDark(row, col) ? '#000' : '#fff';
    //...
  }
}

type number

  • supported are all levels 1-40
  • use 0 for the lowest complexity

correction

  • Integer 1 - Level L (Low)
  • Integer 0 - Level M (Medium)
  • Integer 3 - Level Q (Quartile)
  • Integer 2 - Level H (High)

input mode

  • NUMBER: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • ALPHA_NUM: *0–9, A–Z (upper-case only), space, $, %, , +, -, ., /, :
  • 8bit (default): ISO 8859-1

Reference

Kazuhiko Arase, http://www.d-project.com/

License

The MIT License

Copyright (c) 2013 Jan Antala

Versions

Version
1.0.2