Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Other JSE/JEE APIs and the fly likes iText - Problem setting width in nested PdfPTable. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "iText - Problem setting width in nested PdfPTable." Watch "iText - Problem setting width in nested PdfPTable." New topic
Author

iText - Problem setting width in nested PdfPTable.

bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
Okay, this might be a shot in the dark...

Does anyone know how to specifically set the width of a nested PdfPTable to span more than one column of the outer table that it is embedded within?

Thank you!
bryan


"...and the Truth will set you free."
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Is adding a nested table to a table cell any different than adding text to a table cell? Normally you'd use setColSpan() to achieve this. But I've only ever done with text in a cell, not a table, so I'm not sure.


Ping & DNS - updated with new look and Ping home screen widget
bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
It is a bit different, yes. However, I figured out where my trouble was a few minutes ago. I was trying to change the colspan (somehow) on the nested PdfPTable that I was inserting. Apparently, however, the way to do it is by adding the entire PdfTable to a whole other PdfPCell and changing the colspan on that instead.

I love it.

Thanks for your post though!

I hope this helps somebody!

b
 
jQuery in Action, 2nd edition
 
subject: iText - Problem setting width in nested PdfPTable.
 
Similar Threads
iText help for generating PDF
What is this declaration?
PdfPTable
How to set the cell size with PdfPCell object in the table?
IText Problem with left and right spacing while creating nested tables