Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

International characters and PDF export

Jarek Grabski June 19, 2012

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;
}

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Paul Curren
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 19, 2012

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.

Jarek Grabski June 19, 2012

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?

Paul Curren
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 19, 2012

I understand and I'm afraid this is a known limitation.

We have an issue raised for it as CONF-10048.

0 votes
Dmitry Pashkevich September 12, 2013

Filed a feature request: Natively support international characters in PDF Export

Please upvote and add your thoughts

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2013

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.

TAGS
AUG Leaders

Atlassian Community Events