The alignment is done by the leading not by the capheight. Try something like this to align it by the cap:
table.getDefaultCell().setPaddingTop(bf.getFontDescriptor(BaseFont.CAPHEIGHT , fontSize) - fontSize + 2); Best Regards, Paulo Soares > -----Original Message----- > From: Sergio Lopez Rodriguez [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, March 14, 2002 10:41 > To: [EMAIL PROTECTED] > Subject: [iText-questions] Vertical aligment in PdfTables curiosity > > I've seen sth curious related to vertical alignment in cells (see > TablesMiddle.java and jpg attached) and it's that there's always a slight > difference between the text and the upper border, and the text with the > lower border of the cell. > In the java attached in the first cell i don't fix the height so the > effect > it looks more clear.... > It's not a big problem for what i intend to do but I am curious about this > and if there's a way to solve it better ... anyway it's just a tiny thing > :-) > > Regards > > Sergio > > ----------------------------------------------------------------------- > Este mensaje y los documentos, que en su caso, lleve anexos, pueden > contener informacion confidencial y ata�e exclusivamente a las personas > a las que va dirigido. Cualquier opinion en el contenida, es exclusiva de > su autor y no representa necesariamente la opinion de AZERTIA. > Si usted no es el destinatario de este mensaje, considerese advertido de > que lo ha recibido por error y que cualquier uso, difusion o copia estan > prohibidos legalmente. Si ha recibido este mensaje por error, le rogamos > que nos lo comunique por la misma via o al telefono 93 207 55 11 y proceda > a destruirlo inmediatamente. > > This email is confidential and intended solely for the use of the > individual > to whom it is addressed. Any views or opinions presented are solely those > of the author and do not necessarily represent those of AZERTIA. > If you are not the intended recipient, be advised that you have received > this email in error and that any use, dissemination, forwarding, printing, > or copying of this email is strictly prohibited. > If you have received this email in error please notify it to AZERTIA > by telephone on number +34 93 207 55 11. > ----------------------------------------------------------------------- > << File: TableMiddle.jpg >> << File: TablesMiddle.java >> _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
