Forum


Replies: 1   Views: 3568
Embedhtml spacing with hyperlink issue
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 lobbygov  · 28-04-2015 - 03:03

I'm having an issue when using embedHTML with a string that has styling for a word immediately preceding a link. The space between the preceding word and the link is removed. Here's my code: require_once 'PHPDocX_4.5/classes/CreateDocx.inc'; $docx = new CreateDocx(); $docx->modifyPageLayout('letter', array('marginTop' => 700, 'marginBottom' => 700, 'marginLeft' => 700, 'marginRight' => 700)); $generic_comments = 'This is a < b >test< / b >link.'; $docx->embedHTML($generic_comments); $docx->createDocx("filename.docx"); This outputs: This is a testlink. (Test is bold and link is properly linked). Any thoughts as to why this is happening?