title: render or convert the html table within pdf using the XSL-FO
body: <p>I am trying to export the data from a field of type Table Grid into a PDF format. While achieving it, I get a below html code of this table grid field exported into the PDF O/P. I am trying to convert this HTML table to XSL-FO and output it as a PDF. I am sorry I complete noob to this approach. How to transform this HTML table to PDF as final O/P.Can anybody share the exact approach of converting this HTML table to XSL-FO table and output it as PDF. </p>
  
  <p>Below is the XSL-FO and Velocity template code to get the HTML reference of the customfield object and then using the <strong>$pdfRenderer</strong> tool I try to display the table grid value in the PDF export. </p>
  
  <pre><code>&lt;!-- Table Grid Customfield 'customfield_10300' --&gt;
      #set ($customfieldId = "customfield_10300")
      #set ($customfield = $customFieldManager.getCustomFieldObject($customfieldId))
      #set ($moduleDescriptor = $customfield.getCustomFieldType().getDescriptor())
      #set ($fieldLayoutItem = ${fieldLayout.getFieldLayoutItem($customfieldId)})
      #set ($htmlMarkup = $moduleDescriptor.getViewHtml($customfield, "htmlMarkup",  $issue, $fieldLayoutItem)) 
  
      &lt;fo:table space-before="3mm" border="thin solid #CCCCCC"&gt;
        &lt;fo:table-body&gt;
            &lt;fo:table-row&gt;
             &lt;fo:table-cell padding="4px"&gt;
                 &lt;fo:block background-color="#EEEEEE" padding="4px" font-weight="bold" start-indent="4px" end-indent="4px"&gt;$i18n.getText($customfield.name):
                 &lt;/fo:block&gt;
               &lt;/fo:table-cell&gt;
        &lt;fo:table-cell padding="4px"&gt;                                &lt;fo:block&gt;$pdfRenderer.asRendered($issue, $customfieldId, $htmlMarkup)       &lt;/fo:block&gt;
     &lt;/fo:table-cell&gt;
   &lt;/fo:table-row&gt;
  &lt;/fo:table-body&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, this <strong>$htmlMarkup</strong> displays the below complete HTML code for the table grid customfield than the value. </p>
  
  <pre><code>&lt;div id="customfield_10300_grid-container" class="idalkogrid-view" style="overflow-y: visible; overflow-x:visible;" rel="customfield_10300" name="idalko-grid-field"&gt;
  &lt;table id="customfield_10300_grid"&gt;&lt;/table&gt;
      &lt;div id="customfield_10300_grid_pager"&gt;&lt;/div&gt;
          &lt;div id="customfield_10300_filter"&gt;&lt;/div&gt;
              &lt;table class="grid" border="0" cellspacing="0" cellpadding="0" style="width: 100%;"&gt;
              &lt;tr bgcolor="#f0f0f0"&gt;
                  &lt;th&gt;Summary&lt;/th&gt;
                  &lt;th&gt;Assignee&lt;/th&gt;
                  &lt;th&gt;Status&lt;/th&gt;
                  &lt;th&gt;Date due&lt;/th&gt;
              &lt;/tr&gt;
              &lt;tr bgcolor="#ffffff"&gt;
                  &lt;td style="border: 1px solid #CCCCCC; padding: 2px;"&gt; Table Grid Summary1 &lt;/td&gt;
                  &lt;td style="border: 1px solid #CCCCCC; padding: 2px;"&gt; admin &lt;/td&gt;
                  &lt;td style="border: 1px solid #CCCCCC; padding: 2px;"&gt; Open &lt;/td&gt;
                  &lt;td style="border: 1px solid #CCCCCC; padding: 2px;"&gt; 2014-01-14 &lt;/td&gt;
              &lt;/tr&gt;
  &lt;/table&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>How to make this <strong>$htmlMarkup</strong> variable display the table grid with proper values in the PDF </p>