Skip to content

Latest commit

 

History

67 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

QR4J

What is this?

QR4J is a Java library for generating QR codes. QR4J is intended to be:

  • self-contained: no network API hits to any external services; and

  • minimally-dependent: using QR4J should not involve pulling in a plethora of JARs, and ideally none at all.

QR4J is not intended to:

  • read QR codes; or

  • generate any other type of barcode.

Getting started

Generating a QR code is this simple:

QrCode qr = QrCode.encodeText("Hello, world!", QrCode.Ecc.LOW);
BufferedImage img = qr.toImage(10, 4);
File imgFile = new File("hello-world-QR.png");
ImageIO.write(img, "png", imgFile);

Or in a web application, you could just return SVG:

return qr.toSvg(4, "#cccccc", "#333333");

Using QR4J

You can use QR4J in your projects by including it as a Maven dependency:

<dependency>
  <groupId>net.logicsquad</groupId>
  <artifactId>qr4j</artifactId>
  <version>1.1</version>
</dependency>

Contributing

By all means, open issue tickets and pull requests if you have something to contribute.

References

QR4J is heavily based on QR Code generator library, specifically the io.nayuki.fastqrcodegen package.

  • Why not fork that project? Because the repository includes implementations in languages we're not interested in.

  • Why not use that project's Java release? Because it doesn't appear that the io.nayuki.fastqrcodegen package is even released as a JAR available on Maven Central.

About

A Java-based QR code generator with a minimum of dependencies.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages