In this section · Fixing structure

Fix tables

Redraw a table PDFxt tagged wrongly, correct its rows, columns, spans and header rows in the table editor, and join a table that runs across two pages.

PDFxt detects tables during the analysis and tags them with their rows, cells and header rows, so most tables need no work. When a table is tagged wrongly, you can redraw it, correct its grid in the table editor, or fix the style of a single cell. A table that runs over two pages can be joined into one, so readers of the ePUB meet a single table with one header row.

Redraw a table

If the table zones on a page are wrong, clear them and draw the table again.

  1. Go to the page with the table and press Shift + Delete. Confirm with Delete tags. This removes every zone on the page. The PDF text stays as it is.

The Delete all tags from page 251 confirmation, with the Delete tags button

  1. If the table continues on the next page, go to that page, select its table zone and press Delete.
  2. Open the Actions menu and choose Heading, or press H. Drag a box around the table title.
  3. Open the Actions menu and choose Table, or press T. Drag a box exactly around the table.

The Actions menu, with Heading (H) and Table (T) under Add content

  1. Draw the rest of the table on the next page the same way.

A Table zone being drawn around the part of the table on the next page

PDFxt detects the rows and columns of each table you draw. Check the result in the HTML Preview on the right.

The redrawn table with its rows marked TR, and the same table in the HTML Preview

Correct rows, columns and spans in the table editor

If the table is still wrong, for example a cell that should span two rows or columns doesn't, correct it in the table editor.

  1. Select the table zone and click Edit table in the zone toolbar above the page. If the toolbar is short of space, Edit table is in the menu at its right-hand end.
  2. Boundary: check that the outline matches the table. Resize it with the handles if it doesn't, then click Next.

Step 1, Boundary: the table outline with the editor bar below it

  1. Rows: each row is marked Row 1, Row 2 and so on. Remove a wrong row with its bin icon, and drag across the table to draw a row. Delete all rows clears them so you can start again. Click Next.

Step 2, Rows: six rows marked down the table, each with a bin icon

  1. Columns: remove and draw columns the same way, dragging horizontally. Delete all columns clears them. Click Next.

Step 3, Columns: the columns marked across the table, with Delete all columns in the editor bar

  1. Spans: every cell is numbered. Select adjacent cells and click Merge to make one cell span them, or select a merged cell and click Unmerge. Click Next.

Step 4, Spans: numbered cells, with the Merge, Unmerge and Clear buttons

  1. Sections: click the label beside each row to cycle it between Header, Body and Footer. These become the table's thead, tbody and tfoot.
  2. Click Finish to save the table.

Step 5, Sections: the first row labelled Header, the others Body, and the Finish button

Fix the style of one cell

If one cell looks different from the rest in the HTML Preview, such as a stray background colour, edit that cell's style.

  1. In the HTML Preview, click the small chip to the left of the row. It lists the zones that start there, such as <tr> and each <td>. Click the cell you need.
  2. The Styles box opens. Under Properties, remove the property that's wrong, here a background colour.

The Styles box for one table cell, with a background-color property under Properties

  1. Click Save to this zone.

For more on the Styles box, see Edit styles and HTML for a zone.

Join a table split across two pages

When a table continues on the next page, link the two parts so the ePUB has one table.

  1. Select the table zone on the first page and click Stitch text in the zone toolbar.
  2. Under Continues to (later), choose the table on the next page. It's listed under Next page.

The Stitch text box for a table, with the next page's table chosen under Continues to (later), and the Link button

  1. Click Link. PDFxt confirms with Zones linked.

The zone list for the next page, where the table is marked contd. and continues the table on the page before

You can also start from the small button beside the first or last zone on a page. Its tooltip reads Merge with previous page (Continuation) or Merge with next page (Continuation), and it lets you choose which zone this one continues from or to.

Check it worked

  • In the HTML Preview, the redrawn or edited table has the right rows, columns and header row.
  • After stitching, the HTML Preview of the first page shows one table that includes the rows from the next page. The second page's header row is removed, so the column headings appear once.

The first page's HTML Preview, with the next page's rows continuing the same table

Watch the video

Tables, part 10 of the PDFxt video series.