Forum


Replies: 5   Views: 1358
Delete blank rows under the table
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 20-10-2020 - 08:54

Hello,

We have run the following code using phpdocx 10:

$docx = new CreateDocx();

$html = '
<div class="section">
    <p class="sSectionTitle">TITLE</p>
    <p class="indentStyle">
        <span class="sectionNumber">NUMBER</span> AAAAAAA
    </p>
    <ul class="numList">
        <li>BBBBBBBBBBBBBBBBBbb
        <table class="teigakuTable" border="0" cellpadding="0" cellspacing="0" style="width:98%;">
                <tr>
                    <td style="width:10%">&nbsp;</td>
                    <td style="width:35%">1. AAAAAA</td>
                    <td style="width:55%">BBBB</td>
                </tr>
                <tr>
                    <td style="width:10%">&nbsp;</td>
                    <td>2.BBBBBB</td>
                    <td>CCCCCC</td>
                </tr>
                <tr>
                    <td style="width:10%">&nbsp;</td>
                    <td>3.CCCCCC</td>
                    <td>DDDDDDDDDDDDDDDDDDDDD</td>
                </tr>
        </table>
        </li>
        <li>COMMENTTTTTTT</li>
    </ul>
</div>
';
$docx->embedHTML($html);

$docx->createDocx('output');

And there's no blank rows after the table when opening the document. We have opened the output with MS Word (2007, 2010, 2013, 2016, 2019, 365 and Online) and LibreOffice (5, 6 and 7) and in all cases the output is correct. What DOCX reader are you using? Maybe you are applying some extra style or your template has some extra content?

If you send to contact[at]phpdocx.com the most simple script (and the template) that illustrates the issue and the output you get we'll check them.

Regards.