Related articles:
Last active
May 23, 2023 12:13
-
-
Save GroupDocsGists/8a976795306627a305e479a3480ecd32 to your computer and use it in GitHub Desktop.
Scan Barcode & QR Code using C#
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 C# | |
using (Parser parser = new Parser("/path/barcode.png")) | |
{ | |
// Extract all Barcodes. | |
IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes(); | |
// Iterate over Barcodes | |
foreach (PageBarcodeArea barcode in barcodes) | |
{ | |
// Print the Identified Barcode values | |
Console.WriteLine(barcode.CodeTypeName +" Value: " + barcode.Value); | |
} | |
} |
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 C# | |
using (Parser parser = new Parser("/path/qrcode.png")) | |
{ | |
// Extract all QR Codes. | |
IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes(); | |
// Iterate | |
foreach (PageBarcodeArea barcode in barcodes) | |
{ | |
// Print the Identified QR Code values | |
Console.WriteLine(barcode.CodeTypeName +" Code Value: " + barcode.Value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment