----- Original Message ----- 
From: "Spencer Smith" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, June 07, 2005 7:32 PM
Subject: [iText-questions] Fw: Help! Nested Table issue....



I'm a newbie to iText and would greatly appreciate some help.  If you look
at the attached screenshot,
you should be able to clearly see my issue.

There are 2 main issues I am trying to figure out.

1) The Procedure table extends the last row to match the height of the
Diagnosis table.  Why?
Is there a way to avoid this?

PdfPTable.setExtendLastRow(false)


2) I would like header cell to read:  Diagnosis and Procedures
(Continued...) on every next page (if the table wraps
to a new page).  Basically, append " (Continued....)" text to the header if
it's on a new page.  Can this be done?
If so, how?

You'll have to do your own layout with PdfPTable.writeSelectedRows()


I would greatly appreciate any help with these 2 issues.  I've been banging
my head up against the wall trying
to figure it out.

Thank you very much in advance!
Spencer


Below is the the code that I am using to try and get this to work:


// add the section header
float[] widths = {0.02f, 0.98f};
PDFPTable sectionTable = new PdfPTable(widths);
sectionTable.setWidthPercentage(sectionTableWidth);
sectionTable.setHorizontalAlignment(Element.ALIGN_LEFT);
sectionTable.getDefaultCell().setBorderColor(Color.white);
sectionTable.setSplitLate(false);

String displayLabel = "Diagnosis and Procedures";
PDPCell cell = new PdfPCell(imageGreenArrow, false);
cell.setBorderColor(Color.white);
sectionTable.addCell(cell);
sectionTable.addCell(new Paragraph(new Chunk(displayLabel,
fontSectionHeader)));
sectionTable.setHeaderRows(1);

     // embed the diagnosis / procedure table(s) in a new table
     embeddedTable = new PdfPTable(totalFields);
     embeddedTable.setExtendLastRow(false);
     embeddedTable.setWidthPercentage(100);
     embeddedTable.setHorizontalAlignment(Element.ALIGN_LEFT);
     embeddedTable.getDefaultCell().setBorderColor(Color.white);

     // add the embedded (diagnosis) table
     cell = new PdfPCell(diagnosisTable);
     cell.setBorderColor(Color.white);
     embeddedTable.addCell(cell);

     // add the embedded (procedure) table
     cell = new PdfPCell(procedureTable);
     cell.setBorderColor(Color.white);
     embeddedTable.addCell(cell);

// add the embedded table to the sectionTable
cell = new PdfPCell(embeddedTable);
cell.setColspan(2);
cell.setBorderColor(Color.white);
sectionTable.addCell(cell);






-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to