PHPWord addTOC is not displaying page numbers

前端 未结 1 1386
感情败类
感情败类 2021-02-04 20:42

I\'m using https://github.com/PHPOffice/PHPWord to generate a word document. The function addTOC generates an index of pages with titles, but for some reason the page numbers do

相关标签:
1条回答
  • 2021-02-04 21:32

    From PHPWord example in samples dir (https://github.com/PHPOffice/PHPWord/blob/develop/samples/Sample_17_TitleTOC.php), I would tell it is not possible:

    echo date('H:i:s'), ' Note: Please refresh TOC manually.', EOL;

    I also tried to add the TOC at the end of the document, after titles declarations (when we already know page numbers). But with no success.

    EDIT: seems to be a bug: https://github.com/PHPOffice/PHPWord/issues/707

    0 讨论(0)
提交回复
热议问题