Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

PDF导出,代码块内中文字符无法显示

马先生 July 19, 2023

字体已经正常设置为宋体,pdf导出时代码块里面的中文注释内容无法显示,请问如何解决这个问题

1 answer

1 accepted

0 votes
Answer accepted
Ollie Guan
Community Champion
July 19, 2023

Hi @马先生 ,

To make use of an installed font in your PDF Export style sheet (CSS) refer to it by the font-family ConfluenceInstalledFont.

https://confluence.atlassian.com/doc/create-a-pdf-in-another-language-175473.html

马先生 July 19, 2023

不懂css,所用想请问具体的代码如何实现呢

马先生 July 19, 2023

在样式表中更改后全局导出pdf仍然会出现代码块中的中文注释无法显示,注:代码块外的中文没有问题
@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; }

Ollie Guan
Community Champion
July 19, 2023
马先生 July 19, 2023

woo,that ' s great , i got it ,thank you very much

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events