I have an app that fills an existing pdf with the data entered by the user.
I'm trying to change the default font size, but can't get it made ​​smaller.

My code is:

public void insertarTextoPosicion (String cadena, int pagina, int x, int y){
        PdfContentByte canvas = stamper.getOverContent(pagina);
        Phrase frase = new Phrase(cadena);
        //frase.setFont(FontFactory.getFont(FontFactory.COURIER, 2));
        
        Font helvetica = new Font(FontFamily.COURIER, 2);
        BaseFont bf_helv = helvetica.getCalculatedBaseFont(false);
        canvas.setFontAndSize(bf_helv, 12);
        
        ColumnText.showTextAligned(canvas, Element.ALIGN_LEFT, frase, x, y,
0);
    }

I tried to set the size at pdfcontentbyte or in the phrase object, but does
not change.



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

------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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