|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Formatting with ColumnTextHi all,
I need a little help on this issue. New to iText and I just managed to get my pdf into working. The problem that I am having now is that I can't manage to set the font and the font-size properly. Text showing and all, but it doesn't seem to considers this line cb.setFontAndSize(ff ,10); at all. Any help would be deeply appreciated. Greetings, al P.S. And the code: // Base Font BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED); // Text Font BaseFont ff = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED); int page = 2; stamper.insertPage(page, PageSize.A4); PdfContentByte cb = stamper.getOverContent(page); cb.setFontAndSize(ff ,10); ColumnText ct = new ColumnText(cb); ct.setSimpleColumn(new Phrase("Anhang zum Phytosanitären Transportdokument Nr.: EG/DE/" + dienststelleKuerzel + " " + antrag_id + "\n"), 36, 36, PageSize.A4.width() - 36, PageSize.A4.height() - 36, 10, Element.ALIGN_LEFT); ct.setSimpleColumn(new Phrase( "Besondere(s) Kennzeichen, Anzahl, Zahl der Packstücke, Menge (Gewicht/Einheiten)\n"), 36, 36, PageSize.A4.width() - 36, PageSize.A4.height() - 36, 18, Element.ALIGN_LEFT); ct.setSimpleColumn(new Phrase(kennZ.toString()), 36, 36, PageSize.A4.width() - 36, PageSize.A4.height() - 36, 18, Element.ALIGN_LEFT); ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ itextsharp-questions mailing list itextsharp-questions@... https://lists.sourceforge.net/lists/listinfo/itextsharp-questions |
|
|
Re: Formatting with ColumnTextHave not worked with ColumnText, but have you tried setting the font on the Phrase element instead?
|
|
|
Re: Formatting with ColumnTextHi Steve,
thanks for your help. It worked perfectly. Greetings, al 2009/9/9 steve_c22 <mobettaut@...>
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ itextsharp-questions mailing list itextsharp-questions@... https://lists.sourceforge.net/lists/listinfo/itextsharp-questions |
| Free embeddable forum powered by Nabble | Forum Help |