ok I understand you....only a question about the second point
2. Create the table of content using addTableContents in another DOCX
in the example sample_1.php
require_once '../../../Classes/Phpdocx/Create/CreateDocx.inc';
$docx = new Phpdocx\Create\CreateDocx();
$docx->addText('Table of Contents', array('bold' => true, 'fontSize' => 14));
$legend = array('text' => 'Click here to update the TOC',
'color' => 'B70000',
'bold' => true,
'fontSize' => 12);
$docx->addTableContents(array('autoUpdate' => true), $legend);
//we add now some headings so tehy show up in the TOC
$docx->addText('Chapter 1', array('pStyle' => 'Heading1PHPDOCX'));
$docx->addText('Section', array('pStyle' => 'Heading2PHPDOCX'));
$docx->addText('Another TOC entry', array('pStyle' => 'Heading3PHPDOCX'));
$docx->createDocx('example_addTableContents_1');
In this file create the table of content from 3$docx->addText and you told me that i only create the table of content and this content in other page
How I can create only the table of content and not text then of this TOC ?? Because if i not add text or another thing the document put
No se encontraron elementos de tabla de contenido.
Tabla de contenido
1. INTRODUCCIÓN 4
2. ANTECEDENTES 5
3. ALCANCES 6
4. METODOLOGÃA DE TRABAJO 6