QRCode with ErrorCorrectionLevel for ireport

Nov 26, 2014 at 6:57 PM
Edited Nov 26, 2014 at 6:58 PM

I'm working on ireport and I have the following code, this works great but I need to specify the error correction level M (15%), please does someone help me on this?
     new com.google.zxing.qrcode.QRCodeWriter().encode(
         com.google.zxing.BarcodeFormat.QR_CODE, 160, 160))
Thanks in advance.
Dec 20, 2014 at 7:17 PM
You have to specify the encoding hint EncodeHintType.ERROR_CORRECTION (as fifth argument inside a Map<EncodeHintType,?>).