Forums

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

Adding custom letter-spacing in PDF Stylesheet

Bernhard Zander April 24, 2023

Hi!

Lately I have been making tweaks to my team's space PDF Stylesheet in Confluence (Cloud) to reflect requirements and request on PDF exports my team are wanting to do from time to time. Albeit I have found the available information in the Knowledge base a bit lacking for customizing stylesheets (I'd have wised supported properties and Confluence CSS out of the box configuration and considerations were better documented) I have following what's available been mostly successful in applying the desired tweaks to our stylesheet.

One thing I'm however still struggling with is letter spacing, i.e. the space between printed letters in the export. Particularly for bolded characters the out of the box font configuration makes the printed letters in the export a bit mushy, hence the desire to tweak adding some padding between the letters.  

Following the lead of this article in the Knowledge base I have added the following CSS code in this block: 

 

body,p,li,td,table,tr,.bodytext,.stepfield 
{ letter-spacing: 0.5em; }

The "letter-spacing" property however don't appear to do anything for the export? I have tried added or changing other properties within this block like "font-size" or "color" and those seem to be reflected as expected in the exports.

What am I doing wrong/missing here? Is there a problem with the units? Should I define the property somewhere else in the template? Or is "letter-spacing" simply not supported by this functionality? 

1 answer

Bernhard Zander April 24, 2023

Hi Alex, thanks for replying!

I did, and they were useful in offering guidance on how to implement many of the other tweaks to the stylesheet I wanted to implement (and have since successfully been able to do so). They don't however mention or provide any guidance otherwise I can discern that would be applicable to specifically letter spacing.  

Alex Koxaras -Relational-
Community Champion
April 24, 2023

@Bernhard Zander 

After tests I made as well, on:

body,p,li,td,table,tr,.bodytext,.stepfield 
{
    font-size: 8pt;
    /*line-height: 1.1;*/
    color: #000;
    font-weight: normal;
}

I can confirm that letters-spacing doesn't have any effect on the text. Changing any other parameters found inside the code I pasted, will alter the text. I haven't found any bug or suggestion at jira.atlassian.com

So I would suggest that you go to jira.atlassian.com and create a suggestion for this matter.

Like Bernhard Zander likes this
Bernhard Zander April 24, 2023

@Alex Koxaras -Relational- thank you for validating the same from your side and for the offered suggestion. I'll look into doing that, thanks!

Suggest an answer

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

Atlassian Community Events