*
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 Android Security Essentials Live Lessons this week in the Android 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: 41148
    
  45
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 - my free Android networking tools app
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: iText - Problem setting width in nested PdfPTable.
 
Similar Threads
How to set the cell size with PdfPCell object in the table?
What is this declaration?
iText help for generating PDF
IText Problem with left and right spacing while creating nested tables
PdfPTable