It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

International characters and PDF export

Jarek Grabski Jun 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

2 votes
Answer accepted
Paul Curren Atlassian Team Jun 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 Jun 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 Jun 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
Steffen Heller Apr 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.

0 votes
Dmitry Pashkevich Sep 12, 2013

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

Please upvote and add your thoughts

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

161 views 21 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you