【问题标题】:why wkhtmltopdf header and footer are applied only on the table of contents page (toc)?为什么 wkhtmltopdf 页眉和页脚仅应用于目录页 (toc)?
【发布时间】:2020-05-13 03:21:07
【问题描述】:

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

我正在使用这个命令。

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


    【解决方案1】:

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

    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
    

    【讨论】:

      猜你喜欢
      • 2017-04-21
      • 2012-10-16
      • 1970-01-01
      • 2013-12-03
      • 2012-12-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多