wkhtmltopdf专成pdf文件之后的页码显示问题

在页面header或者footer上面添加page(当前页数)topage(总页数)来显示页码


wkhtmltopdf --footer-right '[page]/[topage]' http://www.google.com google.pdf


header和footer参数说明

Headers And Footer Options

--footer-center* Centered footer text
--footer-font-name* Set footer font name (default Arial)
--footer-font-size* Set footer font size (default 11)
--footer-html* Adds a html footer
--footer-left* Left aligned footer text
--footer-line* Display line above the footer
--footer-right* Right aligned footer text
--footer-spacing* Spacing between footer and content in mm (default 0)
--header-center* Centered header text
--header-font-name* Set header font name (default Arial)
--header-font-size* Set header font size (default 11)
--header-html* Adds a html header
--header-left* Left aligned header text
--header-line* Display line below the header
--header-right* Right aligned header text
--header-spacing* Spacing between header and content in mm (default 0)

页码以及时间等参数的说明

* [page] Replaced by the number of the pages currently being printed
* [frompage] Replaced by the number of the first page to be printed
* [topage] Replaced by the number of the last page to be printed
* [webpage] Replaced by the URL of the page being printed
* [section] Replaced by the name of the current section
* [subsection] Replaced by the name of the current subsection
* [date] Replaced by the current date in system local format
* [time] Replaced by the current time in system local format


文档资料
[url]http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html[/url]

你可能感兴趣的:(linux)