We are trying to render a VF page as pdf using visualforce render as pdf in arabic language.

Except for the english text below none of the other text appear in the pdf especially the one in arabic in p tag below.

enter image description here

There is already another question here raised yesterday but it doesnt contain the VF code so created a new question.

We followed this link in salesforce documentation for VF render as pdf but it doesnt work

<apex:page showHeader="false" applyBodyTag="false"  renderAs="pdf">
        body { font-family: 'Arial Unicode MS'; }

This is a sample page: API version 28.0
     مرحبا    </p>


There is an idea created for it to be enabled in future.

Is there any other solution we can try to get around this? for now the only work around we have is to render the page as Visualforce and use the browser print functionality.


Based on the suggestion provided in the comments by kurunve i tried it and it seemed to print the Arabic content but not the correct content though

I tested the same page with Visualforce render as PDF and just Visualforce page the results are different

Visualforce render as pdf:

enter image description here

Visualforce Page without render as pdf:

enter image description here

Confused that same content with and without the renderas tag behaves differently. Any insights on why it behaves this way would be appreciated.

  • 3
    <body style="font-family: Arial Unicode MS; font-size: 14pt; "> works :)
    – kurunve
    Jan 25, 2018 at 8:18
  • Thanks @kurunve. Updated the question. with and without renderas tag VF page prints different content
    – RedDevil
    Jan 25, 2018 at 9:03
  • Try upgrading the API version for visualforce
    – Raul
    Jan 25, 2018 at 9:20
  • @RahulSharma: tried with 42 just that the content inside says 28. The results are the same.
    – RedDevil
    Jan 25, 2018 at 9:22
  • It looks like a RTL-LTR problem. Salesforce RTL support is abysmal. help.salesforce.com/… May 12, 2019 at 9:09


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.