Adding custom letter-spacing in PDF Stylesheet
Asked by Bernhard Zander:

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](https://confluence.atlassian.com/confkb/how-do-i-change-the-font-sizes-in-pdf-export-833938097.html) 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?


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Bernhard Zander](/t5/user/viewprofilepage/user-id/5203086) and welcome to the community,

Did you happen to read the following articles?

* <https://support.atlassian.com/confluence-cloud/docs/customize-exports-to-pdf/>
* <https://support.atlassian.com/confluence-cloud/docs/advanced-pdf-export-customizations/>

comments: author: Bernhard Zander
body: 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.


author: Alex Koxaras _Relational_
body: [@Bernhard Zander](/t5/user/viewprofilepage/user-id/5203086)

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.


author: Bernhard Zander
body: [@Alex Koxaras _Relational_](/t5/user/viewprofilepage/user-id/4150197) thank you for validating the same from your side and for the offered suggestion. I'll look into doing that, thanks!


Tags: cloud

confluence-cloud