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

Other Language Characters in PDF


I am creating a PDF using Visualforce where i show data queried from salesforce object. This data contains text from various different languages like, japanese, korean, chinese etc.

This data gets rendered properly on Visalforce HTML page but does not appears on the PDF version.

Can aybody please advise on this. Thanks.
We're facing the same problem so I hope there's a reply for this soon and possibly a simple solution too.
Straight from the VF docs for <apex:page renderAs>:

renderAs The name of any supported content converter. Currently pdf is the only supported content converter. Setting this attribute to pdf renders the page as a pdf. Rendering a Visualforce page as a PDF is intended for pages that are designed and optimized for print. Standard components which are not easily formatted for print or contain form elements like inputs, buttons, any component that requires JavaScript to be formatted, should not be used. This includes but is not limited to, any component that requires a form element. Verify the format of your rendered page before deploying it. If the PDF fails to display all the characters, adjust the fonts in your CSS to use a font that supports your needs. For example, <apex:page renderas="pdf"> <style> body { font-family: Arial Unicode MS; } </style> Note that the pageBlock and sectionHeader components do not suppor double-byte fonts when rendered as a PDF.
Would it be possible for the documentation to list the supported fonts for PDF generation? It can be frustrating when you are trying to setup fonts that the PDF rendering system likes when you have to guess and check.
We do have a doc bug open on this but here is the info - could not resist publishing it in true Visualforce lingua franca form :smileyvery-happy:

<apex:page controller="PDFFontsController" renderAs="pdf" showHeader="false">
    <apex:repeat var="font" value="{!fonts}">
        <div style="font-family: {!font}">
            <div>{!font} 日本語</div>
            <div style="font-weight: bold">{!font} bold 日本語</div>
            <div style="font-style: italic">{!font} italic 日本語</div>
            <div style="font-weight: bold; font-style: italic">{!font} bold italic 日本語</div>

public class PDFFontsController {
    public String[] getFonts() {
        return fonts;

    private static final String[] fonts = new String[] { 'Arial', 'Arial Unicode MS', 'Courier', 'Helvetica', 'Times-Roman' };

Message Edited by dchasman on 01-09-2009 08:41 PM
Rajesh ShahRajesh Shah
In the above display, the Times New Roman and Arial font are the same i.e. even for the Arial font, Times New Roman is generated. Can you tell us when will this bug be fixed?
To be honest it's not not even on the road map at this point - tons of other work with much higher priority - same old story - and in this specific case we are using a third party library to perform the conversion to PDF and have found the vendor to be very very slow to respond (open source so we can't complain). My team has not had the time to investigate contributing the fix for this ourselves just yet.

Seems like this would be an excellent idea to post to the idea exchange (e.g. "Add additional font support to PDF generation") :-)
Rajesh ShahRajesh Shah
I also have another requirement wherein I need to generate barcode in a PDF file generated using Visualforce. From the above post, it seems like it would not be possible. Let me know about your views on it.
Check the following post.

Also I already found a idea posted on the above. Check that at the following link:

Thanks for the reply.

Just wondered if this has been sorted yet as the last post was January. 

It would be extremely helpful to our company if the Arial font was supported.  We're struggling to send out quotes via Salesforce as we can generate a PDF version but if we want to send an email which generates an attachment it loses the bold, italic fomatting in Arial Unicode MS which then looks messy for customers.


The idea exchange link can be found here for anyone who would like to promote it!


Arial is supported but you must define it has font-family: Arial Unicode MS.


There is a bug that causes it to return as Times New Roman if you only use 'Arial'


List of supported fonts and what they look like, not always correct.

Message Edited by TehNrd on 06-23-2009 09:19 AM

Thanks for the reply


I have already defined the font family as Arial Unicode MS but it still has no formatting - no bold or italic characters  I wondered if there was any progress on this?


I would also recommend putting all of the styles in a external stylesheet and then user the styleClass attributes. This seems to work a lot better with PDF creation.

This is not working for me... the Chinese chars are simply not displaying ... here is my code




<apex:page standardController="SFDC_Channel_Account_Plan__c" extensions="ext_Objective,revenueDetails,MDFCalculate,goalInfo" showHeader="false" renderAs="pdf"> <apex:includeScript value="/soap/ajax/15.0/connection.js"/> <script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/15.0/apex.js"></script> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <table width="100%"> <tr> <td width="100%" bgcolor="#FFFFFF" align='CENTER'> <u><b><font size="4" face="Arial Unicode MS" >{!$Label.Channel_Partner_Business_Plan_Label}</font></b></u> </td>


 What am I doing wrong?





Try using:


<apex:outputLabel value="{!$Label.Channel_Partner_Business_Plan_Label}" style="font-family: Arial Unicode MS;"/>




<font size="4" face="Arial Unicode MS" >{!$Label.Channel_Partner_Business_Plan_Label}</font>



Here's another trick / weird behavior. If you're using javascript code editor with the Adobe Reader plugin running above it and you make a change, you generally won't see the change appear when you save the Visualforce code. So you may have it working and not know it. To show it, you need to navigate away from the page then come back to it. I like to just remove the renderAs="pdf" attribute, save, then put it back and save.

Hi, what is the current exhaustive list of applicable PDF fonts, have there been any more added?





I managed to get Arial and bold font weight using this code:



        <style type="text/css">
            body {font-family: "Arial" "Sans-Serif"; font-size:12px; }

Hope it will work for you as well...








Hi Doug,


What is the name of the third party library you are using to convert to PDF?




I have been successful in rendering a few non latin languages using the font style Arial Unicode MS.  


When I render Arabic characters there is additional whitespace being added eather side of each character.  Is there a known workaround or font style which supports all of Salesforce's supported languages?


The image attached to this tweet shows the arabic characters with space between them:



tquila_andy wrote:

I have been successful in rendering a few non latin languages using the font style Arial Unicode MS.  


When I render Arabic characters there is additional whitespace being added eather side of each character.  Is there a known workaround or font style which supports all of Salesforce's supported languages?


I had the same issue 4 years ago. The renderer simply does not support right to left so it puts the characters from left to right and as faras I remember in the wrong order. That then looks a bit weird and is totally unreadable.



Srikanth Challa 3Srikanth Challa 3
Does salesforce support MS PGothic or Merio fonts when rendered as PDF?
jojo zhao 7jojo zhao 7
When I use system administrator login, visit the vf which is render As PDF, the system administrator language is Japanese, set body style as font-family:Arial Unicode MS; it works, but when I use another user, login as community user, then it doesn't work, anyone experience this situation?  The community template is Salesforce Tabs + Visualforce