+ Start a Discussion
dbogoslovtsevdbogoslovtsev 

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

Hi All!

 

I opened a case to solve this problem but a SFDC representetive advised me to post my problem here again. Could you kindly help me?

 

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

Any idea how do we get Bold and Italic letter in Arial Unicde MS. 

I can get Russian and Greek letter in PDF attachment, but cant get BOLD letter I try everything but cant get around

 

appreciate any input.