Table of contents
Multipage file processing
This example shows how to process multipage file one page at a time.C#
12345678910111213141516171819202122232425262728
using Inlite.ClearImageNet;// . . .void ReadBarcodeProcFile (string fileName) { try { string fileName = this.txtRslt.Text; BarcodeReader reader = new BarcodeReader(); reader.Code39 = true; reader.Code128 = true; ImageEditor editor = new ImageEditor(); editor.Image.Open(fileName, 1); for (int page = 1; page <= editor.Image.PageCount; page++) { editor.Image.Open(fileName, page); // save each page in a separate TIFF file editor.Image.SaveAs(fileName + ".p" + page + ".tif", EFileFormat.ciEXT); // Optional. Preprocess before reading barcodes (implement your own preprocessing) editor.CleanNoise(3); // read barcodes Barcode[] barcodes = reader.Read(editor); foreach (Barcode bc in barcodes) {Console.WriteLine(bc.Text + " in file:" + bc.File + " page: " + bc.Page.ToString());} } } catch (Exception ex) {ProcessException (ex);} }