LEADTOOLS Support
Document
Document SDK Questions
L_BarCodeWrite returns ERROR_BARCODE_STRING for long string
#1
Posted
:
Wednesday, November 9, 2016 4:34:59 AM(UTC)
Groups: Registered
Posts: 1
Thanks: 1 times
I started to use leadtools to generate bar codes from strings.
The problem that I recently faced is: L_BarCodeWrite returns ERROR_BARCODE_STRING for long string.
If I reduce number of characters in input string then the bar code is computed correctly. I use BARCODE_DM_10x10 size for data matrix.
Can someone explain me why is it so? And what is the correspondence between string length and barcode size?
Thank you in advance,
Wanderer.
#2
Posted
:
Friday, November 11, 2016 8:57:02 AM(UTC)
Groups: Manager, Tech Support, Administrators
Posts: 218
Was thanked: 12 time(s) in 12 post(s)
Hello,
Thank you for contacting LEADTOOLS Support. There is a direct correlation between data size and barcode symbol size. The more data you are trying to input into the barcode, the larger the symbol will need to be. There is documentation that goes into more detail regarding this here:
https://www.leadtools.com/help/l...desboundsandxmodule.htmlThere is a method in the BarcodeWriter Class called CalculateBarcodeDataBounds that can be used to calculate the exact pixel size required to write the specified barcode:
https://www.leadtools.com/help/l...tebarcodedatabounds.htmlRegarding Datamatrix barcodes specifically, there is a chart that shows the maximum length of the data based on the Symbol Size here:
https://www.leadtools.com/help/l...xbarcodeinleadtools.htmlHere is a screenshot of the table:
Please let us know if you have any further questions or issues!
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.
1 user thanked Hadi for this useful post.
LEADTOOLS Support
Document
Document SDK Questions
L_BarCodeWrite returns ERROR_BARCODE_STRING for long string
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.