confluence page, export to pdf in landscape format
Asked by Vijay:

Hi,

I have created a confluence page with pie chart and some JIRA issue/filters... I have made alignments and it looks nice, but I export to pdf it always exports in portrait format...

whereas some of my colleagues page are exported in landscape format...

Do I need to add or change any settings in my page?

please let me know, where I should do my changes... Kindly do the needful.

Thanks,

Vijay


Answers:
author: Milo Test
body: You might want to look at the PDF Stylesheet in the Look and Feel for the space.

If you have (or add) something like:

```
@page{size: 11in 8.5in;}
```

It will be landscape.

comments: author: Nicolai Abruzzese
body: Works Fine thanks!


author: Vijaykumar Krishnasamy
body: Under PDF Export Stylesheet (try this)

@page  
{  
/\*A4-sized pages in landscape orientation are 297 mm wide by 210 mm long\*/  
size: 307mm 220mm;  
}

h5,h6  
{  
page-break-before: always;  
}

PS: I did not change anything under PDF Layout

comments: author: ashutosh joglekar
body: Thanks, mate. This works !

- Ash


author: AMIT KUMAR
body: Thanks Vijay. This works perfect.


author: Paul Swann-Clark
body: Perfect, worked great


author: Nicolas Casel
body: Hi,

Is it possible to do PDF export in portrait mode for some pages, and in landscape mode for other pages **in the same space**? If so, how to do it?

comments: author: Simon Tost _TNG_
body: You may want to take a look at [PDF Macros for Confluence Plugin](https://marketplace.atlassian.com/plugins/com.tngtech.confluence.plugins.pdfmacros/server/overview).


author: Steffen Heller
body: Yes, it is possible by using **named pages**. With that you can define multiple pages with different settings.

I made a description at <https://community.atlassian.com/t5/Confluence-questions/Confluence-How-can-we-export-PDF-in-portrait-or-landscape-in-the/qaq-p/349230#M58987>


author: Henry Pfeiffer
body: Folks, I am having the same issue and would like to know how to resolve. I am exporting from a Confluence Page into a PDF. It defaults to Portrait. I went into Space Tools....Look and Feel...PDF Stylesheet and added

@page landscape  
{   
size: 8.5in 11in;   
}

and when I try to export the pdf it is still Portrait. The only thing I see, when I save the Stylesheet it loosk like this

<br />

PDF Export Stylesheet  
view plain print  
@page landscape   
{   
size: 8.5in 11in;   
}   

Any ideas would be helpful

comments: author: Steffen Heller
body: See the comment from Milo Grika for how to create a page in landscape mode and see my comment for how to use both portrait and landscape in the same space.

From your example it seems that you are using named pages incorrectly.


author: Henry Pfeiffer
body: Steffen,

Thanks! I made the change that Milo suggested. I have a list of daily reports that I wanted to export to pdf. An older version of the report I was able to export with no issues. My newer reports, with Expands (Not sure if this has any impact) does not export and I get the error GET /spaces/flyingpdf/pdfpageexport.action.


author: Steffen Heller
body: Good to hear that it works (partly).

About the other problem, I have no idea what that could be.


author: Henry Pfeiffer
body: Thanks Steffan, I narrowed it down to what dates and reports it doesnt work for. I have added anchors, expansions, etc..so maybe something like that has an impact..Will try and troubleshoot from here


author: Vijay
body: Thank you