kenglxn / QRGen

a simple QRCode generation api for java built on top ZXING
http://glxn.net/2012/03/10/qrgen-a-small-wrapper-on-top-of-zxing-for-generating-qrcodes-in-java
1.49k stars 300 forks source link

QR-Code white Border #76

Closed Informaticore closed 8 years ago

Informaticore commented 8 years ago

Is it possible to get rid of the white border arround the QR-Code?

kenglxn commented 8 years ago

You should be able to pass a hint to zxing. see http://zxing.github.io/zxing/apidocs/com/google/zxing/EncodeHintType.html#MARGIN

Something like: QRCode.from("Hello World").withHint(EncodeHintType.MARGIN, "1");

Keep in mind that this could affect the decode ability of some clients.