user5596139
user5596139

Reputation: 41

How do I erase the human readable text below a barcode

I have this code to generate a barcode. I want know how I can erase the human readable text below the barcode.

Barcode128 barcode128 = new Barcode128();
barcode128.setCode(strCadenaCodBarra);
barcode128.setCodeType(Barcode128.CODE128);
Cbarra = barcode128.createImageWithBarcode(cb, null, null);
Cbarra.setAbsolutePosition(10, 700);
Cbarra.scalePercent(100);
Cbarra.scaleAbsolute(305, 75);

Upvotes: 2

Views: 1933

Answers (1)

Bruno Lowagie
Bruno Lowagie

Reputation: 77546

I'm not sure why this question was down-voted. Maybe it wasn't clear to some SO visitors. The OP is trying to create a barcode, and his iText code creates an EAN-128 code that consists of bars with some text below the bars. The OP wants to suppress this text.

This can be done by setting the font to null:

barcode128.setFont(null);

By adding this line before creating the Cbarra object, you will remove the text.

Upvotes: 4

Related Questions