Skip to content

Commit ebd6f2c

Browse files
committed
Add new tests. Fix cmps.
DEVSIX-1662
1 parent 896fa46 commit ebd6f2c

File tree

11 files changed

+162
-0
lines changed

11 files changed

+162
-0
lines changed

src/test/java/com/itextpdf/html2pdf/css/TextPropertiesTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ public void lineHeightTest01() throws IOException, InterruptedException {
9696
runTest("lineHeightTest01");
9797
}
9898

99+
@Test
100+
public void lineHeightTest02() throws IOException, InterruptedException {
101+
runTest("lineHeightTest02");
102+
}
103+
104+
@Test
105+
public void lineHeightTest03() throws IOException, InterruptedException {
106+
runTest("lineHeightTest03");
107+
}
108+
99109
@Test
100110
public void whiteSpaceTest01() throws IOException, InterruptedException {
101111
runTest("whiteSpaceTest01");
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
div {
6+
padding: 0px;
7+
margin: 0px;
8+
border: 1px solid blue;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
14+
<div>
15+
<p style="line-height: 20%; background-color:red; padding: 0px; margin: 0px;">
16+
line-height: 20%; background-color:red; padding: 0px; margin: 0px;</p>
17+
</div>
18+
<br>
19+
20+
<div>
21+
<p style="line-height: 2px; background-color:red; padding: 0px; margin: 0px;">
22+
line-height: 2px; background-color:red; padding: 0px; margin: 0px;</p>
23+
</div>
24+
<br>
25+
26+
<div>
27+
<p style="line-height: 20%; background-color:red; border: 1px solid black; padding: 0px; margin: 0px;">
28+
line-height: 20%; background-color:red; border: 1px solid black; padding: 0px; margin: 0px;</p>
29+
</div>
30+
<br>
31+
32+
<div>
33+
<p style="line-height: 2px; background-color:red; border: 1px solid black; padding: 0px; margin: 0px;">
34+
line-height: 2px; background-color:red; border: 1px solid black; padding: 0px; margin: 0px;</p>
35+
</div>
36+
<br>
37+
<br>
38+
<br>
39+
<div>
40+
<p style="line-height: 20%; background-color:red; padding: 5px; margin: 5px;">
41+
line-height: 20%; background-color:red; padding: 5px; margin: 5px;</p>
42+
</div>
43+
<br>
44+
45+
<div>
46+
<p style="line-height: 2px; background-color:red; padding: 5px; margin: 5px;">
47+
line-height: 2px; background-color:red; padding: 5px; margin: 5px;</p>
48+
</div>
49+
<br>
50+
51+
<div>
52+
<p style="line-height: 20%; background-color:red; border: 1px solid black; padding: 5px; margin: 5px;">
53+
line-height: 20%; background-color:red; border: 1px solid black; padding: 5px; margin: 5px;</p>
54+
</div>
55+
<br>
56+
57+
<div>
58+
<p style="line-height: 2px; background-color:red; border: 1px solid black; padding: 5px; margin: 5px;">
59+
line-height: 2px; background-color:red; border: 1px solid black; padding: 5px; margin: 5px;</p>
60+
</div>
61+
<br>
62+
<br>
63+
<br>
64+
65+
<div>
66+
<p style="line-height: 20%; background-color:red; padding: 10px; margin: 10px;">
67+
line-height: 20%; background-color:red; padding: 10px; margin: 10px;</p>
68+
</div>
69+
<br>
70+
71+
<div>
72+
<p style="line-height: 2px; background-color:red; padding: 10px; margin: 10px;">
73+
line-height: 2px; background-color:red; padding: 10px; margin: 10px;</p>
74+
</div>
75+
<br>
76+
77+
<div>
78+
<p style="line-height: 20%; background-color:red; border: 1px solid black; padding: 10px; margin: 10px;">
79+
line-height: 20%; background-color:red; border: 1px solid black; padding: 10px; margin: 10px;</p>
80+
</div>
81+
<br>
82+
83+
<div>
84+
<p style="line-height: 2px; background-color:red; border: 1px solid black; padding: 10px; margin: 10px;">
85+
line-height: 2px; background-color:red; border: 1px solid black; padding: 10px; margin: 10px;</p>
86+
</div>
87+
<br>
88+
<br>
89+
<br>
90+
91+
<div>
92+
<p style="line-height: 20%; background-color:red;">
93+
line-height: 20%; background-color:red;</p>
94+
</div>
95+
<br>
96+
97+
<div>
98+
<p style="line-height: 2px; background-color:red;">
99+
line-height: 2px; background-color:red;</p>
100+
</div>
101+
<br>
102+
103+
<div>
104+
<p style="line-height: 20%; background-color:red; border: 1px solid black;">
105+
line-height: 20%; background-color:red; border: 1px solid black;</p>
106+
</div>
107+
<br>
108+
109+
<div>
110+
<p style="line-height: 2px; background-color:red; border: 1px solid black;">
111+
line-height: 2px; background-color:red; border: 1px solid black;</p>
112+
</div>
113+
<br>
114+
115+
</body>
116+
</html>
117+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
td {
6+
background-color: forestgreen;
7+
border: 1px solid black;
8+
}
9+
10+
p {
11+
background-color: blue;
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
<table>
17+
<tr>
18+
<td style="line-height: 0px;"><p>line-height: 0px;</p></td>
19+
<td style="line-height: 5px;"><p>line-height: 5px;</p></td>
20+
<td style="line-height: 10px;"><p>line-height: 10px;</p></td>
21+
</tr>
22+
</table>
23+
<br>
24+
<br>
25+
<table>
26+
<tr>
27+
<td style="line-height: 0px;"><p style="border: 1px solid black;">line-height: 0px;</p></td>
28+
<td style="line-height: 5px;"><p style="border: 1px solid black;">line-height: 5px;</p></td>
29+
<td style="line-height: 10px;"><p style="border: 1px solid black;">line-height: 10px;</p></td>
30+
</tr>
31+
</table>
32+
33+
</body>
34+
</html>
35+

0 commit comments

Comments
 (0)