-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table of contents numbers missing #707
Comments
me to |
It's going to take somebody taking on the issue, because it doesn't seem like any of the previous developers are following up on these issues. I'm going to see if I can't figure it out soon. |
Is there any update for the page numbers missing issue of TOC? |
Still waiting for updates on this issue. It would be great to have numbers in the TOC |
+1, still waiting too (in v0.13.0) :) |
Can't you implement a loop at the end of the document which detects on which pages the titles are, and then add those page numbers to the TOC? I'll try it myself, and if it works I will post it here. |
in fact, it's a little effect. Toc will arraise page number after print it as paper |
Someone was able to put page numbers in TOC? |
Can any one find solution for this? |
This issue has been open for one year and a half. Is there anybody going to solve this problem? |
Hello, I've experienced the same issues, does anybody know if it has been solved? |
can anybody post a code sample of the issue? |
what you can do to force word to recompute all fields is set updateFields to true $phpWord->getSettings()->setUpdateFields(true); |
Where can I get an example code on how to make a table of contents? |
@fgali in the samples |
The solution you give for the toc numbers is useful for me when I am on my local server on windows but not when I upload it to the hoting. |
Any suggestions? troosan. |
I fail to see the difference between your local server and your remote hosting. |
addTOC is being generated without the page numbers still, |
$phpWord->getSettings()->setUpdateFields(true); |
Unable to display page number even after setUpdateFields set to true. |
We´ve been able to reproduce and fix this issue. While the MacOS Word is able to reference to a page number using the element´s name, the Windows Word is only able to load the very page number using the element´s id. File location: |
Hi, I replaced the file, but I have the issue yet. |
The issue (and still occurring in 2019) is if you generate the file with PHP locally and open from a local disk it prompts you to update the file when you open. Generate the file from a web hosted page and when the file opens, Word displays a protected message saying are you sure you want to trust people on the internet, and even when you say yes i trust people on the internet and it allows you to edit the file, the prompt on open that occurs for locally generated files, does not happen and so the TOC remains with no page numbers, requiring a manual update. I also don't think there is a way to fix in PHPWord, as essentially you would need to set a flag - saying trust me, I'm a good actor on the internet and so running a "macro" is safe; but clearly if PHPWord provided just such a flag, how would we know some bad people would not also set the flag? So the fix works for files served from trusted locations, but files from untrusted locations do not auto update on open. |
I have exactly the same problem , Has it been solved |
我不太理解你想问什么问题?我的英文能力不是很好。
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2021年9月6日(星期一) 下午4:33
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [PHPOffice/PHPWord] Table of contents numbers missing (#707)
@特罗索
我看不到本地服务器和远程主机之间的区别。
能详细说一下吗
问题是(在 2019 年仍然会发生)如果你用PHP在本地和从本地磁盘打开时,它会提示您更新文件。从一个 web 托管页面生成文件,当文件打开时, Word 会显示一条受保护的消息,表示您确定要信任互联网上的人,即使你说是的,我相信人在互联网上,它允许你编辑文件,提示在打开发生的本地生成的文件,不会发生,因此 TOC 仍然没有页码,需要手动更新。
我认为问题在于
我也不认为有一种方法可以修复 PHP Word ,因为本质上你需要设置一个标志-说相信我,我是一个很好的演员在互联网上,所以运行一个“宏”是安全的;很明显,如果 PHP Word 提供了这样一个标志,我们怎么知道一些坏人不会也设置这个标志呢?
因此,修复工作的文件服务,从可信的位置,但文件从不受信任的位置不自动更新打开。
我也有同样的问题,已经解决了吗?
—
你收到这个是因为你评论了。
直接回复此邮件,在 GitHub 上查看或取消订阅.
GitHub Mobile 上的分流通知监督办或机器人.
|
You can try the following two ways to solve it |
I have an issue where my TOC is being generated without the page numbers,
can someone help me with this, thanks in advance
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: