Please help,
We really like the Spire.Barcode SDK, but it is not working on an TIF file that has a PDF417 image in it, which I am attaching to this postl.
We used simple C#/.NET to load the image as a bitmap, as shown hereafter:
If someone could please, examine the attached TIF image, and get the SDK’s PDF417 reading fixed to read it properly.
For reference, we have used other readers to know the image/pdf417 is good, too include the BarcodeLib.com’s SDK.
Here is the code that we use with the Spire.Barcode SDK.
Bitmap
Bitmap_FirstPage = null,
Bitmap_This = null;
Bitmap_This = (Bitmap) Bitmap.FromFile(“C:\Images\AA10A00F.TIF”);
Bitmap_FirstPage = null;
if (Bitmap_This.RawFormat.Guid == ImageFormat.Tiff.Guid)
{
int iPages = Bitmap_This.GetFrameCount(FrameDimension.Page);
if (iPages < 1) throw Error!!!
Bitmap_This.SelectActiveFrame(FrameDimension.Page, 0);
using (MemoryStream MemoryStream_Temp = new MemoryStream())
{
Bitmap_This.Save(MemoryStream_Temp, ImageFormat.Bmp);
Bitmap_FirstPage = (Bitmap) Bitmap.FromStream(MemoryStream_Temp);
}
}
else
{
Bitmap_FirstPage = Bitmap_This;
}
string[] zcsBarcodes;
zcsBarcodes = Spire.Barcode.BarcodeScanner.Scan(Bitmap_FirstPage, Spire.Barcode.BarCodeType.Pdf417);
// zcsBarcodes always returns no strings found, Length = 0, but the TIF file does have a PDF417 in it, which is good, and works with BarcodeLib.com’s SDK.