i tried adding tahoma font to pdf export by CSS and few other ways but it isn't working.
could anyone help me on this?
Hello Shiva,
Customizing a PDF export can really give your content a distinct and original feel. When editing the PDF export Stylesheet to change the font type, there is a simple CSS to apply:
body,p,li,td,table,tr,.bodytext,.stepfield
{ font-family: "Tahoma"; }
Using the above CSS stylesheet will transform your PDF export into a new font family. This was confirmed on Confluence Server 6.13.0.
Here is the before and after on the export:
I hope this helps you to adjust the font family of your exported PDFs, please let us know if we can be of any more assistance.
Regards,
Stephen Sifers
Hello Stephen Sifers,
My organisation currently uses Confluence 6.4.1 server.
The CSS given is not working in this version.
Could you please help me to get Tahoma font for pdf export on Confluence 6.4.1 server?
Thank You!
Warm Regards,
Shiva Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again Shiva,
For Confluence 6.4.1 there are only a few included fonts (Times New Roman, Helvetica or Courier). In order to bring in more fonts, you will need to reference the front file (ttf) within the stylesheet. Here is more about Incorporating Other Fonts for Confluence 6.4.
By default, Confluence provides Times New Roman, Helvetica or Courier fonts for use in PDF exports. You can use your own fonts for PDF exports by declaring them in a @font-face CSS rule in your PDF Stylesheet.
The following CSS rule example shows how to declare the Consolas font and apply it to some elements for your PDF export:
CSS - PDF STYLESHEET
@font-face { src: url(file:///usr/share/fonts/Consolas.ttf); -fs-pdf-font-embed: embed; } .code pre, .preformatted pre, tt, kbd, code, samp { font-family: Consolas, monospace; font-size: 9pt; }The font path specified in the CSS must be the path to the font on the Confluence server.
Confluence 6.13 does allow you to reference a font type without needing the font file.
I hope this helps clarify the functionality of adding a PDF export stylesheet for Confluence 6.4.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.