Either you set the leading taking into account the image or use
ColumnText and multiplied leading.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of quantass
> Sent: Tuesday, June 19, 2007 6:24 AM
> To: [email protected]
> Subject: [iText-questions] Image as Chunk being vertically clipped
>
>
> Im using iText to display my JPG image within the PDF. My code is:
>
> //////
> Paragraph p = new Paragraph();
> p.Add(new Chunk("test1"));
> Image i =
> Image.GetInstance("http://us.i1.yimg.com/us.yimg.com/i/ww/beta
> /y3.gif");
> p.Add(new Chunk(i,0,0));
> p.Add(new Chunk("test2"));
>
> document.Add(p);
> //////
>
> The problem with the code is 90% of the vertical height of
> the image is
> being clipped since the image extends beyond the top of the
> page. What i
> was expecting was the image to appear fully on the page
> however the current
> line just has a larger height however the following line will use the
> standard leading. Basically the way HTML works.
>
> Here is a snapshot of the problem: http://i12.tinypic.com/6atixxt.png
>
> How do i resolve this problem so tha the image appears
> properly on the page
> as it does in HTML. So basically the entire image is shown however the
> adjacent text still appears at its baseline.
>
> Any ideas?
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/