Fit tables to page

RPE 1.2.1 and newer add one more feature to support sizing tables, the fit tables to page property of the Word output.

When set to true tables that are wider than the page are adjusted so that they fit within the page. The improved layout comes at the  expense of a slightly improved processing time which is the reason why this property is not enabled and hidden by default.

Update: this is implemented as a property of the Word output and not as a property of tables in Studio to allow setting it for all the tables in the document  including the tables coming from rich text .

NOTE: even with fit tables to page set to true the table might not fit the page if the table is very large and in some cases due to how Microsoft Word handles cell widths.

If you choose to set fit tables to page to true, you must also set these properties:

  • For the cell elements, set the width property (optional)
  • For the table element, clear the value for the table autofit property



Author: Dragos Cojocari

Architect for Rational Publishing Engine

5 thoughts on “Fit tables to page”

  1. Hi Dragos,
    if the table is embedded as rich text (richTextBody/div), is there an elegant way to force the title row to repeat, if a page break occured within the table?

    1. Hey Stefan,

      the simplest option is to use a macro to post process the output. You can also process the XHTML within the RPE template but in general I advice against excessive XHTML processing if it can be avoided as it’s easy to break the XHTML and makes the template less readable.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s