It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence : How can we export PDF in portrait or landscape in the same space ?

Philippe Malera Feb 21, 2013

With Confluence 4.3 we can define a PDF stylesheet at space level, but in the same space we should sometimes export PDF in layout Portrait or Landscape (for large table), that mean two different stylesheets.

But, apparently, we can define only one stylesheet per space.

Is there a way to solve this problem or should we create as many spaces as PDF layout ? (and move documents from one space to another).

3 answers

1 accepted

0 votes
Answer accepted
Philippe Malera Feb 26, 2013

Thanks for all your propositions, but I was not looking for a "woarkaround", we need an official solution which can be used by about 100 non-technical end-user.

A feature request has been opened for that issue.

https://jira.atlassian.com/browse/CONF-28251

Thanks to all of you for your help !

2 votes
Steffen Heller Feb 21, 2013

Hi Philippe,

you can achieve exactly this with the help of named pages (just google for it).

I am using it for big tables as follows:

My standard CSS is set for portrait pages with

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

When I have a very big table I put it inside a div macro with <div class="landscape">...</div>
In my CSS a define an additional section with

div.landscape {
page: landscape;
}

@page landscape {
size: A4 landscape; 
}

So whenever there is a table (or anything else) inside a <div class="landscape"> the page format will change to "A4 landscape". At the end of the div it will automatically switch back to normal portrait page style.

0 votes

As far as I know, what you obeserved is an expected behaviour and by design. Indeed, there should be only one PDF stylesheet per space.

Is there a way to solve this problem or should we create as many spaces as PDF layout ? (and move documents from one space to another).

Instead of keep changing the stylesheet within the same space everytime you need to export in certain style. I suggest to have a Space placeholder of each PDF Stylesheet you would like to have. You might not need to move the pages around Spaces. You can keep the pages at their own home/Space, however, when you need to PDF export them using certain stylesheet, you can then use include page macro to include that page. After that, you should be able to export it to PDF using the style you wanted it to be.

Not the best and simplest solution, but I think that would do for now.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

951 views 0 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you