Forum


Replies: 3   Views: 1154
Addlink strikethrough = false make strike anyway
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 admin  · 10-05-2021 - 18:15

Hello,

From the following sample available in all packages: examples/Core/addLink/sample_1.php:

$docx->addLink('Link to Google', array('url'=> 'http://www.google.es'));

$docx->addText('And now the same link with some additional formatting:');

$linkOptions = array(
  'url'=> 'http://www.google.es',
  'color' => 'B70000',
  'underline' => 'none'
);
$docx->addLink('Link to Google in red color and not underlined', $linkOptions);

No strikethrough is added to the link.

If we set strikeThrough as false:

$linkOptions = array(
    'url'=> 'http://www.google.es',
    'color' => 'B70000',
    'underline' => 'none',
    'strikeThrough' => false,
);
$docx->addLink('Link to Google in red color and not underlined', $linkOptions);

the output also has no strikethrough.

Regards.