Forum


Replies: 4   Views: 4398
Table cell horizontal alignment and addfootnote
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 neiron  · 19-07-2016 - 09:09

Super. Thank you!!!

It happened here and so

// footnote
    $footnote = new WordFragment($docx, 'document');
    $footnote->addFootnote(
      array(
        'textDocument' => 'footnote',
        'textFootnote' => 'The footnote we want to insert.',
      )
    );
    
    // table
    $textFragment = new WordFragment($docx);
    $text = array();
    $text[] = $footnote;

    $paragraphOptions = array(
      'textAlign' => 'center',
    );
    $textFragment->addText($text, $paragraphOptions);
    $valuesTable = array(
      array(
        $textFragment,
      ),
      array(
        '2',
      ),
      array(
        '3',
      ),
    );

    $docx->addTable($valuesTable);