Skip to Main Content

html2fo tag in RFT template for PDF Printing

Edtembo2001Oct 28 2014 — edited Nov 2 2014


Manually created an RTF template for printing a custom report in Apex.  One of the fields contains simple <br> tags for formatting addresses. The select statement contains CDATA tags as specified in the documentation and the template form field in word has the html2fo tag specified accordingly. However, when I attempt the print the PDF in Apex, the portion with the html2fo tag does not render, just comes out blank.

Here is how the select statement and rtf template look like


'<![CDATA'||'['||'<br>'|| street_address1|| '<br>'||

               case when street_address2 is not null then street_address2||'<br>' else null end ||

             '  ' ||City  ||' , ' || STATE || ', ' || ZIP || ']' ||']>' as Address

from contacts

In side  Microsoft word , using the form field method I add the html2fo tag as shown below.  Once I upload the layout template and attempt to render the PDF, everything else on the page renders correctly (used the same form field method for everything else). The Address comes up blank.

Any help will be greatly appreciated!

Form Field Method.JPG

Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Nov 25 2014
Added on Oct 28 2014