Forum


Replies: 3   Views: 2820
Libreoffice conversion - table columns width
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 magira  · 10-07-2019 - 14:03

Hello,

I have a probleme when i convert my document using PHPDocx8 with LibreOffice.


$docx = new CreateDocx();

$docx->enableCompatibilityMode();
$html = '<h1 style="color: #b70000">An embedHTML() example</h1>';
$html .= '<p>We draw a table with border and rawspans and colspans:</p>';
$html .= '<table border="1" style="border-collapse: collapse" width="600px">
            <tbody>
                <tr width="600px">
                    <td width="100px">3_2</td>
                    <td width="50px">3_3</td>
                    <td width="450px">3_3</td>
                </tr>
            </tbody>
        </table>';

$docx->embedHTML($html);

$docx->createDocx('example_text');

$docx->transformDocument('example_text.docx', 'example_text.pdf');

I just create an exemple code.

The result in MSWord is allrigth but the converted PDF don't use width attribut.

See result here :https://ibb.co/V21rnMb

What i'm doing wrong ?

Thanks.