Tagged PDF documents with tables.
The purpose of this technique is to show how table cells in PDF documents can be marked up so that the logical relationships among rows and columns are preserved and recognized by assistive technology. This is typically accomplished by using a tool for authoring PDF.
However, tables converted to PDF may have incorrectly merged or split table cells, even if they were marked up correctly in the authoring tool. Authors can ensure that table cells are structured properly by using the Table Editor in Adobe Acrobat Pro's Reading Order tool.
This example is shown with Adobe Acrobat Pro. There are other software tools that perform similar functions.
This example uses a table that was marked up correctly when it was created in Microsoft Word. Some table headers span two rows in the header row; one table header spans two columns.
To check the table in the PDF document:
The following image shows the example table in the Reading Order tool.
The following images shows the example table in the Table Editor. The cells are outlined in red, and the tab for each cell is displayed. Upon conversion, the Results headers were correctly split, but most of the table headers were incorrectly tagged as table data cells.
To repair the header cells:
Similarly, to repair the incorrectly split header cells to the left of Results header:
The following image shows the repaired example table.
This example is shown in operation in the working example of repairing table structure (Word file) and working example of repairing table structure (PDF file).
The following code fragment illustrates code that is typical for a simple table (header row and data row) such as shown in Examples 1-3:
95 0 obj %Structure element for a table
<<
/A 39 0 R
/K[96 0 R 101 0 R 106 0 R 111 0 R]
/P 93 0 R
/S/Table %standard structure type is table
>>
endobj
96 0 obj %Structure element for a table row
<<
/K[97 0 R 98 0 R 99 0 R 100 0 R]
/P 95 0 R
/S/TR %standard structure type is table row
>>
endobj
97 0 obj %Structure element for a table header
<</A[23 0 R 120 0 R]
/K 1
/P 96 0 R
/S/TH %standard structure type is table head
/Pg 8 0 R
>>
endobj
104 0 obj %Structure element for table data (cell contents)
<<
/A 29 0 R
/K 7
/P 101 0 R
/S/TD %standard structure type is table data
/Pg 8 0 R
>>
endobj
For a table that has been repaired with the Table Editor, confirm one of the following:
TR, TH, and TD tags are in the proper reading order and hierarchy in the table tree.TR, TH, and TD structures.TR, TH, and TD structures, and that they are in the proper reading order and hierarchy.