How to export an entire page in landscape?

I've read this topic on some page content printing in landscape:

However, I need for the entire page to export in landscape. If I include the div and put all content in it, the page title still exports because it believes it should be in portrait and so I have the first page that is portrait an only includes the page title, then the page content that is in landscape, then the last page is always blank and in portrait.

How do I get the page title to be included on the first page in landscape mode? I was trying various CSS entries in the space and on the page itself without any luck regarding pagetitle.

3 answers

1 accepted

Yes, since the available workaround resources to a CSS it is gets lost when the context of the PDF export (i.e. global, multipage, etc) changes. :( This feature request may be of interest for the case:


I provided the same comment on that issue. Thanks for pointing me to it. This is such a critical need for anyone reusing content and for generating documents, a core feature of a wiki, I'm suprised it hasn't gotten more attention/support from Atlassian.

Hello Karie, there is a similar topic in this thread, it suggests that one use the following:

@page {
size: 210mm 297mm; /* DinA4 */

I did include that in the CSS; however, if you use that, when you include that page using the includepage macro, it is ignored (whereas div tags aren't ignored). Also, if you select that page in a global export, the CSS is assumed for all selected pages - thus, everything gets transformed to landscape when that's not what you want. Div tags are respected in a global export, unless there is that CSS, and then its overwritten. Consequently, I was trying to use a div tag instead of a css in order to have a complete solution that works for single page export, global export, and exports when it is included.

Hi Karie,

I have the same problem. I'm using a user macro as a workaround to get the page title to be included on the page in landscape. The macro adds a div-element with the class "landscape" and then adds the page title to this page. I still have the first page in portrait with the title only.

You can use a user macro like this:

## Macro title: pdf-landscape-export
## Macro has a body: Y
## Body processing: Rendered
## Developed by: Frederik Teuber
## Date created: 26/05/2014

## This is the pdf-landscape-export macro
## @param showTitle:title=Show Title?|type=boolean|desc=Display the page title?|default=true

<div class="landscape">
  #if (!$paramshowTitle)
    <div class="print-only"><h1>$content.getTitle()</h1></div>

You can choose then in the macro browser wether you want the title to be displayed on the landscape page or not.

Add this line to your custom css to avoid the page title to be displayed twice on your page:

.print-only {
display: none;

There is also some css you have to add for your pdf export like described in the question you mentioned in your post. Use something like

div.landscape {
page: landscape;

and fit for your needs.

I would appreciate if anybody had a clean solution for avoiding the first page to be in portrait with title only.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,527 views 25 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you