Cannot scan the PDF417 code in the driver license.
defi-bear opened this issue · 8 comments
I am using the Dynamsoft barcode scanner in the Electron React.js project.
I've copied the react example in the examples folder and it's working with a bigger image but it's not scanning the PDF417 code in the driver license. Is there anyway to get it work?
When you say it works with a bigger image, do you mean that image has a bigger barcode that gets read? If the PDF417 code can not be read, we can do some configurations to get it working. For example, try setting the reading mode to 'coverage', etc.
@Tom-Dynamsoft Thank you for reply. So I printed the big PDF417 image than the DL. So it was working but not working with DL. Seems like it's small. setting mode coverage
means set to where?
Could you send me more detailed code?
async componentDidMount(){
try{
this.scanner = this.scanner || await Dynamsoft.BarcodeScanner.createInstance();
if(this.bDestroyed){
this.scanner.destroy();
return;
}
await this.scanner.updateVideoSettings({ video: { width: 1280, height: 720, facingMode: "environment" } });
await this.scanner.updateRuntimeSettings("coverage");
let runtimeSettings = await this.scanner.getRuntimeSettings();
runtimeSettings.barcodeFormatIds = Dynamsoft.EnumBarcodeFormat.BF_PDF417
await this.scanner.updateRuntimeSettings(runtimeSettings);
this.scanner.setUIElement(this.elRef.current);
this.scanner.onFrameRead = results => {
if(results.length){
// console.log(results);
}
};
this.scanner.onUnduplicatedRead = (txt, result) => {
console.log(result);
this.props.appendMessage(result.BarcodeFormatString + '***' +result.BarcodeText);
};
await this.scanner.open();
}catch(ex){
this.props.appendMessage(ex.message);
console.error(ex);
}
}
This is my current code.
@Shing-Ho Your code seems to have used the 'coverage' setting already. If the barcode still isn't getting read, is it possible to share it with us (email support @ dynamsoft.com).
BTW, seems I never asked this, but could the barcode be read on our demo?
https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html
The barcode is working barcode, I could recognize it with the mobile phone. Also, I've receive reply from live support and they recommend camera zoom in how can we do that?
Can you scan your driver license with your electron or react example demo?
@Shing-Ho Our team is following up on the issue (ticket id 482910), I'll close the issue here