Hi,

I have a problem with an image inside a paragraph. If I add an image using 
a chunk, the image overlaps the descender of the previous paragraph text 
(see sample code/pdf below). Is there a way to add some special leading to 
the image or paragraph? It seems to be the same problem when using 
ColumnText.

Regards
Bernd

       try {
            Document document = new Document(PageSize.A4, 50, 50, 150, 
72);
            PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream(basePath + "image.pdf"));
            document.open();
            document.add(new Phrase("The quick brown fox jumps over the 
lazy dog"));
            document.add(new Phrase("\n"));
            document.add(new Chunk(Image.getInstance(new 
URL("http://www.lowagie.com/iText/images/logo.gif";)), 0, 0, true));
            document.add(new Phrase("The quick brown fox jumps over the 
lazy dog"));
            document.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

Attachment: image.pdf
Description: Binary data

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to