Table Header Tags Applied Incorrectly

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v8)  /  Re: Table Header Tags Applied Incorrectly

DynamicPDF CoreSuite for .NET (v8) Forum

 Sep 29 2017 12:26 PM

We are running into an issue with applying tags to table header cells when tables continue onto more than one page.  When viewing the document using Adobe Acrobat, the <P> tags with table header text all show up under the first <TH> tag in the document. The header text should show up once under each <TH> tag for each separate <Table> tag on each page.

Sample code that reproduces the issue is below.

Does anyone know of an alternate way of doing this to get around this issue while still being able to set the properties of the cell tags?

Thanks in advance for any responses.

 Document document = new Document();
            float yPosition;
            document.Tag = new TagOptions(true);
            Table2 table = new Table2(0, 0, 600, 400);
            table.RepeatColumnHeaderCount = 1;

            string text = "This is to test the overflow of the cell contents to next page dynamically";
            text += text;
            text += text;
            text += text;
            text += text;
            text += text;

            Row2 row1 = table.Rows.Add(30);
            row1.CellDefault.Align = TextAlign.Left;
            row1.CellDefault.VAlign = VAlign.Top;
            Cell2 TableHeader1 = row1.Cells.Add("Header 1");
            Cell2 TableHeader2 = row1.Cells.Add("Header 2");

            //Commenting out this code will render the table header tags correctly
            StructureElement StructureTableCellTag = new StructureElement(TagType.TableHeader);
            StructureTableCellTag.Identifier = "123";
            AttributeObject ao = new AttributeObject(AttributeOwner.Table);

            TableHeader1.Tag = StructureTableCellTag;
            TableHeader2.Tag = StructureTableCellTag;
            //Commenting out the above code render the table header tags correctly

            for (int i = 0; i < 1; i++)
                Row2 row3 = table.Rows.Add(30);
                Cell2 cell2 = row3.Cells.Add(text);
                cell2.Align = TextAlign.Left;
                cell2.VAlign = VAlign.Top;
                cell2.Splittable = true;
                Cell2 cell3 = row3.Cells.Add("text" + (i + 1));
                cell3.Splittable = true;

            //Adding table to page.
                Page page = new Page();
                table.Height = page.Dimensions.Body.Height - 30;//value 30 is the height of the footer table.
                float width = table.Width;
                float height = table.Height;
                if (height > table.GetRequiredHeight())
                    yPosition = (float)(table.Y + table.GetRequiredHeight());
                    yPosition = (float)(table.Y + table.Height - 3);
                table = table.GetOverflowRows();

            } while (table != null);


Posted by a ceTe Software moderator

This issue has been fixed in v9 release.

ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 9:33 PM.