Skip to content

Commit 72a3859

Browse files
SnipxiText-CI
authored andcommitted
Add a new test demonstrating the problem of total number of pages being displayed incorrectly
DEVSIX-2999
1 parent 3b56ebd commit 72a3859

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ This file is part of the iText (R) project.
4444

4545
import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest;
4646
import com.itextpdf.test.annotations.type.IntegrationTest;
47-
48-
import java.io.IOException;
49-
5047
import org.junit.BeforeClass;
5148
import org.junit.Test;
5249
import org.junit.experimental.categories.Category;
5350

51+
import java.io.IOException;
52+
5453
@Category(IntegrationTest.class)
5554
public class CounterTest extends ExtendedHtmlConversionITextTest{
5655

@@ -81,4 +80,10 @@ public void pageCounter02Test() throws IOException, InterruptedException {
8180
public void pageCounter03Test() throws IOException, InterruptedException {
8281
convertToPdfAndCompare("page_counter03", sourceFolder, destinationFolder);
8382
}
83+
84+
@Test
85+
// TODO cmp file to be fixed after DEVSIX-2999 is done
86+
public void pageCounter04Test() throws IOException, InterruptedException {
87+
convertToPdfAndCompare("page_counter04", sourceFolder, destinationFolder);
88+
}
8489
}
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html><html>
2+
<head>
3+
<style>
4+
.x::before {
5+
content: counter(pages);
6+
}
7+
</style>
8+
</head>
9+
<body style="page-break-before: always">
10+
<div>Total number of pages: <span class="x"></span></div>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)