cfCode128 ( chaine )
Calculate optimized barcode symbols for shortest string length in Code 128 barcode font (Table B and C Alpha-numeric and ASCII punctuation symbols only, no special command codes from Table A)
Be the first to rate this function Log in to vote
Nathan Brand - Show more from this author
Gunntech Mfg. Inc. / Bullet Tools http://www.bullettools.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Calculate optimized barcode symbols for shortest string length in Code 128 barcode font (Table B and C Alpha-numeric and ASCII punctuation symbols only, no special command codes from Table A). Filemaker 18 required (may be compatible with later versions too).
Beware that there is an older version of the code128.ttf font being distributed which has a different mapping for the control characters. I recommend deleting all old code128 fonts and installing the one from the OpenBarcodes project if you plan to use this script as-is.
My testing with this barcode font showed that a font size of 32pt or larger can be read reliably at various distances with a WASP brand USB barcode reader, but smaller than 30pt is almost impossible for the scanner to read at any distance. Do include at least 1/4" of whitespace before and after your barcode so that your scanner can read it appropriately.
cfCode128(chaine)
chaine: string to be used as a barcode.
Use with Code128.ttf version 2.0 as provided by GrandZebu in the OpenBarcodes project
https://sourceforge.net/projects/openbarcodes/
Version 1.00
Written By Nathan Brand Aug 2019
For Filemaker 18 or above
Based on the code/algorithm created by GrandZebu
https://grandzebu.net/informatique/codbar-en/code128.htm
Notable changes:
1. Non ASCII characters replaced with "0" zero characters
2. It runs in Filemaker!
3. An empty string will return the barcode for "0" with appropriate start, stop, and checksum.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.