Hi,

I am getting error in createBARCodeEANSUPP. Can you please let me know the 
solution?

The method createTemplateWithBarcode(PdfContentByte, BaseColor, BaseColor) in 
the type Barcode is not applicable for the arguments (PdfContentByte, null, 
Color)

The method createImageWithBarcode(PdfContentByte, BaseColor, BaseColor) in the 
type Barcode is not applicable for the arguments (PdfContentByte, null, Color)


See the below code

public Image createBARCodeEANSUPP(String myTextPrimary,
            String myTextSupplementary5) {
      PdfTemplate pdfTemplate = contentByte.createTemplate(0, 0);
      BarcodeEAN myBarcodeEAN = new BarcodeEAN();
      myBarcodeEAN.setCodeType(Barcode.EAN13);
      myBarcodeEAN.setCode(myTextPrimary);

//    createTemplateWithBarcode returns PDF template

      PdfTemplate ean = 
myBarcodeEAN.createTemplateWithBarcode(contentByte,null, Color.blue);
      BarcodeEAN codeSUPP = new BarcodeEAN();
      codeSUPP.setCodeType(Barcode.SUPP5);
      codeSUPP.setCode(myTextSupplementary5);
      codeSUPP.setBaseline(-2);
      BarcodeEANSUPP eanSupp = new BarcodeEANSUPP(myBarcodeEAN, codeSUPP);
      Image imageEANSUPP = eanSupp.createImageWithBarcode(contentByte, 
null,Color.blue);
      return imageEANSUPP;
}

Thanks & regards,
SaravananMarimuthu,

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to