Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Barcode overflow detection


Level 4

is there a way how to detect barcode (PDF-417) capacity is overflow? Of course another way than user can see the barcode is gray :)

My problem is, that data I get from Barcode server differs from data I put in barcode in PDF form. It is 1430 characters including some national chars.

If I switch the compression off, barcode gets grey when capacity is overflow.

If I switch the compression on, barcode still draws but data is mismatched.

It seems that capacity overflow detection does not work properly on compressed barcodes.

I tested it ono Adobe Acrobat 8 and 9. There is LC ES 8.2.1 on the server.

Thank for advice.

--- Jaroslav Pavlicek
1 Reply


Former Community Member
There is currently no ".overflow" property or value you can read from the barcode to detect whether or not the barcode is going to overflow. The only real way to ensure that your barcode will not gray-out is to test the form with multiple data types and sets.

In the case of international characters, these take up more space in the barcode especially in the case of double-byte character sets. They literally take twice as much space as the ASCII character set.

Compressed barcodes are compressed using FLATE compression. If you are not using the LiveCycle decoder you will need to decompress the compressed data yourself (drop the first two bytes and decode the rest of the data stream).