The application consists of, through a link of a pdf, reading a QRcode and presenting its information.
For this, I put the pdf in base64 through the blob, and now I needed to go to base64 and scan the QRCode.
For this, I’m using the ‘rn-qr-generator’ library.
If you find a solution with this or another library, I would appreciate it!
if (base64) {
// Detect QR code in image
RNQRGenerator.detect({
base64: `${base64}`,
})
.then((response) => {
const { values } = response; // Array of detected QR code values. Empty if nothing found.
setQRCode(values);
})
.catch((error) => console.log("Cannot detect QR code in image", error));
}
Return the error:
Cannot detect QR code in image TypeError: Cannot read properties of undefined (reading ‘detect’)