You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello Everyone,
I was able to set my PDF export to landscape format by adding the following to PDF stylesheet:
@page { /*A4-sized pages in landscape orientation are 297 mm wide by 210 mm long*/ size: 297mm 210mm; }
However, the first couple pages are better presented in portrait format. So my question, is it possible to specify first x number of pages in portrait then everything else in landscape after?
Hi @Jerry Yen,
For @page, there is only a pseudo-class defined for the title page. You can use @page :first for the first page and @page for the second page and beyond:
@page
{
size: A4 landscape;
}
@page :first
{
size: A4 portrait;
}
Looks like :nth-child(n) doesn't work with @page.
Thank you. If I need the first 2 pages to be in portrait mode then page 3+ to be in landscape, is there a way to do this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jerry Yen, I don't think it's possible. You can only define different style for the first title page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there no option to use page breaks then "named pages" in Confluence?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jerry Yen, you can add a custom class to your page and define styles for it. Try this:
@page Portrait
{
size: A4 portrait;
}
.customPortraitLayout
{
page: Portrait;
}
I tested this and it worked for me, but please be aware that it has not been thoroughly tested and you use it at your own risk. This solution only applies to pages where you add the class manually.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.