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

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

This widget could not be displayed.

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 !

This widget could not be displayed.

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.

This widget could not be displayed.

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
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

542 views 7 6
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