Forum


Replies: 4   Views: 2590
Level addheading
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 Tiago Scalco de Mello  · 21-10-2017 - 04:12

1- When I put the summary in the document generated by phpdocx it does not recognize the title level 3

 $docx->addHeading('1',1);
 $docx->addHeading('1.2',2);
 $docx->addHeading('1.2.3',3);

OUTPUT

1

1.2

1.2.3

summary

1.

1.2

-does not identify the next

Another question, how to put Numbering in title?

 

 

Posted by admin  · 22-10-2017 - 07:39

Hello,

If a heading level isn't in the range of values supported it won't appear. Please read this page about it:

https://www.phpdocx.com/documentation/cookbook/tables-of-contents

About your second question, you can use a custom paragraph style that includes the numbering you want to use.

Regards.

Posted by Tiago Scalco de Mello  · 23-10-2017 - 00:56

$myList = array('item 1',
            'item 2',
            array('subitem 2_1',
                'subitem 2_2'),
            'item 3',
            array('subitem 3_1',
                'subitem 3_2',
                array('sub_subitem 3_2_1',
                    'sub_subitem 3_2_1')),
            'item 4');

        $wf->addList($myList, 4);

Output:

the subitem always restarts the numbering of 1

1.  item 1
2. item 2
  1. subitem 2_1
  2. subitem 2_2
3. item 3
  1. subitem 3_1
  2. subitem 3_2
    1. sub_subitem 3_2_1
    2. sub_subitem 3_2_1
4. item 4

Posted by Tiago Scalco de Mello  · 23-10-2017 - 02:28

I got the result but not in heading format