Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Thu Feb 04, 2016 2:46 am

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.

JBrumbelow@OptiDoc.com
 
Posts: 1
Joined: Thu Feb 04, 2016 2:39 am

Thu Feb 04, 2016 8:28 am

Hello,

Thanks for your inquiry.
I have noticed your issue and posted it to our Dev team. Once there is any update, we will let you know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.BarCode