Skip to content

unable to parse barcode #592

@j-thiele-fs

Description

@j-thiele-fs

i have the problem that my scanner can't parse a barcode that contains two application identifiers. The barcode i generated for a sscc works fine, but it only contains one application identifier.
here is a snippet from my code. maybe i am using the library wrong?

private static char _fnc1 = (char)29;
public static Bitmap GenerateBestBeforeBatchId128EAN(string bestBeforeDate, string batchId)
{
    string debug = $"{_fnc1}(15){bestBeforeDate}{_fnc1}(10){batchId}";
    Logger.WriteDebugLog(debug);
    
	BarcodeWriter barcodeWriter = new BarcodeWriter
	{
		Format = BarcodeFormat.CODE_128,
		Options = new EncodingOptions
		{
			Width = _barcodeWidth,
			Height = _barcodeHeight,
			Margin = _margin,
			// controls if the content string appears in the output img
			PureBarcode = false
		}
	};
	barcodeWriter.Options.Hints[EncodeHintType.GS1_FORMAT] = true;
	return barcodeWriter.Write(data);BarcodeWriter barcodeWriter = new BarcodeWriter
	{
		Format = BarcodeFormat.CODE_128,
		Options = new EncodingOptions
		{
			Width = _barcodeWidth,
			Height = _barcodeHeight,
			Margin = _margin,
			// controls if the content string appears in the output img
			PureBarcode = false
		}
	};
	barcodeWriter.Options.Hints[EncodeHintType.GS1_FORMAT] = true;
	return barcodeWriter.Write($"{_fnc1}(15){bestBeforeDate}(10){batchId}");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions