Hi i have this code :
   PdfContentByte cb = writer.getDirectContent();
     
    BaseFont bf = BaseFont.createFont("src/Ocrb.ttf",
BaseFont.WINANSI,BaseFont.EMBEDDED);
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    
    String time=sdf.format(cal.getTime());
    cb.setColorFill(BaseColor.BLACK);
    cb.beginText();
    cb.setTextMatrix(35, 560);
    cb.setFontAndSize(bf,size);
    cb.showText(nome);
    cb.endText();

    Barcode39 code39 = new Barcode39();
    code39.setCode(codigo);
    code39.setBaseline(-1);
    code39.setFont(bf);
    code39.setSize(size);
    code39.setTextAlignment(0);
    document.add(code39.createImageWithBarcode(cb, null, null));

i would like to know how to set the text position on method setTextMatrix
according the position of the barcode because i can have several barcodes
and i want for example the text above each barcode.Can i get 
"code39.getTop();code39.getLeft(),etc,etc..."?



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/text-position-according-barcode-tp3911575p3911575.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to