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!
Laura Schneider
Technical Writer
Trimble Transportation
Minneapolis, Minnesota
2 comments