PdfPCell.Rowspan height

View: New views
1 Messages — Rating Filter:   Alert me  

PdfPCell.Rowspan height

by Keith O :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Trying the following:

// asp.net
PdfWriter writer = PdfWriter.GetInstance(document, rs.OutputStream);
document.Open();
Font font = new Font(Font.HELVETICA, 8f);
// PdfPTable table = _init_pdfptable(font);    
PdfPTable table = new PdfPTable(4);    
table.SetWidths( new float[] {1f, 2f, 1f, 1f} );
table.TotalWidth = 500f;
// table.ExtendLastRow = true;
PdfPCell cell;
for (int i = 0; i < 50; ++i) {
  if (i == 0 || i == 3) {
    cell = new PdfPCell(new Paragraph(
      "setRowspan(), cell no.:" + i.ToString(), font
    ));
    cell.Rowspan = 24;
    // cell.MinimumHeight = 200f;
    cell.FixedHeight = 200f;
    cell.VerticalAlignment = Element.ALIGN_MIDDLE;
    table.AddCell(cell);
    continue;
  }
  cell = new PdfPCell(
    new Paragraph("cell no.:" + i.ToString(), font)
  );
  cell.HorizontalAlignment = Element.ALIGN_RIGHT;
  table.AddCell(cell);
}
table.WriteSelectedRows(
  0, table.Rows.Count, 20f, 820f,
  writer.DirectContent
);

But can't set the cell height where Rowspan is set (attachment). What am I doing wrong?

thanks, keith



_________________________________________________________________
HotmailĀ® is up to 70% faster. Now good news travels really fast.
http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
itextsharp-questions mailing list
itextsharp-questions@...
https://lists.sourceforge.net/lists/listinfo/itextsharp-questions

Rowspan.pdf (1K) Download Attachment