Hello, 
 
iTextSharp
5.4.2 won't process Rowspan in RTL conditions. 
It
reports "Index was outside the bounds of the array." in line 494 of
PdfPTable.cs file.
Here is
the sample to reproduce it:
 
            using (var pdfDoc = new
Document(PageSize.A4))
            {
                var pdfWriter =
PdfWriter.GetInstance(pdfDoc, new FileStream("Test.pdf",
FileMode.Create));
                pdfDoc.Open();
 
                var table = new PdfPTable(3)
                {
                    RunDirection =PdfWriter.RUN_DIRECTION_RTL, // if I change 
this to
LTR, row span would work fine
                    WidthPercentage = 100,
                    SpacingBefore = 5,
                    SpacingAfter = 5
                };
 
                //---------------- row - 1
                var textCell = new PdfPCell(new
Phrase("data"))
                {
                    Border = 0,
                    PaddingLeft = 5
                };
                textCell.Colspan = 4;
                table.AddCell(textCell);
 
                //---------------- row - 2
                table.AddCell(new PdfPCell(new
Phrase("a) "))
                {
                    Border = 0,
                    PaddingLeft = 5
                });
                table.AddCell(new PdfPCell(new
Phrase("b) "))
                {
                    Border = 0,
                    PaddingLeft = 5
                });
 
                var imageCell = new
PdfPCell(new Phrase("date"))
                {
                    Border = 0,
                    HorizontalAlignment =
Element.ALIGN_CENTER,
                    VerticalAlignment =
Element.ALIGN_MIDDLE
                };
                imageCell.Rowspan = 2; // it works fine
with LTR dir.
                table.AddCell(imageCell);
 
                //---------------- row - 3            
                table.AddCell(new PdfPCell(new
Phrase("c) "))
                {
                    Border = 0,
                    PaddingLeft = 5
                });
                table.AddCell(new PdfPCell(new
Phrase("d) "))
                {
                    Border = 0,
                    PaddingLeft = 5
                });
 
                pdfDoc.Add(table);
            }
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
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