You need to sign in to do that
Don't have an account?
Middha
Other Language Characters in PDF
Hi,
I am creating a PDF using Visualforce where i show data queried from salesforce object. This data contains text from various different languages like, japanese, korean, chinese etc.
This data gets rendered properly on Visalforce HTML page but does not appears on the PDF version.
Can aybody please advise on this. Thanks.
I am creating a PDF using Visualforce where i show data queried from salesforce object. This data contains text from various different languages like, japanese, korean, chinese etc.
This data gets rendered properly on Visalforce HTML page but does not appears on the PDF version.
Can aybody please advise on this. Thanks.
renderAs The name of any supported content converter. Currently pdf is the only supported content converter. Setting this attribute to pdf renders the page as a pdf. Rendering a Visualforce page as a PDF is intended for pages that are designed and optimized for print. Standard components which are not easily formatted for print or contain form elements like inputs, buttons, any component that requires JavaScript to be formatted, should not be used. This includes but is not limited to, any component that requires a form element. Verify the format of your rendered page before deploying it. If the PDF fails to display all the characters, adjust the fonts in your CSS to use a font that supports your needs. For example, <apex:page renderas="pdf"> <style> body { font-family: Arial Unicode MS; } </style> Note that the pageBlock and sectionHeader components do not suppor double-byte fonts when rendered as a PDF.
Message Edited by dchasman on 01-09-2009 08:41 PM
Seems like this would be an excellent idea to post to the idea exchange (e.g. "Add additional font support to PDF generation") :-)
Check the following post.
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=8537#M8537
Also I already found a idea posted on the above. Check that at the following link:
http://ideas.salesforce.com/article/show/10094848?page=last#lastPost
Thanks for the reply.
Just wondered if this has been sorted yet as the last post was January.
It would be extremely helpful to our company if the Arial font was supported. We're struggling to send out quotes via Salesforce as we can generate a PDF version but if we want to send an email which generates an attachment it loses the bold, italic fomatting in Arial Unicode MS which then looks messy for customers.
The idea exchange link can be found here for anyone who would like to promote it!
http://ideas.salesforce.com/article/show/10094848/Add_More_Font_Support_for_PDF_Generation
Arial is supported but you must define it has font-family: Arial Unicode MS.
There is a bug that causes it to return as Times New Roman if you only use 'Arial'
List of supported fonts and what they look like, not always correct.
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=8601#M8601
Thanks for the reply
I have already defined the font family as Arial Unicode MS but it still has no formatting - no bold or italic characters I wondered if there was any progress on this?
Thanks
This is not working for me... the Chinese chars are simply not displaying ... here is my code
<apex:page standardController="SFDC_Channel_Account_Plan__c" extensions="ext_Objective,revenueDetails,MDFCalculate,goalInfo" showHeader="false" renderAs="pdf"> <apex:includeScript value="/soap/ajax/15.0/connection.js"/> <script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/15.0/apex.js"></script> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <table width="100%"> <tr> <td width="100%" bgcolor="#FFFFFF" align='CENTER'> <u><b><font size="4" face="Arial Unicode MS" >{!$Label.Channel_Partner_Business_Plan_Label}</font></b></u> </td>
Try using:
<apex:outputLabel value="{!$Label.Channel_Partner_Business_Plan_Label}" style="font-family: Arial Unicode MS;"/>
Instead:
Hi, what is the current exhaustive list of applicable PDF fonts, have there been any more added?
Regards
Steven
I managed to get Arial and bold font weight using this code:
Hope it will work for you as well...
Hi Doug,
What is the name of the third party library you are using to convert to PDF?
I have been successful in rendering a few non latin languages using the font style Arial Unicode MS.
When I render Arabic characters there is additional whitespace being added eather side of each character. Is there a known workaround or font style which supports all of Salesforce's supported languages?
The image attached to this tweet shows the arabic characters with space between them: https://twitter.com/andymahood__c/status/280975607251234816
I had the same issue 4 years ago. The renderer simply does not support right to left so it puts the characters from left to right and as faras I remember in the wrong order. That then looks a bit weird and is totally unreadable.
hth