wkhtmltopdf css尺寸,单位cm / mm [英] wkhtmltopdf css sizes in cm/mm

查看:1028
本文介绍了wkhtmltopdf css尺寸,单位cm / mm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用wkhtmltopdf产生A4大小的PDF。当我创建一个< div> 标签,并将其风格设置为 height:297mm; width:210mm (这是A4的定义大小),将wkhtmltopdf的margin设置为0( wkhtmltopdf -B 0 -T 0 -L 0 -R 0 ... ),并给出< div> 一个红色背景,我可以看到页面底部有一条细的白线, $ c>< div> 未完全填充页面。这与Debian上的0.11.0 rc1(最新版本)和Mac OS X上的0.10.0 rc2一致。

I use wkhtmltopdf to produce A4 sized PDFs. When I create a <div> tag and set its style to height: 297mm; width: 210mm (which is the defined size of A4), set wkhtmltopdf's margin settings to 0 (wkhtmltopdf -B 0 -T 0 -L 0 -R 0 ...) and give the <div> a red background, I can see a thin white line at the bottom of the page, i.e. the <div> is not filling the page completely. This is happening consistently with 0.11.0 rc1 (the latest version) on Debian and with 0.10.0 rc2 on Mac OS X.

有没有人看到过?

推荐答案

尝试设置< div> 元素 style =margin:0;在我的情况下,这有助于...

Try set <div> element style="margin: 0;" in my case this helps...

这篇关于wkhtmltopdf css尺寸,单位cm / mm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆