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

编程技术  /  houtizong 发布于 3年前   540
在页面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


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

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!

留言需要登陆哦

技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成

网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];

      订阅博客周刊 去订阅

文章归档

文章标签

友情链接

Auther ·HouTiZong
侯体宗的博客
© 2020 zongscan.com
版权所有ICP证 : 粤ICP备20027696号
PHP交流群 也可以扫右边的二维码
侯体宗的博客