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* <text> Centered footer text
--footer-font-name* <name> Set footer font name (default Arial)
--footer-font-size* <size> Set footer font size (default 11)
--footer-html* <url> Adds a html footer
--footer-left* <text> Left aligned footer text
--footer-line* Display line above the footer
--footer-right* <text> Right aligned footer text
--footer-spacing* <real> Spacing between footer and content in mm (default 0)
--header-center* <text> Centered header text
--header-font-name* <name> Set header font name (default Arial)
--header-font-size* <size> Set header font size (default 11)
--header-html* <url> Adds a html header
--header-left* <text> Left aligned header text
--header-line* Display line below the header
--header-right* <text> Right aligned header text
--header-spacing* <real> 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]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值