This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

iText - Problem setting width in nested PdfPTable.

 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bryan nelson
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!