Your account has not been activated. Click here to get a new activation Email.
Unfortunately, activation email could not send to your email. Please try again.

Barcode Reader OPX

Getting Started

ZXing (zebra crossing) is an open-source tool to decode barcodes within images that fall under the Apache 2.0 license. It allows users to scan most of the 1D and 2D barcodes, including QR codes and data matrix barcodes.

Barcode OPX is used to optimize the working of ZXing with Syncfusion Essential PDF. The enhanced library scans the barcode from the PDF document and returns the barcode value and type.

Assembly Requirement

To use the Barcode Reader feature in applications, references need to be added to the following set of assemblies:

Assembly Name

Description

Syncfusion.Pdf.Base This assembly contains the core feature for manipulating and saving PDF documents.
Syncfusion.Compression.Base This assembly compresses the internal contents of a PDF document.
Syncfusion.BarcodeReader.OPX This assembly is the wrapper for the ZXing assembly using ZXing features.
zxing Decodes Barcode within the image

The following namespace should be included in the application:

using Syncfusion.BarcodeReader.OPX;
using Syncfusion.Pdf.Parsing;

Scanning Embedded PDF barcode images:

If the PDF contains barcodes as shapes, then it internally converts the PDF page into an image and then detects the barcode. The following is the code snippet for this:

BarcodeReader reader = new BarcodeReader("Barcode.pdf", FormatType.PDF);

BarcodeResult result = reader.ScanBarcode();

Scanning PDF barcodes

If the PDF contains a barcode as an image, then the image alone can be extracted and the barcode will then be detected. The following is the code snippet for this:

//Loads the existing document.
PdfLoadedDocument document = new PdfLoadedDocument(txtImageFile.Text);

//Exports the document as images.
images = document.ExportAsImage(0, document.Pages.Count);
foreach (Bitmap img in images)
{
	BarcodeReader reader = new BarcodeReader(img);
	BarcodeResult result = reader.ScanBarcode();
}

Sample Output:

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/BarcodeReaderOPX-1754646492

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.