문제

I am using iText for java. I am trying to create a Code128 barcode with a FNC3 character at the beginning of the barcode. Can anyone help me with this? Here is my code:

try {
Barcode128 barcode = new Barcode128();
barcode.setCode((char)228 + "92");
Image img = barcode.createAwtImage(Color.black, Color.white);
lblBarcode.setIcon(new ImageIcon(img));

}
catch(Exception ex) {
  ex.printStackTrace();
}
도움이 되었습니까?

해결책

To have a code that starts with FNC3 use barcode.setCode(""+FNC3+<rest of barcode>). The FNC3 constant is located in com.itextpdf.text.pdf.Barcode

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top