You need to sign in to do that
Don't have an account?
Lukas Razim 29
<apex:outputText escape="false"> special characters missing
Hi All,
I have requirement to generate letter(in paper form) for all campaign members (we use campaigns more like events, so those letters are supposed to be invitations). So I added custom button on the layout that should render the information as pdf. I also added rich text field where the text for the letter is stored. See below code:
apex:page standardController="Campaign" showHeader="false" renderAs="pdf" applyBodyTag="false">
<apex:repeat value="{!Campaign.CampaignMembers}" var="line">
<div style="page-break-after:always;">
<span style="font-family: Arial Unicode MS">
{!line.Contact.Oslovujeme__c}, <br/><br/>
<apex:outputText value="{!Campaign.Campaign_Letter_Rich__c}" escape="false"/>
</span>
</div>
</apex:repeat>
</apex:page>
The problem is.. that we have special characters in my language, such as ř,ě,ň, etc. These characters are generated correctly on pdf only for my custom field on contact Oslovujeme__c. But if any of these characters are in Campaign_Letter_Rich__c, they are missing on pdf. I suppose it has something to do with "escape" attribute. If I dont use it characters are rendered fine but with all the code around.. Can anyone help me please?
Thank you very much
I have requirement to generate letter(in paper form) for all campaign members (we use campaigns more like events, so those letters are supposed to be invitations). So I added custom button on the layout that should render the information as pdf. I also added rich text field where the text for the letter is stored. See below code:
apex:page standardController="Campaign" showHeader="false" renderAs="pdf" applyBodyTag="false">
<apex:repeat value="{!Campaign.CampaignMembers}" var="line">
<div style="page-break-after:always;">
<span style="font-family: Arial Unicode MS">
{!line.Contact.Oslovujeme__c}, <br/><br/>
<apex:outputText value="{!Campaign.Campaign_Letter_Rich__c}" escape="false"/>
</span>
</div>
</apex:repeat>
</apex:page>
The problem is.. that we have special characters in my language, such as ř,ě,ň, etc. These characters are generated correctly on pdf only for my custom field on contact Oslovujeme__c. But if any of these characters are in Campaign_Letter_Rich__c, they are missing on pdf. I suppose it has something to do with "escape" attribute. If I dont use it characters are rendered fine but with all the code around.. Can anyone help me please?
Thank you very much
All Answers
When you are using escape = false. Charaters are coming fine right? I am not able to get the issue/? Can you paster sample output when you are using escape = false.
ěščřžýáíéúů,
šžýáíéú
Some of the characters are missing