Skip to content

Commit c24d57d

Browse files
committed
Add tests padding, margin, border in column renderer
DEVSIX-7604
1 parent 13de009 commit c24d57d

27 files changed

+138
-0
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,34 @@ public void convertBasicFlexPropertyTest() throws IOException, InterruptedExcept
141141
convertToPdfAndCompare("basicFlexPropertyTest",
142142
SOURCE_FOLDER, DESTINATION_FOLDER, false, new ConverterProperties().setMulticolEnabled(true));
143143
}
144+
145+
146+
@Test
147+
public void paddingsMarginsBorderBackgrounds() throws IOException, InterruptedException {
148+
convertToPdfAndCompare("paddingsMarginsBorderBackgrounds",
149+
SOURCE_FOLDER, DESTINATION_FOLDER, false, new ConverterProperties().setMulticolEnabled(true));
150+
}
151+
152+
153+
@Test
154+
public void borderOnlyTest() throws IOException, InterruptedException {
155+
convertToPdfAndCompare("borderOnly",
156+
SOURCE_FOLDER, DESTINATION_FOLDER, false, new ConverterProperties().setMulticolEnabled(true));
157+
}
158+
159+
160+
@Test
161+
public void paddingOnlyTest() throws IOException, InterruptedException {
162+
convertToPdfAndCompare("paddingOnly",
163+
SOURCE_FOLDER, DESTINATION_FOLDER, false, new ConverterProperties().setMulticolEnabled(true));
164+
}
165+
166+
167+
@Test
168+
public void marginOnlyTest() throws IOException, InterruptedException {
169+
convertToPdfAndCompare("marginOnly",
170+
SOURCE_FOLDER, DESTINATION_FOLDER, false, new ConverterProperties().setMulticolEnabled(true));
171+
}
172+
173+
144174
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<body>
4+
<div style="column-count: 3; border: 10px Solid Black;background-color: cyan;">
5+
<div>
6+
<div style="background-color: green;">
7+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id
8+
pulvinar est, ac facilisis dui. Morbi vel justo vel odio iaculis
9+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse id
10+
lacinia. Nullam fringilla neque in augue vehicula, nec luctus felis
11+
accumsan. Sed eleifend diam vel tellus posuere, nec blandit erat
12+
lacinia. Nullam fringilla neque in augue vehicula, nec luctus felis
13+
accumsan. Sed eleifend diam vel tellus posuere, nec blandit erat
14+
convallis. Nulla facilisi. Duis tincidunt metus id nisl rhoncus, at
15+
ullamcorper nisi porttitor. Integer vestibulum turpis vitae varius
16+
pharetra. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
17+
Suspendisse id pulvinar est, ac facilisis dui. Morbi vel justo vel odio
18+
iaculis lacinia. Nullam fringilla neque in augue vehicula, nec luctus
19+
felis accumsan. Sed eleifend diam vel tellus posuere, nec blandit erat
20+
convallis. Nulla facilisi. Duis tincidunt metus id nisl rhoncus, at
21+
ullamcorper nisi porttitor. Integer vestibulum turpis vitae varius
22+
pharetra.
23+
</div>
24+
</div>
25+
</div>
26+
</body>
27+
</html>
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.

0 commit comments

Comments
 (0)