Code 128 mode C

Questions, comments and suggestions concerning VintaSoft Barcode .NET SDK.

Moderator: Alex

Post Reply
andevia
Posts: 2
Joined: Mon Nov 21, 2011 11:15 am

Code 128 mode C

Post by andevia » Mon Nov 21, 2011 11:36 am

Hello,

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


Thanks,

Hafe

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: Code 128 mode C

Post by Alex » Mon Nov 21, 2011 3:44 pm

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

andevia
Posts: 2
Joined: Mon Nov 21, 2011 11:15 am

Re: Code 128 mode C

Post by andevia » Mon Nov 21, 2011 7:25 pm

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

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: Code 128 mode C

Post by Alex » Tue Nov 22, 2011 3:51 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest