Vertical alignment in Table doesn't work correctly, use PdfPTable if that's
important to you.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Carmona Perez, David" <[EMAIL PROTECTED]>
To: "Itext-Questions (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, August 25, 2003 10:28
Subject: [iText-questions] Vertical alignment of cells


> Hi,
>
> When the rowspan is > 1, vertical aligment doesn't work very well, it
> doesn't take into account the needed height of the data.  I don't
> understand the vertical aligment of the source code (class
> com.lowagie.text.pdf.PdfCell)
>
> Please can anyone help?
>
> I've found in the mailing list archives, people like this, that have had
> the same problem, but I haven't seen any solution:
>
>
> Subject: vertical alignment when using row spanning or items with
> differentsizes.
> From: Fred Romelfanger <
> <http://search.gmane.org/search.php?email=fred%21stsci.edu&group=gmane.c
> omp.java.lib.itext.general> fred <at> stsci.edu>
> Date: Mon, 28 Apr 2003 23:08:23 -0400
> Newsgroups:  <http://news.gmane.org/gmane.comp.java.lib.itext.general>
> gmane.comp.java.lib.itext.general
>
> I am having a problem with getting vertical alignment to work with
> cells in a row being different sizes, or with row spanning.
> Basically all I get is something like ALIGN_TOP no matter which one
> I use.  Horizontal alignment seems to work fine.  Looking at the source
> it appears that vertical alignment only works with the leading and
> spacing in the cell, but doesn't take into account the actual height of
> the cell.  PdfPTable appears that it would correctly handle the
> alignment, but I don't see any way to create a PdfPTable through the
> PdfWriter interface.  I also tried spanning rows and get a very similiar
> behavior.  I can put in empty cells above the middle and the right cells
> and while making the first cell span several rows, and get closer but
> that seems somewhat over complicated.
>
>      void makeHeader(Table headerTable, Image im, Phrase headerCenter,
> Phrase headerRight) {
>          Cell cell = new Cell(im);
>          cell.setVerticalAlignment(cell.ALIGN_BOTTOM);
>          cell.setHorizontalAlignment(cell.ALIGN_LEFT);
>          headerTable.addCell(cell);
>          cell = new Cell(headerCenter);
>          cell.setVerticalAlignment(cell.ALIGN_BOTTOM);
>          cell.setHorizontalAlignment(cell.ALIGN_CENTER);
>          headerTable.addCell(cell);
>          cell = new Cell(headerRight);
>          cell.setVerticalAlignment(cell.ALIGN_BOTTOM);
>          cell.setHorizontalAlignment(cell.ALIGN_RIGHT);
>          headerTable.addCell(cell);
>      }
>
> Also images in cells seem to have extra space at the bottom not in the
> original image.
>
> Any suggestions would be helpful.
>                               Thanks,
>                                  Fred Romelfanger
>                                  fred <at> stsci.edu
>
> --------
> David
>
>



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to