Subject: 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 =
p.Add(new Chunk(i,0,0));
p.Add(new Chunk("test2"));


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:

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?

View this message in context:
Sent from the itextsharp-questions mailing list archive at

This 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.