How Can I Prevent Page Breaks in Table Cells and Macro Content?
In some situations it can be advantageous to avoid having a page break for table cells and instead print the content of the cells across the page break - this can reduce the amount of empty space in the generated export.
Within the Styles section in a custom export template it is possible to control whether page breaks occur for content included in tables and/or macros - this includes the Warning, Info, Panel, Note, Tip and Code Block Macros. Additionally, by using the Scroll Table Layout macro it is possible to control whether page breaks occur for additional Confluence macro content.
Steps for Allowing Page Breaks for Table Content
The same steps below can also be followed for the available macros in the template. Simply replace step 2 by navigating to Styles > Macros > Select your specific macro
- Create or open an existing export template
- Navigate to Styles > Tables > Default Table
- Within this section select the General tab
- Following this, select the option Allow page breaks from the drop-down:
- Save and exit the template
Export Result
After choosing this formatting option, table cell content will be printed across the page break - see the table below for differences between the export with this option enabled/disabled.
Example page | Allow page breaks inside table cells | Avoid page breaks inside table cells |
---|---|---|
|
|
Steps for Allowing Page Breaks for Macro Content (Using the Scroll Table Layout macro)
The following steps provide a way to configure page break behaviour for additional Confluence macro content. This includes the;
- Change History macro
- Page Properties Report macro
- Jira Issue Macro (Table display)
- Attachments macro
- Content Report Table macro
- Task Report macro
A prerequisite for controlling page break formatting for macros is to create a custom table style that has the Page Break option defined (as described here)
- Place a Scroll Table Layout macro directly before the compatible macro on the Confluence page
- Edit the Scroll Table Layout macro
- Navigate to the Exporter specific tab and define a custom table style in the Table Styling field (case-sensitive) that has the option Allow page breaks enabled.
- Then, save the macro.
Export Result
The example below used the Jira Issue macro (Table Display).
Example page | Allow page breaks | Avoid page breaks |
---|---|---|
|
|