Forum


Replies: 4   Views: 2357
Can't get html table to format nicely
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 nickweavers  · 07-08-2017 - 08:13

I have just migrated my production server to a new machine running Ubuntu 16.04 and PHP 7.

I discovered the 3.6 version of phpdocx was not compatible  with php 7 so upgraded to the latest version of phpdocx 7.

Before doing this, on my old server the HTML at my URL was converting to word doc just fine and formatting nicely. Now one of the tables in the document doesn't format well.

My php code looks like this:

$filter = "#mros_repayment_only";
$parms = array('isFile' => true, 'parseDivsAsPs' => true, parseFloats => true,  'filter' => $filter, 'downloadImages' => true);
//$docx->replaceTemplateVariableByHTML('BODY', 'block', $preview_url, $parms); // 3.6
$docx->replaceVariableByHtml('BODY', 'block', $preview_url, $parms); // 7.0   

I can't see a way to upload my word doc here for you to see, but the value for preview_url is:

https://www.dealdirectfinancial.co.uk/index.php?option=com_ddfs_backoffice&task=FactFinderLetters.phpdocxLetter&id_factfind=1020448&id_lettertype=1

The problem table has an html id of mortgages_being_repaid.

Can anyone advise?