If you play with the padding you can even have text outside the cell. 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Ary Junior
> Sent: Friday, December 16, 2005 2:28 PM
> To: [email protected]; Vineet Reynolds
> Subject: Re: [iText-questions] Height of a Paragraph inside a PdfPCell
> 
> Hi! Answering to my own question: Yes, there is a way! I do it:
> 
> ...
> pCell = new Paragraph("teste");
> ...
> pCell.setLeading((pCell.leading()/2)+2);
> ...
> cell.addElement(pCell);
> ...
> 
> I get the row height how as I want. I know that it isn't the 
> better way 
> but it's working now. When I put a Paragraph inside the cell height 
> can't have the same height of the String. Anybody can answer 
> to me why 
> this is happening?
> 
> []s
> 
> Ary Junior
> 
> Ary Junior wrote:
> 
> > Hi, is there any way to get the same efect of the 
> > table.addCell("teste") when I use the paragraph with the 
> string inside 
> > a pdfpcell? The cell height can't have the same height of 
> the String?
> >
> > Thanks very much!
> >
> > Ary Junior
> >
> > Paulo Soares wrote:
> >
> >> The font name is "Times-Roman". To be safe use 
> >> Font.getCalculatedBaseFont().
> >>
> >> 
> --------------------------------------------------------------
> ----------
> >> *From:* [EMAIL PROTECTED] on 
> behalf of Ary 
> >> Junior
> >> *Sent:* Thu 08-Dec-05 14:02
> >> *To:* [email protected]
> >> *Subject:* [iText-questions] Height of a Paragraph inside 
> a PdfPCell
> >>
> >> Hi, please, ignore my last post. I need to put a String inside a
> >> Paragraph and the Paragraph inside the PdfPCell. If I do:
> >>
> >> ...
> >> pCell = new Paragraph("teste");
> >> ...
> >> cell.addElement(pCell);
> >> ...
> >> table.addCell(cell);
> >> ..
> >>
> >> The cell height is major than the "teste" string height. 
> Now, If I do:
> >>
> >> ...
> >> table.addCell("teste");
> >> ...
> >>
> >> The cell height is the same of the "teste" string height. 
> It's very good
> >> but I need to put the paragraph inside the cell. I'm trying use:
> >>
> >> ...
> >> pCell = new Paragraph("teste");
> >> ...
> >> Font font = FontFactory.getFont("TimesRoman", 9, Font.NORMAL, new
> >> Color(0,0,0));
> >> BaseFont bf = font.getBaseFont();
> >> pCell.setLeading(bf.getAscentPoint("teste", 
> font.getCalculatedSize()) -
> >> bf.getDescentPoint("teste", font.getCalculatedSize()));
> >> ...
> >> cell.addElement(pCell);
> >> ...
> >> table.addCell(cell);
> >> ..
> >>
> >> But the method font.getBaseFont() return null. Please, help me!
> >>
> >> []s
> >>
> >> Ary Junior
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc. Do you grep through 
> >> log files
> >> for problems?  Stop!  Download the new AJAX search engine 
> that makes
> >> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> >> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click 
> >> <http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>
> >> _______________________________________________
> >> iText-questions mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/itext-questions
> >>
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log 
> > files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to