Menu

Export pdf without html tags

Help
msi_
2005-11-17
2012-10-09
  • msi_

    msi_ - 2005-11-17

    Hello and sorry for my english. I use Displaytag + Struts and i have a page where i show some information in each row. So, if i want show more information, i put html tags:

    <display:table id="tabla" name="sessionScope.tabladatos" class="its" sort="list" defaultsort="1" defaultorder="ascending" export="true">

    <display:column title="Nombre">
    <table align="center">
    <tr>
    <td align="center"><B><U><bean:write name="tabla" property="nommacrociclo"/></U></B></td>
    </tr>
    ....

    When i export this table in pdf, html tags (<table align="center">, <tr>, <td>, etc..) are show in pdf document.

    ¿Is possible hide this tags in export pdf action?

     
    • msi_

      msi_ - 2005-11-17

      Thank you very much, I didn´t thought that idea. The only bad thing is i must repeat twice the information, one for html and other for pdf.

       
    • Jorge L. Barroso

      Add media="html" to your column tag, i.e.,

      <display:column title="Nombre" media="html">
      <table align="center">
      <tr>
      <td align="center"><B><U><bean:write name="tabla" property="nommacrociclo"/></U></B></td>
      </tr>
      ....

      then repeat the column tag, with media="pdf", leaving out the html content, i.e.,
      <display:column title="Nombre" media="pdf">
      <bean:write name="tabla" property="nommacrociclo"/>
      </display:column>

       

Log in to post a comment.

MongoDB Logo MongoDB