Eric Summkeller wrote:

> Any idea how I could resolve this problem. Or has someone any idea how I 
> could 
> change the programcode that I don't need to add Paragraphs into a PdfPCell.

I'm not sure what you mean with that last remark,
but in the code sample below, I eliminated the need
for using a paragraph, and I solved the overwriting
problem:

> PdfPTable table = new PdfPTable(1);
> 
> Chunk chunk1 = new Chunk("Test\n");
> Phrase phrase1 = new Phrase();
> phrase1.add(chunk1);
> 
> Image image1 = Image.getInstance("Test.gif");
> Chunk chunk2 = new Chunk(image1, 0, 0);
> Phrase phrase2 = new Phrase();

phrase2.setLeading(image1.scaledHeight());

> phrase2.add(chunk2);

// removed some lines

> PdfPCell cell = new PdfPCell();

cell.addElement(phrase1);
cell.addElement(phrase2);

> table.addCell(cell);

Other improvements are possible, but this probably
solves your problem.
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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/

Reply via email to