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 =
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?

--
View this message in context:
http://www.nabble.com/Image-as-Chunk-being-vertically-clipped-tf3944334.html#a11188606
Sent from the itextsharp-questions mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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/


...



Privacy