Manages the global barcodes settings for the document.
[DataContractAttribute()]public class DocumentBarcodes
<DataContractAttribute()>Public Class DocumentBarcodes
public [DataContractAttribute]ref class DocumentBarcodes
public class DocumentBarcodes implements SerializableDocumentBarcodes manages the global barcodes settings of the document. It can be accessed through the Barcodes property of Document.
DocumentBarcodes contains the following:
The DocumentPage.ReadBarcodes method is used to read the barcodes of a page. The document will check if the value in BarcodeEngine is not null, if so, it will try to read the barcodes based on options set in BarcodeReader.
For more information, refer to Barcode processing with the Documents Library.
using Leadtools;using Leadtools.Codecs;using Leadtools.Forms.DocumentWriters;using Leadtools.Svg;using Leadtools.Documents;using Leadtools.Caching;using Leadtools.Annotations.Core;using Leadtools.Forms.Ocr;using Leadtools.Barcode;private static void DocumentBarcodesExample(){var options = new LoadDocumentOptions();// Create a document from the barcode sample image shipping with LEADTOOLSusing (var document = DocumentFactory.LoadFromFile(Path.Combine(ImagesPath.Path, "Barcode1.tif"), options)){// Setup a barcode reader objectvar barcodeEngine = new BarcodeEngine();// Optionally, setup the reader option. Here we instruct the barcode reader to read all types of barcodesbarcodeEngine.Reader.ImageType = BarcodeImageType.Unknown;// Set this engine to be used with the documentdocument.Barcodes.BarcodeEngine = barcodeEngine;// Read all the barcodes in the first pagevar page = document.Pages[0];var barcodes = page.ReadBarcodes(LeadRectD.Empty, -1, null);Console.WriteLine("{0} barcode(s) found.", barcodes.Length);foreach (var barcode in barcodes)Console.WriteLine(" type {0} data {1}", barcode.Symbology, barcode.Value);}}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.Forms.DocumentWritersImports Leadtools.SvgImports Leadtools.DocumentsImports Leadtools.CachingImports Leadtools.Annotations.CoreImports Leadtools.BarcodeImports Leadtools.Forms.OcrPrivate Shared Sub DocumentBarcodesExample()Dim options As New LoadDocumentOptions()' Create a document from the barcode sample image shipping with LEADTOOLSUsing document As Document = DocumentFactory.LoadFromFile(Path.Combine(ImagesPath.Path, "Barcode1.tif"), options)' Setup a barcode reader objectDim barcodeEngine As New BarcodeEngine()' Optionally, setup the reader option. Here we instruct the barcode reader to read all types of barcodesbarcodeEngine.Reader.ImageType = BarcodeImageType.Unknown' Set this engine to be used with the documentdocument.Barcodes.BarcodeEngine = barcodeEngine' Read all the barcodes in the first pageDim page As Leadtools.Documents.DocumentPage = document.Pages(0)Dim barcodes() As BarcodeData = page.ReadBarcodes(LeadRectD.Empty, -1, Nothing)Console.WriteLine("{0} barcode(s) found.", barcodes.Length)For Each barcode As BarcodeData In barcodesConsole.WriteLine(" type {0} data {1}", barcode.Symbology, barcode.Value)NextEnd UsingEnd Sub
|
Products |
Support |
Feedback: DocumentBarcodes Class - Leadtools.Documents |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.