+ Start a Discussion
dbogoslovtsevdbogoslovtsev 

Cyrillic characters are not shown when <messaging:attachment renderAs="pdf"> is used

Hi All!

 

I would like to create a Visualforce template with a HTML body. I am going to use Cyrillic characters (Russian language) in the body. In addition to that I would also like to duplicate the content of my email in the attached pdf file. I created the following test template:

 

<messaging:emailTemplate subject="Open lectures 2011 - Lecturer Name dd.mm.yyyy - RUS" recipientType="Lead" replyTo="open_lectures@skolkovo.ru">
    <messaging:htmlEmailBody >

        <html>
          <head>
            <style> body { font-family: Arial Unicode MS; } </style>
          </head>
          <body>
              Hello (Привет) {!recipient.FirstName} !
          </body>
        </html>

    </messaging:htmlEmailBody>
    <messaging:attachment renderAs="pdf">
        <html>
          <head>
            <style> body { font-family: Arial Unicode MS; } </style>
          </head>
          <body>
              Hello (Привет) {!recipient.FirstName} ! 
          </body>
        </html>
    </messaging:attachment>                
</messaging:emailTemplate>

 

The body of the email looks fine and I can read both Latin (English language) and Cyrillic characters (Russian language). In the attached pdf I can only see Latin characters. I found this document http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_renderas_pdf.htm and I used a font which supports Unicode characters.

 

I also created a simple test Visualforce page:

     <apex:page renderas="pdf">

        <html>
          <head>
            <style> body { font-family: Arial Unicode MS; } </style>
          </head>
          <body>
              Hello - Привет
          </body>
        </html>

     </apex:page>

 

And this page works fine.

 

Is there any problems with the <messaging:attachment renderAs="pdf"> tag? Could you help me to fix that?

 

Kind regards,

Dmitry.

LalitLalit

Using Arial Unicode MS we can get the Russian character, I try using <b> or Strong or other style format to display BOLD letter inside the template. but looks like we are getting Regular letter only

Is there a way to display BOLD letter or Italic in a Russian template

 

Any other Font-Family, which can support Cyrillic , Russian and Greek letter and BOLD letter, appreciate any input