It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

PDF Stylesheet not affecting header size

Nicholas Reilingh May 19, 2015

The default PDF export for confluence 5.7 outputs 8-point text – I want to scale this up to a more standard 12-point so it looks like any other word processor document.

The first thing I tried was to add a rule paragraph tag, setting font-size to 12pt, and this worked great. But when I tried to make similar modifications to h1-h6 (starting from the defaultpdf.css file), no change is observed in the resulting PDF. I notice that the header styles are defined in px, where the paragraph style is define in pt.

Is there something I'm not getting? How do I troubleshoot this?

EDIT:

What I'm actually trying here is to edit the "PDF Stylesheet" for a space by including the following in the space's look and feel configuration:

body,p,li,td,table,tr,.bodytext,.stepfield  
{  
	font-size: 12pt;  
}  
h1  
{  
    font-size: 26pt;  
}  
h2  
{  
    font-size: 20pt;  
}  
h3 etc...

I started with the default CSS file on the page linked above for a reference, and then just increased the sizes  by a few points – and in the case of headers, changed the units from px to pt which should also make them larger.

But only the font-size property for body/p/li, etc is taking effect. The header properties are unchanged, AND seem to be different from the supposedly default values to begin with!

2 answers

1 accepted

1 vote
Answer accepted
Steffen Heller May 21, 2015

You could try to add ".wiki-content" to increase your selectors specifity:

.wiki-content h1 {
 font-size: 26pt; 
}

That seems to works in my own PDF stylesheet. No guarantee though, just an attempt.

 

Nicholas Reilingh May 21, 2015

Hey, that did it! I guess I should just be looking at the regular page display in-browser to see what rules will be overridden. It looks like there are some h2 rules on the page but none of them take effect because of the .wiki-content rules. Perhaps the documentation on this hasn't been updated for the new default theme yet.

0 votes
Steffen Heller May 19, 2015

Hi Nick,

it is hard to tell why your modifications don't work without knowing what they are. Can you post what code you entered and where?

 

Nicholas Reilingh May 20, 2015

I expanded the question -- thank you.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

1,553 views 8 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you