-none- 2007-09-14 - By ?? ??
Back This is my first contact to you, and also I'm not good at English. So sorry you must be patient to understand my poor English mail.
I'm a beginner of iText and have some question as follows. I define table and cell as bellow. And as for the result of this execution, the characters in cell are small in comparison with the high of cell, so about 30% of blank space will be allocated. I'd like to make narrow that space but I can't do that. So I'm glad to be ad viced to collect the use of cell class. Thanks in advise and best regards, Ken Fujii from Japan.
=============================================================================== ============= Font font12g = getFont(12, IConst.FONT_NORMAL, IConst.FONT_NORMAL, IConst.FONT _NORMAL, IConst.FONT_GOTHIC, Color.black); Table table = new Table(7); table.setWidth(100); int table_width[] = {3,3,2,4,1,3,8}; table.setWidths(table_width); table.setDefaultHorizontalAlignment(Element.ALIGN_CENTER); table.setDefaultVerticalAlignment(Element.ALIGN_MIDDLE); table.setPadding(0); table.setSpacing(0); table.setBorderColor(new Color(0, 0, 0)); table.setBorder(Rectangle.NO_BORDER); table.setAutoFillEmptyCells(true);
Cell cell;
cell = new Cell(new Phrase("AAAAAA", font12g)); cell.setBorderColor(Color.gray); cell.setGrayFill(0.8f); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); table.addCell(cell); cell = new Cell(new Phrase("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", font12g)); cell.setBorderColor(Color.gray); cell.setColspan(6); cell.setHorizontalAlignment(Element.ALIGN_LEFT); cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
table.addCell(cell); =============================================================================== ===========
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|