We have a QR code in the PDF and using multi format reader to read it. The zxing code reads QRs from most of the pdfs . But it is unable to find the QR from attached pdf. Could you please advise what is wrong with it.
I used PDFbox to convert pdf to an Image.
Snipped of the code is given below.
BufferedImage = page.convertToImage(); source = new com.google.zxing.client.j2se.BufferedImageLuminanceSource(BufferedImage); bitmap = new com.google.zxing.BinaryBitmap(new com.google.zxing.common.HybridBinarizer(source)); reader = new com.google.zxing.MultiFormatReader(); Result = reader.decode(bitmap); String QRCode = Result.getText();