Free Support Forum - aspose.com

Non printable characters support in PDF417 barcodes in .NET

Hi,

I’m evaluating Aspose.BarCode (version 4.3.0.0) for generating PDF417 barcodes. I’m trying to generate a barcode that contains non printable characters, but some of them are not included in the barcode.

Here’s a sample code snippet that I’ve tried:

string text = “”;
for (int i = 0; i < 180; i++)
{
text += i.ToString() + ": " + char.ConvertFromUtf32(i);
text += “\n”;
}
text = text.PadRight(1500, ’ ');

BarCodeBuilder barcode = new BarCodeBuilder();
barcode.SymbologyType = Aspose.BarCode.Symbology.Pdf417;
barcode.CodeText = text;
barcode.xDimension = 0.3f;
barcode.yDimension = 0.9f;
barcode.Columns = 13;
barcode.Pdf417ErrorLevel = Pdf417ErrorLevel.Level5;
barcode.Pdf417CompactionMode = Pdf417CompactionMode.Text;
barcode.CodeLocation = CodeLocation.None;

barcode.GenerateBarCodeImage().Save(@“D:\test.gif”, ImageFormat.Gif);


When I execute this and then scan the result, it seems that the characters for the following ascii codes are missing:
1-8, 11, 12, 14-31, 127-179

Is there some type of encoding or some other method that I should be using to make these characters appear in the barcode?

Thanks,
Glen

Hi Glen,


Thank you for your inquiry.

I have forwarded a request to the development team to provide a more detailed insight of BarCodeBuilder class for generating PDF417 barcodes. As soon as I get any news, I will let you know here.

According to my knowledge, PDF417 can encode text characters from ASCII 32 to ASCII 127 in Text Compaction mode.

Regards,

Hi Glen,


An investigation has been logged to probe further into this matter. For your reference, Tracker Id is BARCODENET-33129.

Regards,
Thanks Babar,

I see that the status of this issue is 'Fixed'. Could you tell me the expected release date for the updated version?

Thanks,
Glen

HI Glen,


The ticket associated with this thread is an investigation ticket. The development team has marked it “Fixed” after submitting their results. The DataMatrix barcode when generated with CompactionMode as Text allows the codes 9, 10, 13, 32-126 from ASCII table.

When you said “The DataMatrix barcode when generated with CompactionMode as Text allows the codes”, did you mean that the dev team was able to successfully produce and scan barcodes with these characters?


I’ve updated to the latest version of your assemblies (4.5.0), and I still have this problem. The only other possibility that comes to mind is that the problem is with our scanner, but I’ve tried multiple types of scanners that all work with barcodes generated in our current Java environment. We are moving to .Net and away from these components, and Aspose.BarCode for .Net has been our most promising option so far. But when I scan it’s barcodes, these non-printable characters are not included. Are there any other possibilities that may come in to play?

Thanks,
Glen

Hi,

The project that I’m working on has a hard deadline that is approaching quickly. Would there be a way for me to speak with someone on the phone about this issue? Everything that we’ve tested so far with your assembly has gone very smoothly and works great, but if I can’t get this character issue worked out quickly, then I may need to look into other options.

A phone call may help me work out my problems much quicker, but I haven’t seen a phone number anywhere on your website for tech support… is this a possibility?

Thanks,
Glen

Hi Glen,


Please accept my apologies for not replying early.

I am afraid that we provide support via forums and Banckle Live Chat. That is why there are no phone numbers available for this purpose.

drumboog:
When you said “The DataMatrix barcode when generated with CompactionMode as Text allows the codes”, did you mean that the dev team was able to successfully produce and scan barcodes with these characters?

I can confirm you that the character range provided in my reply here is encoded properly in the attached image. Also attached to this reply are the results that I gathered by scanning the same Image. You can see for your self that ASCII codes 9, 10, 13, 32-126 gets properly scanned.

Please let us know if we can provide any further assistance in this regard.
Thanks,
I'm not required to use this CompactionMode... I just picked it because it is the only one that seems to support a large number of characters.

The barcodes that we need to generate will include 1361 characters. When I try to generate a large barcode, the tool does not generate any data (see attached image).

Here is a sample code snippet that generated the attached image:

BarCodeBuilder barcode = new BarCodeBuilder();
barcode.SymbologyType = Aspose.BarCode.Symbology.Pdf417;
barcode.CodeText = "".PadRight(1361, ' ');
barcode.xDimension = 0.3f;
barcode.yDimension = 0.9f;
barcode.Columns = 13;
barcode.Pdf417ErrorLevel = Pdf417ErrorLevel.Level5;
barcode.Pdf417CompactionMode = Pdf417CompactionMode.Binary;
barcode.CodeLocation = CodeLocation.None;

barcode.GenerateBarCodeImage().Save(@“D:\test.gif”, ImageFormat.Gif);


Can you tell me if I’m doing something wrong?

Thanks,
Glen

Hi Glen,


The probable reason for blank image is that the maximum limit for DataMatrix symbol in binary CompactionMode has exceeded. To get the point of view from development end, I have logged your comments to the ticket already associated with this thread and requested the development team to provide a justification for the blank image.

Thanks and Regards,

Thanks,

If this is indeed the case, could you tell me what the limit is? Is this a limit imposed by the PDF417 specification, or is it a limitation of Aspose.Barcode?

It seems like my only options are using a CompactionMode of Text (which doesn’t allow special characters), or using a CompactionMode of Binary (which has a size limitation). Is there a way to satisfy both requirements? I am able to produce this barcode with a Java product (barcode4j), so I know it’s possible; but we’re trying to move to a .Net solution. Is this possible with Aspose.Barcode? Any help you could provide would be appreciated.

Thanks,
Glen

Hi Glen,


Thank you for your response.

I have discussed this matter with the development team in detail. Our first priority is to investigate the maximum limit for different Compaction Modes of PDF417 symbol and to find a workaround for your situation. If this requires a fix then we may take sometime to provide the new implementation.

We are currently working on this. As soon as I receive any updates, I will post here for your reference.

Hi Glen,


Thank you for your patience.

We have recently made some changes to the PDF417 symbol generator to reflect ISO Standard 15438. Please find below the details according to different Compaction Modes,

Maximum possible number of data characters per symbol (at error correction level 0): 925 data codewords which can encode:
  1. Text Compaction mode: 1 850 characters (at 2 data characters per codeword).
  2. Byte Compaction mode: 1 108 characters (at 1,2 data characters per codeword).
  3. Numeric Compaction mode: 2 710 characters (at 2,93 data characters per codeword)

At the minimum recommended error correction level (5), there is a maximum of 863 data codewords which can encode:
  1. Text Compaction mode: 1 726 characters (at 2 data characters per codeword).
  2. Byte Compaction mode: 1 033 characters (at 1,2 data characters per codeword).
  3. Numeric Compaction mode: 2 528 characters (at 2,93 data characters per codeword).

Please note these limits for PDF417 symbol generation will be applicable with upcoming release of Aspose.BarCode for .NET v4.6.0. You will be notified via this thread, once the new release is available for public use.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.