为什么 wkhtmltopdf 页眉和页脚仅应用于目录页面 (toc) 的 table?

why wkhtmltopdf header and footer are applied only on the table of contents page (toc)?

我想将页眉和页脚应用到所有页面,但我得到的是它们只出现在目录(table 内容)页面上。如何解决这个问题?

我正在使用这个命令。

wkhtmltopdf --encoding 'UTF-8' toc --xsl-style-sheet /Users/Documents/toc.xsl --header-html /Users/Documents/header.html --header-spacing 10 --footer-html /Users/Documents/footer.html --footer-spacing 10 /Users/Documents/draft-11.html /Users/Documents/content-draft.pdf

此修复是为目录提供两次页眉和页脚,一次为内容本身提供页眉和页脚

wkhtmltopdf --encoding 'UTF-8' toc --xsl-style-sheet /Users/Documents/toc.xsl --header-html /Users/Documents/header.html --header-spacing 10 --footer-html /Users/Documents/footer.html --footer-spacing 10 /Users/Documents/draft-11.html  --header-html /Users/Documents/header.html --header-spacing 10 --footer-html /Users/Documents/footer.html --footer-spacing 10 /Users/Documents/content-draft.pdf