Forum


Replies: 2   Views: 2297
Embedhtml makes one leading "space" before every html tag
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 h.ennser  · 22-05-2019 - 15:27

Hi! I am using phpdocx 7 Advanced.

That's my html-code:

<div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>BASICS OF ORDER COFIRMATION</b></td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td width="6%" align="right"><b>10</b></td> <td width="5%" align="right"><b>&nbsp;</b></td> <td width="55%" align="left"><b>I-ZMIS1013</b></td> <td width="3%" align="right"><b>1</b></td> <td width="3%" align="right"><b>Pcs</b></td> <td width="15%" align="right"><b>3.410,00</b></td> <td width="15%" align="right"><b>3.410,00</b></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td colspan="6"><b>STUFFING BOX SEALING 0726-12120-10</b></td> </tr> <tr> <td colspan="2">&nbsp;</td> <td colspan="6">Pos. pc Unitprice Totalprice< br>060 2 pc 525,- 1.050,- Euro< br>081 4 pc 22,- 88,- Euro< br>082=083 12 pc 166,- 1992,- Euro< br>101=102 8 pc 29,- 232,- Euro< br>370 4 pc 12,- 48,- Euro< br>< br>< br>For your info Pos< br>082=083 is identical< br>101=102 is identical< br></td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td width="6%" align="right"><b>903</b></td> <td width="5%" align="right"><b>&nbsp;</b></td> <td width="55%" align="left"><b>I-8VER1</b></td> <td width="3%" align="right"><b>1</b></td> <td width="3%" align="right"><b>Pcs</b></td> <td width="15%" align="right"><b>55,00</b></td> <td width="15%" align="right"><b>55,00</b></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td colspan="6"><b>PACKING</b></td> </tr> <tr> <td colspan="2">&nbsp;</td> <td colspan="6">will be charged according to effort</td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td width="6%" align="right"><b>904</b></td> <td width="5%" align="right"><b>&nbsp;</b></td> <td width="55%" align="left"><b>I-8FRA</b></td> <td width="3%" align="right"><b>1</b></td> <td width="3%" align="right"><b>Pcs</b></td> <td width="15%" align="right"><b>225,00</b></td> <td width="15%" align="right"><b>225,00</b></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td colspan="6"><b>FREIGHT</b></td> </tr> <tr> <td colspan="2">&nbsp;</td> <td colspan="6">EXPRESSLIEFERUNG < br>< br>will be charged according to effort<br></td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>PRICING TERM</b></td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">CIP, Carriage and Insurance Paid to, acc. to Incoterms 2010</td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">NO- 3516 Honefoss, Follummoveien 38 , Kilemoen</td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>DELIVERY ADDRESS</b></td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">Stange Industri AS</td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">Follummoveien 38 , Kilemoen</td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">3516 Honefoss</td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">Norwegen</td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>TERMS OF PAYMENT</b></td> </tr> <tr> <td width="5">&nbsp;</td> <td>100% in readiness to deliver message</td> </tr> <tr> <td width="1%">&nbsp;</td> <td width="5%">100&nbsp;%</td> <td width="70%" colspan="5">at delivery resp. at note on readiness of delivery</td> </tr> <tr> <td width="1%">&nbsp;</td><td colspan="6">&nbsp;</td> </tr> <tr> <td width="1%">&nbsp;</td><td colspan="6">All payments free of charge for InoCon Industrial Plants GmbH</td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>PAYMENT PERIOD</b></td> </tr> <tr> <td width="1%">&nbsp;</td> <td colspan="6">10 days net</td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>TIME SCHEDULE</b></td> </tr> <tr> <td width="1%">&nbsp;</td> <td width="25%">delivery date</td> <td width="25%" nowrap>03.September 2018</td> <td width="50%">expected on 4.09.2018 leaving faktory </td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr> <td colspan="7" width="100%"><b>WARRANTY PERIOD</b></td> </tr> </tbody> </table> </div> <div style="font-family: Microsoft Tai Le; font-size: 12px;"> <table width="98%"> <tbody> <tr><td width="100%" style="font-family: Microsoft Tai Le; font-size: 13px;"> ---------------------------------------------</td></tr> <tr><td width="100%" style="font-family: Microsoft Tai Le; font-size: 13px;">i.A. Thomas Wieneroither, ext 202</td></tr> </tbody> </table> </div>     

 

Then I'm using the funtion

$obj->embedHTML($html, array('downloadImages' => true));

i the result docx-file before after avery start-tag <td> 10</td> there's a "space".

Why and how can I avoid that?

 

Thanks 

 

 

Posted by admin  · 22-05-2019 - 15:32

Hello,

Please check the information available on https://www.phpdocx.com/en/forum/default/topic/1690 . It's a problem with some Tidy versions that can be solved disabling or setting a high wrap value or removing that blank spaces. Newer versions of phpdocx added new options to change them, using phpdocx 7 you can follow the advices you can find on the previous page.

Regards.

Posted by h.ennser  · 23-05-2019 - 13:24

Thank's for your response.

The easy solution is to use the tidy-version "2017/03/01" (=5.4.0) instead of "2017/11/25".

This eliminates the aboce problem with the leadind "spaces".

greetings