Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

CSS font-size not applying to body text in PDF Export

ara
January 22, 2026

Hi everyone,

I am trying to customize the font size for PDF exports, but the changes are not being applied to the body text, even though they work for bullet points (list items). How can I ensure the font size is applied to the body text?

I have added the following CSS under Settings > Look and Feel > PDF Stylesheet:

body, p, li, td, table, tr, .bodytext, .stepfield {
font-size: 5pt;
line-height: 1.3;
color: red;
font-weight: normal;
}

I have attached a screenshot of the exported PDF. As you can see, both the body text and the bullet points are red, which suggests the selectors are correct. However, the font size (5pt) is only reflected in the bullet points, while the body text remains at its default size.

Does anyone know why the font size is being ignored for paragraphs/body text, and how I can fix this?

image.png

2 answers

0 votes
Michelle Smith
February 12, 2026

For anyone facing a similar issue with the Code formatting exporting to PDF as an unreasonably large font size; this worked for me:

 

.wiki-content code
{
    background-color: #f4f5f7;
    color: black;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: "Courier New", Courier, monospace;
    font-size: 1em !important;
}

 

0 votes
Marc -Devoteam-
Community Champion
January 22, 2026

Hi @ara 

 

The main issue is that you can customize the Stylesheet, but even so, PDF customisation only applies to space exports, not single-page exports, via 3-dots > Export.

Can you try this workaround


For the workaround, export a single page:

  • Edit your stylesheet

Go to:

  1. Space Settings
  2. General
  3. Export
  4. Select File format -> PDF
  5. Content -> selected content
  6. Choose only the single page you want exported
  7. Export
AS
January 22, 2026

Thank you for the suggestion.

I tried the workaround you provided, but the result remains the same: the font size is only applied to the bullet points, and the body text is still not affected.

I also tried using this, but it didn't work.

font-size: 5pt !important;

 

ara
January 22, 2026

Sorry, the post above was from me. I accidentally replied using a different account.

Marc -Devoteam-
Community Champion
January 23, 2026

Hi @ara @AS 

What if you try to only set: 

body { font-size: 10pt; }

or

.wiki-content p { font-size: 12pt !important; }

Michelle Smith
February 12, 2026

@Marc -Devoteam- 

Thank you!!!!  

.wiki-content p { font-size: 12pt !important; } worked for me :) 

It's taken an insane amount of time to find this but finally my "Normal" text and the text within the panels is displaying smaller than many of the headers.

NEW

 

cf_css.jpg

 

OLD

cf_css_bad.jpg

"Old" was either with no css in the PDF Export | PDF stylesheet or the "Default Confluence Stylesheet.css" that I downloaded from Atlassian.   I still want the "Code" formatting to drop down in size a bit, but that will be for another day.


Thank you; would never have found that one!

Michelle

Like Marc -Devoteam- likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events