function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Administrator 88Administrator 88 

Code is generated when render Rich Text content to PDF file

Hi All,

I have one field with RIch Text type, when i render/print this field on PDF i am getting coded text.

Please help with this issue, i dont want this code type text,..

Example:

Rich Text Field Name : Note

Content Below:
  1. The product shall be delivered as a ESD. ESD stands for Electronic Software Distribution wherein the product has to be downloaded from the Internet and the license keys shall be provided via email.
  2. The above product includes1 year technical support, free patches and point updates via internet from Intel Corporation, USA.
  3. Please provide the End Users Details with Email ID.
  4. The above mentioned price is exclusive of Training and Installation of the software.
  5. Tax Deduction at Source (TDS) should not be applicable as per the CBDT notification No. 21/2012 [F.No.142/10/2012-SO(TPL)] S.O. 1323(E), DATED 13-6-2012 and Notification No. SO 1323 (E), dated 13-06-2012.
  6. The quoted price is subjected to change if there is any deviation in the exchange rate by +/-5%.
  7. Any new taxes applicable at the time of billing will be to your account.

In pdf file i am getting:

<ol><li>The product shall be delivered as a ESD. ESD stands for Electronic Software Distribution wherein
the product has to be downloaded from the Internet and the license keys shall be provided via
email.</li><li>The above product includes1 year technical support, free patches and point updates via
internet from Intel Corporation, USA.</li><li>Please provide the End Users Details with Email
ID.</li><li>The above mentioned price is exclusive of Training and Installation of the software.</li><li>Tax
Deduction at Source (TDS) should not be applicable as per the CBDT notification No. 21/2012
[F.No.142/10/2012-SO(TPL)] S.O. 1323(E), DATED 13-6-2012 and Notification No. SO 1323 (E), dated
13-06-2012.</li><li>The quoted price is subjected to change if there is any deviation in the exchange rate by
+/-5%.</li><li>Any new taxes applicable at the time of billing will be to your account.</li></ol>


APEX code i am using to print on pdf:
 
{!Quotation__c.Note__c}

 
Best Answer chosen by Administrator 88
Ramesh KosalairamanRamesh Kosalairaman
Hi,
HTML code is not supported in the Salesforce HTML editor. HTML code is treated as text.
<apex:outputText value="{!Quotation__c.Note__c}" escape="false"/>

 

All Answers

Ramesh KosalairamanRamesh Kosalairaman
Hi,
HTML code is not supported in the Salesforce HTML editor. HTML code is treated as text.
<apex:outputText value="{!Quotation__c.Note__c}" escape="false"/>

 
This was selected as the best answer
Administrator 88Administrator 88
Hi Ramesh,

Thanx for the replay,

One more field is there, its a look up field.

This look up field is displaying link not the text content.

Example:

Look up field name : Customer

In Saleforce form displaying:

Customer : UFOMovies/Intel

But when render/print to pdf displaying:

0018000001H4ylVAAR (some var/link)

APEX code i am using to print on pdf:

{!Quotation__c.Customer__c}
Ramesh KosalairamanRamesh Kosalairaman
{!Quotation__c.Customer__r.Name}
try this It will help

Use relationship to dsiplay the lookup object filed values
Administrator 88Administrator 88
Thankx its works  like a charm :)

Can u suggest me how to print the date format too,..

Currently its displaying like,..

Sun Jan 11 00:00:00 GMT 2015 

But i wanted in,..

11/1/2015 (DD/MM/YYYY)

APEX code i am using to print on pdf:

{!Quotation__c.Date__c}
 
Ramesh KosalairamanRamesh Kosalairaman
This the code to format the date in visualforce page
<apex:outputText value="{0,date,MMMM dd, yyyy}"> <apex:param value="{!Quotation__c.Date__c}" /> </apex:outputText>