Forum


Replies: 3   Views: 2913
Embedhtml + parseanchors fails
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 efinfo  · 05-10-2016 - 14:35

I need to use internal link on html, but when i use parseAnchors  ( true ) ther result word is corrupt.

require_once '../classes/CreateDocx.inc';

$docx = new CreateDocx();
$html = '<a href="#tips">Visit the Useful Tips Section</a>';
$html .= '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
$html .= '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
$html .= '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
$html .= '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
$html .= '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
$html .= '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
$html .= '<h2 id="tips">Useful Tips Section</h2>';


$options = array('parseAnchors'=> true);

$docx->embedHTML($html,$options);
$docx->createDocx('example_embedHTML_1');