On Fri, 3 May 2002, Paulo Soares wrote:

> PdfPCell aligns correctly, the problem is what is your mid reference: mid
> ascent, mid cap height, mid leading, mid something?
> The alignment is done by the leading. Try something like this to align it by
> the cap (if this is what you need):
>
> table.getDefaultCell().setPaddingTop(bf.getFontDescriptor(BaseFont.CAPHEIGHT
> , fontSize) - fontSize + 2);

Thanks - I was able to achieve the desired results with the following
code:

cell.setPaddingTop(-5);
cell.setPaddingBottom(5);

Joshua


> > -----Original Message-----
> > From:       Joshua C. Lerner [SMTP:[EMAIL PROTECTED]]
> > Sent:       Thursday, May 02, 2002 21:03
> > To: [EMAIL PROTECTED]
> > Subject:    [iText-questions] Vertical alignment in PdfPCell
> >
> > Hi - I see that there have been questions on this topic before - how to
> > align text vertically in a PdfPCell. I read the posts but I'm not sure
> > what if anything I'm doing wrong.
> >
> > The online docs note that "you can't always trust on the vertical
> > alignment." Is there any workaround I can try?

[snip]


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to