Is some pages wkhtmltopdf truncates first row in PDF :
Line has proper height like other lines:
<!DOCTYPE html>
<html>
<head>
<style>
* {
margin: 0;
padding: 0;
}
html, body {
height: 100%;
width: 100%;
}
.row {
position: relative;
clear: both;
}
.field {
font-family: "Times New Roman";
font-size: 10pt;
background-color: transparent;
overflow: hidden;
word-break: break-all;
z-index: 2;
}
</head><body>
....
<div class='row'><div class='field' style='left:0.13cm;width:3.37cm;height:0.47cm;text-align:right;color:#000080;'>POS sale 136287</div>
</div>
<div class='row'><div class='field' style='left:3.68cm;width:1.82cm;height:0.47cm;'>30.01.2016</div>
</div>
<div class='row'><div class='field' style='left:5.55cm;width:4.45cm;height:0.47cm;'> Jaeostja </div>
</div>
<div class='row'><div class='field' style='left:10.03cm;width:2.53cm;height:0.47cm;text-align:right;'>0,15</div>
</div>
<div class='row'></div><div class='row'><div class='field' style='left:15.05cm;width:2.47cm;height:0.47cm;text-align:right;'>-26730,47</div>
...
Full html to reproduce is in
https://github.com/wkhtmltopdf/wkhtmltopdf/files/491556/partialline2.zip
Result pdf is in https://github.com/wkhtmltopdf/wkhtmltopdf/files/491558/result.zip
How to show whole line in pdf ?
I tried to add
page-break-inside: avoid !important;
margin: 4px 0 4px 0; /* to keep the page break from cutting too close to the text in the div */
to row and field classes as described in avoid page break inside row of table
but problem persists.
- wkhtmltopdf version: 0.12.2.1 (occurs in 0.12.3.2 also)
- Operating System: Windows 10 Pro 1511
Posted also in https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3141