Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wkhtml字体上方的额外空间_Html_Css_Fonts_Font Face_Wkhtmltopdf - Fatal编程技术网

wkhtml字体上方的额外空间

wkhtml字体上方的额外空间,html,css,fonts,font-face,wkhtmltopdf,Html,Css,Fonts,Font Face,Wkhtmltopdf,我在使用wkhtmltopdf生成pdf文档时遇到文本问题。Wkhtmltopdf不会在文本上方生成额外空间 Html页面看起来不错(在Chrome、Firefox上测试): PDF看起来像: @font-face{ 字体系列:MaidenRange; src:url('/fonts/MaidenOrange.eot'); src:url('/fonts/MaidenOrange.eot?#iefix')格式('embedded-opentype'), url('/fonts/MaidenOr

我在使用wkhtmltopdf生成pdf文档时遇到文本问题。Wkhtmltopdf不会在文本上方生成额外空间

Html页面看起来不错(在Chrome、Firefox上测试):

PDF看起来像:

@font-face{
字体系列:MaidenRange;
src:url('/fonts/MaidenOrange.eot');
src:url('/fonts/MaidenOrange.eot?#iefix')格式('embedded-opentype'),
url('/fonts/MaidenOrange.woff')格式('woff'),
url('/fonts/MaidenOrange.ttf')格式('truetype');
字体大小:正常;
字体风格:普通;
}

卡伦达兹

2015
您是否尝试过在CSS中设置线条高度?是的,我尝试过。当我将行高设置为与字体大小相同时,结果几乎相同。唯一的区别是html文档中的字符串“2015”稍微低一点。