Greetings,

I want to add image and text together in one table cell. Here is waht I am 
trying to do.

-----------------------------
BaseFont helvetica = BaseFont.createFont("Helvetica", BaseFont.CP1252, 
BaseFont.NOT_EMBEDDED);
Font font7 = new Font(helvetica, 7, Font.BOLD, Color.BLUE);
                        
Image img = Image.getInstance("C:\\Folder-yellow-large.gif");
                                        
Chunk c = new Chunk("sample text ", font7);
cell = new Cell(img);
cell.add(c);

cell.setBorder(Rectangle.RIGHT | Rectangle.LEFT | Rectangle.BOTTOM | 
Rectangle.TOP);
cell.setBackgroundColor(Color.RED);
cell.setNoWrap(true);
                                        
table.addCell(cell);

-----------------------------

in the output I don't see my text though just image. But if I remove 
setBackgroundColor call then I can see both. Is this is bug? I tried to move 
the call 'setBackgroundColor' to different places but the same result. Is 
there a work around it? What I am doing wrong?

Appreciate any response.

Shailesh



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to