Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 42968
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic