PDF417 supported characters in text compaction mode

Hi there,

I have a problem generating PDF417 barcode with some special symbol characters, here is testing code.

BarCodeBuilder bb = new BarCodeBuilder();
bb.CodeText = “1F7D07D7-3E81-4DE4-AEA7-58DDE1D93857\r\n\r\n;L;L SFSDF FDSLKKPPÊFMKJ KJSDF; K F DSHFKDSLKF JJ2,;LL;0932=09=**&$#@$#@#(*& DSFKDJFDS;LFSAKJDF;LLKJF\r\nHELLO WORLD”;
bb.SymbologyType = Symbology.Pdf417;
bb.Pdf417CompactionMode = Pdf417CompactionMode.Text;
bb.AutoSize = true;
bb.Save(“testcode.png”);

it throws exception saying 'The CodeText is not valid for Text Compaction Mode. Try use the binary compaction mode instead’

I don’t have special characters in the text, just some symbols, I’ve tried to remove #@$& and some spaces, sometimes it works, sometimes it doens’t, I can’t find a pattern to make it work.

Hi Hui,

Thank you for your inquiry and providing sample code snippet.

We have evaluated the issue at our end. It was found the code through exception. The reason is that the barcode text contains special characters. If we use Binary compaction mode, the desired barcode can be generated. We are able to generate the barcode several times successfully. Resultant sample barcode image is attached for your reference.

Thanks for the reply. I wanted to use text mode since the output is smaller.
so what characters are special characters in this case? I did another test
set it back to text mode and use this “&$#@$#@#&”, exception is thrown
If I use “&&$$@@###”. it passed and I got the bar code.
These 2 strings contain exactly the same characters, just in different order, if the problem is caused by special characters, both should throw exception.

Hi Hui,

Thank you for writing us back.

Our product team is investigating this issue. An investigation ticket has been created into our system with ID BARCODENET-36234. We will update you about our findings via this forum thread.

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


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