Code128A Compliance Barcodes Created Using iTextSharp and Barcode.4NET

First of all, I am new to barcode formats and know what I know from Wikipedia.

We have several barcodes created by an existing application that uses the Barcode.4NET library. The barcode is in Code 128A format. The code to create them is pretty simple, looking something like this:

// Create the barcode
Code128ABarcode c128A = new Code128ABarcode("045746201627080857");

No other parameters are set for it - after installing the data, we just get the version of the GIF barcode from the library.

I am working on a new application that uses iTextSharp to generate PDF, and I thought that instead of using two libraries, I would use the iTextSharp barcode library because it supports Code128 barcodes. It has several different options for code 128, but none of them are “code 128A.”

Here is the code for it:

Barcode128 code128 = new Barcode128();
code128.CodeType = Barcode.CODE128;
code128.ChecksumText = true;
code128.GenerateChecksum = true;
code128.StartStopText = true;
code128.Code = "045746201627080857";

The image below shows what I have done so far.

alt text

The image above is created by iTextSharp, and the bottom using Barcode4Net. Obviously, they do not match (and not just in size and font), the barcodes are quite different).

Is anyone there quite familiar with the iTextSharp (or iText) barcode components or Code 128A barcodes to tell me how to make iTextSharp look just like Barcode.4NET one?

+3
3

? 128 , - ; .

B, . http://www.barcodeisland.com/code128.phtml

iTextSharp , C, , . 2 , .

+3

:

*045746201627080857*

, - , , .

BC.

,

code128.StartStopText = true;

, false, -.

Code128ABarcode c128A = new Code128ABarcode("*045746201627080857*");

:)

:

-:

alt text http://www.bcgen.com/demo/linear-dbgs.aspx?D=045746201627080857&S=13&CS=1

( ID Automation):

http://www.bcgen.com/demo/linear-dbgs.aspx?D=045746201627080857&S=13&CS=1

:

alt text http://www.bcgen.com/demo/linear-dbgs.aspx?D=045746201627080857&S=13&CS=3

Code128C Code128A, ( - Code128C)

http://www.bcgen.com/demo/linear-dbgs.aspx?D=045746201627080857&S=13&CS=3

+3

, balexandre , .

, Barcode.4NET - Code 128A, .

iTextSharp - Code 128C, , , , , , , : " !"

, , " - Code 128A iTextSharp?"

+1

Source: https://habr.com/ru/post/1699643/


All Articles