Hi,
Reading Tiff file:
---------------------
I am trying to read barcode of a multipage tiff file using the below code. But it is returning empty string after reading the page. I have attached the tiff file with this post. Please advise me what is wrong in this code and why it is not able to read the barcodes available in the page.
Reading Pdf file:
--------------------
Apart from the tiff, I want to read barcodes from pdf fiiles. Please what are the APIs which support reading barcodes from PDF files in infragistics? If possible pls provide some code samples to read barcodes from pdf files.
The below code reads bar code from tiff file.
using System;
using
System.Collections.Generic;
System.Linq;
System.Text;
System.IO;
System.Windows.Media.Imaging;
//using System.Drawing;
System.Windows;
System.Windows.Controls;
//using System.Windows.Media;
Infragistics.Controls.Barcodes;
namespace
ConsoleApplication1
{
class Program
static void Main(string[] args)
Stream imageStreamSource = new FileStream(@"C:\Data\Srirangam\test.tif", FileMode.Open, FileAccess.Read, FileShare.Read);
TiffBitmapDecoder decoder = new TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
BitmapSource bitmapSource = decoder.Frames[1];
BarcodeReader barReader = new BarcodeReader();
barReader.BarcodeOrientation =
SymbolOrientation.Unspecified;
barReader.MaxNumberOfSymbolsToRead = 5;
barReader.DecodeComplete +=
new EventHandler<ReaderDecodeArgs>(barReader_DecodeComplete);
barReader.Decode(bitmapSource,
Symbology.All);
}
static void barReader_DecodeComplete(object sender, ReaderDecodeArgs e)
String barValue = e.Value;
Console.WriteLine(barValue);
Hello Uthay,
I found this post duplicate to the following one:
http://community.infragistics.com/forums/t/65590.aspx
Which is already answered.