Related blog post:
Last active
May 23, 2023 12:17
-
-
Save GroupDocsGists/59f04fc256d7495b92bc88327a376cde to your computer and use it in GitHub Desktop.
Scan Barcode & QR Code using Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scan Barcode using Java | |
try(Parser parser = new Parser("/path/barcode.png")) | |
{ | |
// Extract all Barcodes. | |
Iterable<PageBarcodeArea> barcodes = parser.getBarcodes(); | |
// Iterate | |
for(PageBarcodeArea barcode : barcodes) | |
{ | |
// Print the Identified Barcode values | |
Console.WriteLine(barcode.getCodeTypeName() +" Code Value: " + barcode.getValue()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scan QR Code using Java | |
try(Parser parser = new Parser("/path/qrcode.png")) | |
{ | |
// Extract all QR Codes. | |
Iterable<PageBarcodeArea> barcodes = parser.getBarcodes(); | |
// Iterate | |
for(PageBarcodeArea barcode : barcodes) | |
{ | |
// Print the Identified QR Code values | |
Console.WriteLine(barcode.getCodeTypeName() +" Code Value: " + barcode.getValue()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment