Page 1 of 1

Code 128 mode C

Posted: Mon Nov 21, 2011 11:36 am
by andevia
Hello,

I need to force mode C in code 128 with barcodewriter : how to do this ?


Thanks,

Hafe

Re: Code 128 mode C

Posted: Mon Nov 21, 2011 3:44 pm
by Alex
Hello,

Barcode writer has built-in algorithm which determines the best compression mode for barcode value. Mode C is used by default for Code 128 barcodes if value of barcode contains even number of digits.

Do you have any problems?

Best regards, Alexander

Re: Code 128 mode C

Posted: Mon Nov 21, 2011 7:25 pm
by andevia
Hello,

In fact our customer have 13 digits barcode :
- 3 first digits with mode A or mode B encoding
- 8 following digits with mode C encoding
- 2 last digits with mode A or mode B encoding

He make this for barcode length and we can't change his specifications : he tell us that it's possible in barcode 128 specifications (and it's true).
Is there any solution to do this with Vintasoft BarcodeWriter ?


Best regards,

Andevia

Re: Code 128 mode C

Posted: Tue Nov 22, 2011 3:51 pm
by Alex
Hello Andevia,

We have added the ability to use mixed modes when Code 128 barcode is created in version 6.0.1.1 of VintaSoftBarcode.NET SDK.

Here is a snippet of code which you must use since version 6.0.1.1:

Code: Select all

Code128ValueItem part1 = new Code128ValueItem("123", Code128EncodingMode.ModeB);
Code128ValueItem part2 = new Code128ValueItem("12345678", Code128EncodingMode.ModeC);
Code128ValueItem part3 = new Code128ValueItem("12", Code128EncodingMode.ModeB);

BarcodeWriter writer = new BarcodeWriter();
writer.Settings.Barcode = BarcodeType.Code128;

writer.Settings.ValueItems = new ValueItemBase[] { part1, part2, part3 };

Image barcodeImage = writer.GetBarcodeAsBitmap();
Best regards, Alexander