Skip to Content
Author's profile photo Prajesh Desai

HTML Rich Text Rendering in Adobe Forms

There is a requirement that we need to render rich text of html in our adobe form. As we all know that adobe doesn’t know HTML but we may need to render HTML tags, for the same requirement follow below steps.

Step 1). Passing HTML to our form and set DOCPRAM-DYNAMIC = ‘X’.


I created one Exporting parameter to pass my HTML rich text. You can get your HTML from SO10 also, and assign to Exporting parameter of your adobe FM.

Step 2). Create field in adobe form and set Field formate as Rich Text and bind with R_HTML.

Untitled.png  Untitled.png

Step 3). Then Test.


Not expected output.

Step 4). Now add below javascript on docClose event of field.


var envelope = "<?xml version='1.0' encoding='UTF-8'?>" +

  "<exData contentType='text/html' xmlns=''" +

  "><body xmlns='' xmlns:xfa='' " +

  "xfa:APIVersion='Acroform:' xfa:spec='2.1'>" +

  "<p>"+ this.rawValue +"</p></body></exData>";


Step 5). Now Test.


Hope this helps.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Roger Beach
      Roger Beach

      We are trying to do something similar and I'm guessing we followed the same blog you did:

      However, we are facing an issue when we have tags like <strong> or <blockquote> where things get ignored and even the text between those tags are eliminated.  Have you done anything using these semantic tags and have it functioning?

      Author's profile photo harish vyas
      harish vyas

      Hi Roger,

      As per my understanding you have to use XSLT transformation to convert <STRONG> and <BLOCKQUOTE> tags to be compatible with ADOBE.


      <xsl:template match=”blockquote”>
      <span style=”xfa-tab-count:1″/>
      <xsl:for-each select=”ancestor::blockquote”>
      <xsl:text>;    </xsl:text>
      <xsl:value-of select=”.”/>



      <xsl:template match=”strong”>





      Author's profile photo Former Member
      Former Member

      Hi Prajesh Desai I did the same that you recommended and this is not work for me.. maybe You can help me?

      I have text like this:

      להלן תנאים כלליים</ <h2><p/> יש להעביר את הפריטים לפי הפורמט הבא <h2>
      ישירות לידי המזמ, ין</ <div></li><li><div/> עד לתאריך הנקוב <p><ul><li><div
      על <p><ol><li><div/> יש לצרף מסמך אישור טובין <div></li></ul><p><br/></p><p
      תאריך <div></li><, li><div/> לידי מי סופק <div></li><li><div/> כמות שסופקה
      <p/> יסופק מדי חודש <p><p/>2018 מנוי לשנת <div></li></ol> <p/> האספקה
      Author's profile photo Karthikeyan Chandrasekaran
      Karthikeyan Chandrasekaran

      Thanks. But how do we achieve this in the ZCI layout?

      Author's profile photo Peter Collins
      Peter Collins

      Brilliant, works perfectly!  Thanks

      Edit: it worked on our internal system, but when I tried the same on a customer system it didn't.  Moving the Javascript from the "docClose" to the "Initialise" event corrected it.