Register Lost your password?
Full api documentation: full api documentation FREE version full api documentation PRO version

public function addElement(string type, array paramsElement = array())

Parameters

type

  • All kind of embedded elements: addLink, addImage, addGraphic, addTextBox

$paramsElement

  • The parameters of the embedded element that you specify in the parameter ‘type’

Examples

Example 1 Version Pro


require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();

$paramsLink = array(
    'title' => 'Link to Google',
    'link' => 'http://www.google.es'
);

$link = $docx->addElement('addLink', $paramsLink);

$valuesList = array(
    'Line 1',
    $link,
);
$paramsList = array(
    'val' => 1
);
$docx->addList($valuesList, $paramsList);

$docx->createDocx('example_list');

    2 Responses

  • Chaf

    I want to use text whith the method , addElement but it doesn’t work, there is a specials params that i have to use to make this possible.
    Thanks

  • JuanB

    how can I add a table in a specific point in a template?