Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,149
Community Members
 
Community Events
176
Community Groups

PDF Export: Confluence does not support CSS 3, only 2.1

If you are having trouble with PDF export, these are some important things I learned.

1) PROBLEM: Confluence does NOT support CSS 3, only 2.1. CSS 3 has been around since 1999, and it is the version of CSS that introduced support for controlled output to print media (PDF/print/etc.). So, CSS 2.1 really doesn't support output to PDF at all, which explains why we have so many issues. This is why PDF and other output formats are so buggy and/or impossible with respect to formatting oddities and things you'd like to do but can't seem to get to work.

From Atlassian tech support: "The Confluence CSS export follows W3C CSS 2.1 rules, so to check CSS compatibility using the validator, you would need to choose 'CSS level 2.1' in the 'Profile' under 'More Options'." (Refer to the W3C CSS Validator: https://jigsaw.w3.org/css-validator/#validate_by_input+with_options)

2) TROUBLESHOOTING: See the above link to validate your custom CSS  for compliance with CSS 2.1. This will save you time/money/frustration trying to implement modern CSS code that is not supported by CSS 2.1. (Don't forget to choose "CSS level 2.1"!)

Also, search for "CSS Print output support" for online help designing CSS for print output, keeping in mind that you need to validate your code to CSS 2.1.

3) RESOLUTION: There is a Confluence issue created regarding the need for supporting CSS 3. If this affects you, please go here (https://jira.atlassian.com/browse/CONFSERVER-58982) and vote for this issue, add a comment, and "watch" this issue to help generate enough interest in it that Atlassian will implement this.

I hope this saves you time/money and frustration!

2 comments

Hi,

I did the test and the funny part is one setting I'm using to get proper table formatting:

...
table
{
table-layout: auto !important;
width: auto !important;
word-wrap: normal;
}
...

I get "Property word-wrap doesn't exist in CSS level 2.1 but exists in [css3] : normal".

But it is THE statement that makes tables look good in PDF. It seems some CSS3 is already implemented :)

Like Laura Schneider likes this

Indeed, I found the same thing. They may not be telling us the whole tale. :-)

Hi Laura,

many, many years ago I also tried to find out which CSS can be used in confluence and which can't.

If interested have a look at:

https://community.atlassian.com/t5/Confluence-questions/PDF-Export-Which-CSS-properties-do-work-and-which-ones-not/qaq-p/99072#M16610

I think, the best summary is this post:

Hello everyone,

time to sum it up. My initial request was this:

What I miss is a simple overview of what CSS properties do actually work with Confluence and which not.

I think what Paul said answers it quite well:

Flying Saucer is the library used "behind the scenes" for PDF export so you can often find useful hints and discussions on their various mailing lists and forums.

As regards PDF exports the most important information to be found on the flying saucer homepage might be this:

Flying Saucer supports all of CSS 2.1 with a few exceptions...

And for these exceptions there is a discussion group and an issue tracker.

Like # people like this

Hi @Steffen Heller 

You've hit on a general issue with Atlassian products and support:

...a simple overview of what (<whatever>-ed) do actually work with Confluence and which not.

Your strategy is correct: dig through to somewhere else to get something concrete, reliable, and operationalized.

Like Laura Schneider likes this

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events