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 Jan 17, 2017 4:36 am

Hi support.

Barcode image over height, scan barcode can't read it. Please view image attached.(Picture 1)
Image

i want barcode img show same picture 2

Image

Please support for me!

Thank and best regards!

thanhnv
 
Posts: 1
Joined: Tue Jan 17, 2017 3:42 am

Tue Jan 17, 2017 6:50 am

Dear thanhnv,

Thanks for your inquiry.
Please set the barcode unit as pixel by code, here is entire code for your reference.
Code: Select all
            BarcodeSettings settings = new BarcodeSettings();
            settings = new BarcodeSettings();
            string data = "B1TAITUE/NGUYEN 123456 BjGVBLCKE 0786 018Y000 0001 147>1181 7017BKL 0000000000029041000000000000";
            settings.Type = BarCodeType.Pdf417;
            //set the unit as pixel.
            settings.Unit = GraphicsUnit.Pixel;
            settings.Data = data;
            settings.Data2D = data;
            BarCodeGenerator generator = new BarCodeGenerator(settings);
            Image barcode = generator.GenerateImage();
            barcode.Save("PDF417.png", System.Drawing.Imaging.ImageFormat.Png);
            string[] datas;
            datas = Spire.Barcode.BarcodeScanner.Scan(@"PDF417.png");

If there still is issue, please provide us your sample code for investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.BarCode