So I inherited this code, or should I say, someone developed this and moved on and now we are having a problem with it and I'm looking into it...
We are generating c128 barcodes and upon having them certified they noticed an issue that I can't see to figure out. The width of a bars/spaces is 10.5 mils and they acceptable range is 15-21 mils (1 mil = .001 inch).
The rendering code is based off this library: http://www.codeproject.com/KB/GDI-plus/GenCode128.aspx but has been modified some...
The barcodes being generated are all alpha-numeric, no special characters. I thought the width of the bar + space was dependent on the character being encoded.
Here are the settings being used:
settings.Font = new Font ( FontFamily.GenericSansSerif, 12 );
settings.TopMargin = 10
settings.BottomMargin = 10
settings.LeftMargin = 10
settings.RightMargin = 10
settings.BarCodeHeight = 80
settings.DrawText = true
settings.BarCodeToTextGapHeight = 10
settings.InterCharacterGap = 2
If I was guessing, I think it's because the width of the bars is being based on the height of the barcode instead of the height of the barcode being based on the length of the text and barcode. But I'm not too familiar with the spec (even after reviewing it), and I'm a novice C# programmer at best...
GenCode128.dll
in NuGet: nuget.org/packages/GenCode128 Also the source can be found in GitHub: github.com/SourceCodeBackup/GenCode128 – Bipropellant