We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unreadable PDF417 barcode when CodeText exceeds certain length

I need to generate a PDF417 barcode that fill fit within a certain space so I'm evaluating your product. I have configured BarCodeBuilder to generate a barcode that has a fixed size. It seems that if I set CodeText to a string that exceeds a certain length (which varies depending on settings) an unreadable barcode is generated.

Is this the expected behavior or should an error occur when CodeText contains more data than can be encoded?
Hi Seth,

Thank you for your inquiry.

Following are the details about Aspose.Barcode specification regarding PDF417 encoding:

Encodable Character Set : All 128 ASCII Characters (including extended)
Code Type : Continuous, Multi-Row
Symbol Height : 3 - 90 Rows
Symbol Width : 90X - 583X
Bidirectional Decoding : Yes
Error Correction Characters : 2 – 512
Maximum Data Characters : 1850 text, 2710 digits, 1108 bytes

We have conducted several tests at our end. It was found that if Encoded data length: 1843 and Max available length: 1110 is used, it worked perfectly. Note that we have used the Aspose.BarCode for .NET version 7.7.0.

Furthermore please provide us more details about the issue that you are facing to reproduce the exact situation.

Here is a code sample that results in the behavior I described. When I run the code as is, a barcode is generated that I am unable to scan successfully. When I reduce the CodeText to 600 characters (all else equal), I am able to scan the generated barcode successfully. I am using version of the library.
var b = new Aspose.BarCode.BarCodeBuilder();            
b.SymbologyType = Aspose.BarCode.Symbology.Pdf417;
b.Pdf417ErrorLevel = Pdf417ErrorLevel.Level4;
b.Pdf417CompactionMode = Pdf417CompactionMode.Text;
b.GraphicsUnit = System.Drawing.GraphicsUnit.Inch;
b.Resolution = new Resolution(300f, 300f, ResolutionMode.Customized);
b.Margins = new Aspose.BarCode.MarginsF(0F, 0F, 0F, 0F);
b.CodeLocation = CodeLocation.None;            
b.xDimension = .010f;
b.yDimension = .030f;
b.Columns = 15;
b.Rows = 23;
b.AutoSize = false;
b.ImageWidth = 3.25f; 
b.ImageHeight = .7f;
b.CodeText = ("*").PadLeft(650, 'A');
b.Save(@"PDF417.jpeg", BarCodeImageFormat.Jpeg);
Hi Seth,

Thank you for writing us back and providing sample code.

We have tested the scenario at our end and it was found that the issue persists. The issue has been logged into our issue tracking system with ID BARCODENET-34400. Our product team will further look into this issue. We will update you accordingly via this thread.

Any progress on this?

Hi Seth,

Thank you for your inquiry.

Our product team is working on this issue. A fix for this issue will be available in the upcoming release that is Aspose.BarCode for .Net 7.8.0. Once Aspose.BarCode for .Net 7.8.0 version is made available for public use, you will be updated via this forum thread.

The issues you have found earlier (filed as BARCODENET-34400) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.