PDF manager HTML Source Editor Full html not working

Hi All,

I tried to create a pdf document with list of records in a HTML table .

<table style="width: 100%;" border="1" cellspacing="7">
<tbody>
<tr><th style="color: #fcfcfc; font-family: Calibri; background-color: #626262; text-align: left;" colspan="6">LABEL 1</th></tr>
<tr>
<td style="width: 100%;">ONE</td>
<td style="width: 100%;">TWO</td>
</tr>
{foreach from=$ArrayList item="arr"}
<tr style="height: 20%;">
<td style="border: 1px solid black;">{$arr.data1}</td>
<td style="border: 1px solid black;">{$arr.data2}</td>
</tr>
{/foreach}
</tbody>
</table>

But after i saving the code become like this

The smarty foreach become in wrong position

  • the foreach needs to be inside one of your table elements, I had to add a row in the table. Try:

    <tr><td>{foreach from=$ArrayList item="arr"}</td></tr>

  • I tried that,but it creating a extra row in the pdf.

    Can you advise any other solution ?

  • Unfortunately I did not find a solution to that, I had to accept the extra row.

  • Sino Thomas you should use 2 tables like below, other alignment settings you can set according to your need.

    <table style="width: 100%;" border="1" cellspacing="7">
    <tbody>
    <tr><th style="color: #fcfcfc; font-family: Calibri; background-color: #626262; text-align: left;" colspan="2">LABEL 1</th></tr>
    <tr>
    <td style="width: 100%;">ONE</td>
    <td style="width: 100%;">TWO</td>
    </tr>
    </tbody>
    </table>
    <p>{foreach from=$ArrayList item="arr"}</p>
    <table style="width: 100%;" border="1" cellspacing="7">
    <tbody>
    <tr style="height: 20%;">
    <td style="border: 1px solid black; width: 100%;">{$arr.data1}</td>
    <td style="border: 1px solid black; width: 100%;">{$arr.data2}</td>
    </tr>
    </tbody>
    </table>
    <p>{/foreach}</p>