You need to sign in to do that
Don't have an account?
Lukas Razim 26
Visualforce Render as pdf - special characters missing
Hi,
Im trying to render visualforce page as pdf. We have special characters in my language such as ě,š,č,ř,ž,ý,á,í. Some of them are missing on the pdf (e.g. č or ř) while the rest of them are there fine. Can anyone help me with this?
Thank you very much
Im trying to render visualforce page as pdf. We have special characters in my language such as ě,š,č,ř,ž,ý,á,í. Some of them are missing on the pdf (e.g. č or ř) while the rest of them are there fine. Can anyone help me with this?
Thank you very much
Based on it's ouput (image below) the only font that supports all the characters is Arial Unicode MS. So you'll want to use that
All Answers
https://forums.adobe.com/message/3265826
<apex:page standardController="Opportunity" showHeader="false" renderas="pdf">
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1">
<tr>
<td>
<img src='{!URLFOR($Resource.Logo4567687)}' title="logo" />
</td>
<td align="right"><font face="Arial" >
<b>Invoice for {!Opportunity.Account.Name}</b></font><br/>
</td>
</tr>
<hr/>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1">
<tr> <td><font face="Arial" >
{!$Organization.Name}<br/>
{!$Organization.Street}<br/>
{!$Organization.PostalCode} {!$Organization.City}<br/>
{!$Organization.Country}<br/>
</font></td>
<td width="60%"> </td>
<td ><font face="Arial">Invoice number (číslo faktury): <apex:repeat value="{!Opportunity.Invoices__r}" var="line2">
{!line2.name}</apex:repeat></font><br/>
<font face="Arial">Invoice Date: <apex:repeat value="{!Opportunity.Invoices__r}" var="line2">
{!line2.Invoice_Date__c} </apex:repeat></font></td>
</tr>
</table>
<br/>
<hr/>
<p><b><font face="Arial" color="#000080">Address Information</font></b></p>
<table border="0" width="100%" id="table2">
<tr>
<td colspan="3">
<font face="Arial">Account name: {!Opportunity.Account.Name} <br/><br/></font>
</td>
</tr>
<tr>
<td>
<font face="Arial">Bill To:<br/>
{!Opportunity.Account.BillingStreet}<br/>
{!Opportunity.Account.BillingPostalCode} {!Opportunity.Account.BillingCity}
</font>
</td>
<td width="50%"></td>
<td >
<font face="Arial">Ship To:<br/>
{!Opportunity.Account.ShippingStreet}<br/>
{!Opportunity.Account.ShippingPostalCode} {!Opportunity.Account.ShippingCity}
</font>
</td>
</tr>
</table>
<br/>
<hr/>
<p><b><font color="#000080" face="Arial">Products</font></b></p>
<table border="0" width="100%" id="table4">
<tr>
<td bgcolor="#C0C0C0"><font face="Arial">Product</font></td>
<td bgcolor="#C0C0C0"><font face="Arial">Description</font></td>
<td bgcolor="#C0C0C0"><font face="Arial">Image</font></td>
<td bgcolor="#C0C0C0"><font face="Arial">Quantity</font></td>
<td bgcolor="#C0C0C0"><font face="Arial">Unit Price</font></td>
<td bgcolor="#C0C0C0"><font face="Arial">Total Price</font></td>
</tr>
<tr>
<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line">
<tr>
<td>{!line.PricebookEntry.Name}</td>
<td>{!line.Description}</td>
<td ALIGN="center"><img src='{!line.PricebookEntry.Product2.URL_Picture__c}'/></td>
<td>{!line.Quantity}</td>
<td><apex:OutputField value="{!line.UnitPrice}"/></td>
<td><apex:OutputField value="{!line.TotalPrice}"/></td>
</tr>
</apex:repeat>
</tr>
<tr>
<td bgcolor="#C0C0C0" align="right" colspan="6">
<font face="Arial"><b>Total:</b> <apex:OutputField value="{!Opportunity.Amount}"/></font></td>
</tr>
</table>
<br/>
<hr/>
<p><b><font color="#000080" face="Arial">Terms and Conditions</font></b></p>
<table border="0" width="100%" id="table3">
<tr>
<td><font face="Arial">
Payment Method: <apex:OutputField value="{!Opportunity.QuotePaymentMode__c}"/><br/>
Payment Terms: <apex:OutputField value="{!Opportunity.QuotePaymentTime__c}"/><br/>
Billing Frequency: <apex:OutputField value="{!Opportunity.QuoteBillingFrequency__c}"/><br/>
</font>
</td>
</tr>
</table>
<br/>
<p><font face="Arial">{!Opportunity.Conditions__c}</font></p>
<br/>
<hr/>
<table width="100%" id="table5">
Special Terms:
</table>
<p> </p>
<hr/>
<p align="center"><font face="Arial"><i>Copyright {!$Organization.Name}.</i></font></p>
</apex:page>
Based on it's ouput (image below) the only font that supports all the characters is Arial Unicode MS. So you'll want to use that