barnhill / barcodelib

C# Barcode Image Generation Library
Apache License 2.0
736 stars 239 forks source link

Add support for initial FNC1 char in a GS1-C128 barcode #206

Closed nranopter closed 1 month ago

nranopter commented 5 months ago

In current version if you try to add a GS1-C128 barcode with an initial FNC1 char and using dynamic C128 you will get the following error:

"System.Exception: EC128-3: Could not insert start and code characters. Message: EC128-2: Could not determine start character."

This fix allows the FNC1 char to be added to the start of the barcode.

nranopter commented 1 month ago

Resolves #179

nranopter commented 1 month ago

Merged my branch with master and fixed tests that is failing.

New take is to replace the FNC1 char with FNC1 codeword instead. Seems to work better.

nranopter commented 1 month ago

After testing realized that FNC1 wasn't properly added on a dynamic barcode. Will update this