Hi!

I am having some trouble using pdfpcell.rowSpan when I add the table to a document with WriteSelectedRows. Even though it leaves the space for the span, the cells don't appear spanned. It looks something like:



where the white bottom left cell (missing) should be part of the upper left cell.

It doesn't happen if I add the table with Document.Add() which I can't use becaus I need to choose where I add the rows on the document. I've also seen that people talks about using nested tables on this cases but as the code I inherited is a complicated recursive function that the only detail we've found is the spans I would really need to make rowspan work with WriteSelectedRows.

Following is the code I use to reproduce this issue:
	    Document lDoc = new Document();
            PdfWriter lWriter = PdfWriter.GetInstance(lDoc, new FileStream(vPath + "Test4.pdf"FileMode.Create));
            lDoc.Open();
 
            PdfPTable lTable = new PdfPTable(2);
            lTable.SetWidths(new int[] { 30, 30 });
            lTable.TotalWidth = 60;
 
            PdfPCell lCell_1_1 = new PdfPCell(new Phrase("Span"));
            lCell_1_1.Rowspan = 2;
            lTable.AddCell(lCell_1_1);
 
            PdfPCell lCell_1_2 = new PdfPCell();
            PdfPCell lCell_2_2 = new PdfPCell();
            lTable.AddCell(lCell_1_2);
            lTable.AddCell(lCell_2_2);
 
            lTable.WriteSelectedRows(0, -1, 10, 10, lWriter.DirectContent);
            
            lDoc.Close();




------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to