Skip to content

Commit 9e7917e

Browse files
committed
Add a test which demonstrates the issue with invalid font size processing.
DEVSIX-2881
1 parent ac9b889 commit 9e7917e

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

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

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

4545
import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest;
46+
import com.itextpdf.styledxmlparser.LogMessageConstant;
47+
import com.itextpdf.test.annotations.LogMessage;
48+
import com.itextpdf.test.annotations.LogMessages;
4649
import com.itextpdf.test.annotations.type.IntegrationTest;
4750

4851
import java.io.IOException;
@@ -80,4 +83,11 @@ public void fontAbsoluteKeywords() throws IOException, InterruptedException {
8083
public void fontRelativeKeywords() throws IOException, InterruptedException {
8184
convertToPdfAndCompare("fontRelativeKeywords", sourceFolder, destinationFolder);
8285
}
86+
87+
@Test
88+
// TODO DEVSIX-2881 : Update cmps
89+
@LogMessages(messages = @LogMessage(messageTemplate = LogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED))
90+
public void spacesInFontSizeValueTest() throws IOException, InterruptedException {
91+
convertToPdfAndCompare("spacesInFontSizeValueTest", sourceFolder, destinationFolder);
92+
}
8393
}
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<p style="">Hello World</p>
2+
<p style="font-size: 5 px;">Hello World</p>
3+
<p style="font-size: 5px;">Hello World</p>
4+
5+
<p style="">Hello World</p>
6+
<p style="font-size: 2 em;">Hello World</p>
7+
<p style="font-size: 2em;">Hello World</p>

0 commit comments

Comments
 (0)