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.

Tue Feb 26, 2019 2:52 pm

Hi
I've just downloaded the Free Spire Barcode software and try it.
My questions:
1. I can read only one barcode. Did after purchase possible read many barcodes?
2. If this software support multipage file with barcode per page?
3. if the purchase version support pdf file (read barcode)?
4. Can i read rotated barcode?

nela
 
Posts: 3
Joined: Sun Jul 09, 2017 9:39 am

Wed Feb 27, 2019 3:00 am

Hello,

Thanks for your inquiry.
Below are my answers to your questions.
1 & 2. Sorry that our Spire.Barcode doesn't support reading barcodes from a file with multi-pages currently. If read an multi-pages tiff and each page contains one barcode, only the first page 's barcode could be scanned. For this case, one approach is to split the multi-pages tiff to multiple images and then read barcode from these images respectively. Please refer to the following code.
Code: Select all
Image tiffImage = Image.FromFile("Input.tiff");
//Split Tiff
Image[] images = SplitTIFFImage(tiffImage);
//Read barcode from images
foreach (Image img in images)
{
    Bitmap bmp = new Bitmap(img);
    string[] BarcodeValues = Spire.Barcode.BarcodeScanner.Scan(bmp);
}
public static Image[] SplitTIFFImage(Image tiffImage)
{
    int frameCount = tiffImage.GetFrameCount(FrameDimension.Page);
    Image[] images = new Image[frameCount];
    Guid objGuid = tiffImage.FrameDimensionsList[0];
    FrameDimension objDimension = new FrameDimension(objGuid);
    for (int i = 0; i < frameCount; i++)
    {
        tiffImage.SelectActiveFrame(objDimension, i);
        using (MemoryStream ms = new MemoryStream())
        {
            tiffImage.Save(ms, ImageFormat.Tiff);
            images[i] = Image.FromStream(ms);
        }
    }
    return images;
}

3. Our Spire.Barcode only supports reading barcode from image. Reading from a PDF file is not available at present. However, you can use our Spire.PDF (Spire.PDF Pack(Hot Fix) Version:5.2.3) to convert PDF pages to images firstly, and then read barcodes from these images. Sample code is shown as follows.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile("Input.pdf");
List<Bitmap> images = new List<Bitmap>();
//Save Pdf pages to images
for (int i = 0; i < doc.Pages.Count;i++ )
{
    Bitmap img = (Bitmap)doc.SaveAsImage(i);
    images.Add(img);
}
//Read barcode from images
foreach (Bitmap bmp in images)
{
    string[] BarcodeValues = Spire.Barcode.BarcodeScanner.Scan(bmp);
}

4. Our Spire.Barcode supports reading rotated barcode. Just go ahead, if there is any question, please feel free to write back.
Finally, I recommend that you evaluate our commercial version (Spire.BarCode for .NET Version:3.1), since the commercial one is stronger and supports more barcode types than the free one.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Wed Feb 27, 2019 9:34 am

Tnank you.
Your question help me to solve problem.

nela
 
Posts: 3
Joined: Sun Jul 09, 2017 9:39 am

Wed Feb 27, 2019 9:39 am

Hi,

Thanks for your feedback.
If you need further assistance, please feel free to contact us.
Wish you all the best!

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Mon Mar 06, 2023 9:01 pm

Glad to hear you're trying out the Free Spire Barcode software. The free version is limited to reading one barcode at a time, but the paid version should allow you to read multiple barcodes.

nisayvxfedgvjk
 
Posts: 1
Joined: Mon Mar 06, 2023 9:00 pm

Tue Mar 07, 2023 2:28 am

Hello,

Thanks for your inquiry.
For commercial version of Spire.Barcode, if there are multiple barcode in one image, all barcodes can be identified. However, for multi page tiff file, as my colleague Nina said, you have to split it into single-page tiff file first, then scan each tiff file.
If you have any issue, just feel free to contact us.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 860
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.BarCode