function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
J KeenerJ Keener 

Rendering as PDF not rendering Chinese Characters

When I render a vf page normally with Chinese characters on it, everything works fine.  If I attempt to render it as a PDF however, the Chinese characters are skipped.
 
The challenge here is that we are rolled out globally, with hundreds of users in China.  A number of accounts and contacts are entered in Chinese. 
 
page rendered as HTML:
 
 
 
page rendered as PDF, missing the Account Name:
 
 
 
 
Is there any way to support multi-character sets when rendering to a PDF?
 
Jon Keener
JeremyKraybillJeremyKraybill
This thread probably covers what you need. There are some known limitations for double-byte characters but they don't seem prohibitive.

Jeremy Kraybill
Austin, TX
jwetzlerjwetzler
FeilFeil

<apex:page renderAs="pdf">
<html>
<head>
<style>
body {font-family: Arial Unicode MS;}
</style>
</head>
<center>
<h1>This is a test</h1>
<h2> 这是一个测试 </h2>
<apex:outputText>Hello World!</apex:outputText>
<br></br>
<apex:outputText>这是一个测试</apex:outputText>
</center>
</html>
</apex:page>

 


that works!

AshanAshan

I cant see the chinese charactors on the pdf ? Wats the wrong here ?

Praveen Kumar R 6Praveen Kumar R 6
You need to use Arial Unicode Font as it is the only Unicode Font supported for Visualforce PDF Rendering.
"Arial Unicode MS is the only multibyte font available.

For example : 
<div style="font-family: Arial Unicode MS;font-weight: 900; "> <apex:outputText >{!textbody}</apex:outputText> </div>