Can anyone help us out with this? in our Confluence installation we have several spaces, including contents in different languages (chinese, thai, russian, greek e.g.). Is there a way to customize the PDF stylesheet and show all this characters correctly? We tried to customize on space level with (for chinese language e.g.) but without any success. What would be the correct way to handle this? Thanks!
@font-face { font-family:SIMSUN; src: url(file:///path_to_font/SIMSUN.TTF); -fs-pdf-font-embed: embed; } .code pre, .preformatted pre { font-family : SIMSUN,Courier,monospace ! important; line-height : 1.3; }
Community moderators have prevented the ability to post new answers.
Hi there.
You should use the 'PDF Export Language Support' option in the administration section of Confluence. This will allow you to upload your SIMSUN.TTF and will ensure it is used by the stylesheet automatically.
Thanks for your reply but this isn't excatly that waht I was looking for. Uploading a font that way would mean to use this font for all content. This can't work, because we also have some greek or russian content and this can't be print with the chinese font. We need to configure the stylesheet on space level. Result should be having one russian space with some special chars and a special pdf stylesheet with russian font, having one chinese, one greek and so on... Isn't that possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand and I'm afraid this is a known limitation.
We have an issue raised for it as CONF-10048.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Filed a feature request: Natively support international characters in PDF Export
Please upvote and add your thoughts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Jarek's approach does actually work. It is possible to embed fonts with @font-face
and then attribute them to html elements. I am not sure if it is a viable method for different languages but at least it can be used to replace characters of the standard font with the corresponding character of the new one.
I basically do as Jarek described with some changes (see remarks):
@font-face
{
font-family
:SIMSUN;(1)
src
:
url
(file:///path_to_font/SIMSUN.TTF)(3);
-fs-pdf-font-embed:
embed
;
}
.
code
pre
, .preformatted
pre(4)
{
font-family : SIMSUN(2) ,
Courier
,
monospace
! important;
line-height :
1.3
;
}
(1) Erase the "font-family:SIMSUN;", I don't know why but this never worked when I tried.
(2) Since the font-family hasn't been defined we need something else. Double click the orignal .ttf file and use the "Typeface-name" instead.
(3) Make sure that you really uploaded the ttf file and that you use the correct URL.
(4) Pay attention to what html elements you use, preformated text can be difficult since it has originally been definied to use a specific monospace font and this must be overwritten to take effect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.