Change the Page Orientation
To follow this guide, you must first install the Scroll Exporter Extensions app
You must install the Scroll Exporter Extensions app to use the option outlined in this guide.
You can change the page orientation in exports using the following macros:
The Scroll Landscape macro enforces a landscape page orientation in exports.
The Scroll Portrait macro enforces a portrait page orientation in exports.
The specific page layout will be applied to all content which immediately follows this macro. The page orientation will remain set for the last used macro. This means that additional pages included in the export (e.g. child pages) will be exported using the same page orientation. The page orientation can be switched back by using the opposite macro.
Scroll Landscape and Scroll Portrait macros should not be placed within any other macros or elements (e.g. tables, Confluence multi-column page layouts) on a page. If this is performed:
Scroll Word Exporter will produce an 'Export failed' error message with an associated error.zip link to download.
When adding these macros to your content, Scroll Word Exporter will insert a section break at the macro's position in the exported Word file. This means that your template must be configured to deal with section breaks, as the page numbering and the header or footer might not be set by default when switching the page orientation.
Link section breaks to the previous section
To ensure that header/footer are consistent in your export following a section break (eg. correct page numbering) you would need to link the header/footer to the previous section. You can do this by following these steps in your customized template:
Click the Page Layout tab and select Breaks > Next Page
Whilst on the new page, select the Page Layout tab again and then click Orientation > Landscape
Then, click the Insert tab and Page Number > Format and select the option Continue from previous section
Once confirmed, double-click the header and click Link to Previous. You can then repeat this process for the footer.
After these steps, delete the inserted landscape page and added section break from your template and save it.
The page numbering and the header and footer will now continue from the previous section when you switch to landscape format using the Scroll Landscape macro in Confluence.
Considerations
In order for the header/footer to adapt correctly when the page layout is switched (ie. portrait to landscape), you will need to ensure that the elements in your header/footer are assigned formatting properties in the Word file. This will ensure the correct layout is applied when a different page orientation is determined. For instance, for text elements you can apply the required alignment option (ie. Align left
) from the editor toolbar to ensure that the text is always handled in the same way when the page orientation is switched.
Additionally, for image assets, such as a company logo, you can use the MS Word Size and position image options to set the position for the image. This will allow you to define both the horizontal and vertical alignment for the image, relative to either the margin, page or something else. Defining these things in your template will ensure the header/footer adapt consistently when the page orientation is changed.
Limitations
When switching the orientation of a page, you may run into some known limitations. These are described below:
Assigning different alignments for inline text - MS Word does not provide an option to assign different alignments to text on the same paragraph line. Therefore, if you want the page numbering on the right side to match up with some text on the left side, you’d need to control this by either adding a table (without borders) and then apply the alignment, or using one of the built-in MS Word templates for the header/footer (ie. 3 column layout)
Using MS Word shapes in the header/footer - currently, when some shapes / elements are used in the header/footer they are not scaled or positioned correctly when the page orientation changes. This is a known issue and we have the following pubic issue open to fix this: EXP-3299