Skip to content

Commit 081ee1c

Browse files
author
Dmitry Radchuk
committed
Add custom page height test, update cmps
DEVSIX-6595
1 parent 3c20626 commit 081ee1c

15 files changed

+31
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ This file is part of the iText (R) project.
2323
package com.itextpdf.html2pdf.css;
2424

2525
import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest;
26+
import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant;
27+
import com.itextpdf.test.annotations.LogMessage;
28+
import com.itextpdf.test.annotations.LogMessages;
2629
import com.itextpdf.test.annotations.type.IntegrationTest;
2730

2831
import java.io.IOException;
@@ -172,4 +175,11 @@ public void heightLesserThanMaxHeight01() throws IOException, InterruptedExcepti
172175
public void heightNumberWithoutUnitTest() throws IOException, InterruptedException {
173176
convertToPdfAndCompare("heightNumberWithoutUnit", sourceFolder, destinationFolder);
174177
}
178+
179+
@LogMessages(messages = {
180+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA)})
181+
@Test
182+
public void emptyTableOnCustomPageSizedDocumentTest() throws IOException, InterruptedException {
183+
convertToPdfAndCompare("emptyTableOnCustomPageSizedDocument", sourceFolder, destinationFolder);
184+
}
175185
}
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<style>@page{ size: 595pt 50pt; }</style>
6+
</head>
7+
8+
<body>
9+
<table style="width:100%">
10+
<colgroup>
11+
<col style="width:95%">
12+
<col style="width:5%">
13+
</colgroup>
14+
<tbody>
15+
<tr>
16+
<td style="height:10px"></td>
17+
<td></td>
18+
</tr>
19+
</tbody>
20+
</table>
21+
</body></html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)