wkhtmltopdf内边距问题

wkhtmltopdf 编程进阶笔记
发布日期 2023-02-23 更新日期 2023-02-23 阅读次数 564 文章字数 120

默认情况下带了页边距,导致生成的pdf和原html不一样。

使用参数 -B -T 等分别设置上下左右边距

wkhtmltopdf -B 0 -L 0 -R 0 -T 0 --enable-local-file-access $htmlFilePath $pdfFilePath

文章作者: 朱丰华

文章链接: https://smart.52dixiaowo.com/blog/post-378.html

版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。

wkhtmltopdf

发表评论

相关推荐
朱丰华   |   3周前   |   git · ssh

复制配置github的ssh密钥

60    评论    点赞
朱丰华   |   3周前   |   npm · js · nodejs

windows安装使用nvm

54    评论    点赞
朱丰华   |   11个月前   |   对象 · 属性 · 反射 · js

js 对象反射 Reflect

355    评论    点赞
朱丰华   |   11个月前   |   启动 · php

debian12开机启动sh

543    评论    点赞
朱丰华   |   1年前   |   sql · mysql · 字节 · 字符

mysql常用字段类型详解

333    评论    点赞
朱丰华   |   1年前   |   git

git从缓存中移除数据git rm --cached

744    评论    点赞
朱丰华   |   1年前   |   php

php判断是否被iframe

529    评论    点赞
朱丰华   |   2年前   |   checkbox

checkbox默认传值问题

675    评论    点赞
朱丰华   |   2年前   |   页面 · 监听

iframe子父页面信息传递与监听

843    评论    点赞
朱丰华   |   2年前   |   linux · upx

Linux下安装UPX

1.2    评论    点赞
朱丰华   |   2年前   |   linux

linux保持后台进程不被关闭nohup &

543    评论    点赞
朱丰华   |   2年前   |   php

php正则表达式定界符:异常Delimiter must not be alphanumeric or backslash

427    评论    点赞
朱丰华   |   2年前   |   git

git push -u参数是什么意思?--set-upstream

577    评论    点赞
朱丰华   |   2年前   |   git · hub · 仓库

go克隆并引用github仓库

428    评论    点赞
{{item.author_name}}   |   {{new Date(item.date*1000).log()}}   |   {{it}} ·

{{item.title}}

{{item.uv}}    评论    点赞