From fbf08bc5aa7c491402a0ebec917c62bedc40e587 Mon Sep 17 00:00:00 2001 From: iText Software Date: Thu, 16 Jun 2022 16:50:04 +0000 Subject: [PATCH 01/11] [AFTER RELEASE] pdfHTML 4.0.3 --- pom.xml | 4 ++-- .../itextpdf/html2pdf/actions/data/PdfHtmlProductData.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b90825a90..4caeb059d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ com.itextpdf root - 7.2.3-SNAPSHOT + 7.2.4-SNAPSHOT html2pdf - 4.0.3-SNAPSHOT + 4.0.4-SNAPSHOT pdfHTML pdfHTML is an iText 7 add-on that lets you to parse (X)HTML snippets and the associated CSS and converts diff --git a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java index c13ae4d74..80c5b01a0 100644 --- a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java +++ b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java @@ -30,7 +30,7 @@ This file is part of the iText (R) project. */ public final class PdfHtmlProductData { private static final String PDF_HTML_PUBLIC_PRODUCT_NAME = "pdfHTML"; - private static final String PDF_HTML_VERSION = "4.0.3-SNAPSHOT"; + private static final String PDF_HTML_VERSION = "4.0.4-SNAPSHOT"; private static final int PDF_HTML_COPYRIGHT_SINCE = 2000; private static final int PDF_HTML_COPYRIGHT_TO = 2022; From ba533ace46261321ecdaff55cdf40f4ed654c79e Mon Sep 17 00:00:00 2001 From: Andrei Stryhelski Date: Tue, 19 Jul 2022 17:00:37 +0300 Subject: [PATCH 02/11] Add tests for device-cmyk functionality DEVSIX-6783 --- .../css/apply/util/BackgroundApplierUtil.java | 7 +- .../apply/util/BorderStyleApplierUtil.java | 39 ++++++-- .../css/apply/util/FontStyleApplierUtil.java | 14 +-- .../css/apply/util/OutlineApplierUtil.java | 39 ++++++-- .../logs/Html2PdfLogMessageConstant.java | 3 + .../com/itextpdf/html2pdf/css/BorderTest.java | 13 +++ .../itextpdf/html2pdf/css/DeviceCmykTest.java | 93 ++++++++++++++++++ .../apply/util/OutlineApplierUtilTest.java | 48 +++++++++ .../BackgroundPosition203Test.java | 4 +- .../css/BorderTest/border3DCmykTest.html | 25 +++++ .../css/BorderTest/cmp_border3DCmykTest.pdf | Bin 0 -> 1542 bytes .../css/DeviceCmykTest/bodyBgColor.html | 6 ++ .../css/DeviceCmykTest/borderColor.html | 10 ++ .../css/DeviceCmykTest/cmp_bodyBgColor.pdf | Bin 0 -> 1169 bytes .../css/DeviceCmykTest/cmp_borderColor.pdf | Bin 0 -> 2097 bytes .../css/DeviceCmykTest/cmp_divBgColor.pdf | Bin 0 -> 1238 bytes .../css/DeviceCmykTest/cmp_divColor.pdf | Bin 0 -> 1210 bytes .../css/DeviceCmykTest/cmp_headerBgColor.pdf | Bin 0 -> 1269 bytes .../css/DeviceCmykTest/cmp_headerColor.pdf | Bin 0 -> 1226 bytes .../DeviceCmykTest/cmp_paragraphBgColor.pdf | Bin 0 -> 1245 bytes .../css/DeviceCmykTest/cmp_paragraphColor.pdf | Bin 0 -> 1216 bytes .../css/DeviceCmykTest/cmp_simpleSvgColor.pdf | Bin 0 -> 1585 bytes .../css/DeviceCmykTest/cmp_spanBgColor.pdf | Bin 0 -> 1235 bytes .../css/DeviceCmykTest/cmp_spanColor.pdf | Bin 0 -> 1199 bytes .../css/DeviceCmykTest/divBgColor.html | 9 ++ .../html2pdf/css/DeviceCmykTest/divColor.html | 9 ++ .../css/DeviceCmykTest/headerBgColor.html | 9 ++ .../css/DeviceCmykTest/headerColor.html | 9 ++ .../css/DeviceCmykTest/paragraphBgColor.html | 9 ++ .../css/DeviceCmykTest/paragraphColor.html | 9 ++ .../css/DeviceCmykTest/simpleSvgColor.html | 13 +++ .../css/DeviceCmykTest/spanBgColor.html | 9 ++ .../css/DeviceCmykTest/spanColor.html | 9 ++ 33 files changed, 357 insertions(+), 29 deletions(-) create mode 100644 src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java create mode 100644 src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/BorderTest/border3DCmykTest.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/BorderTest/cmp_border3DCmykTest.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_bodyBgColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_borderColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_divBgColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_divColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_headerBgColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_headerColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_paragraphBgColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_paragraphColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_simpleSvgColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_spanBgColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_spanColor.pdf create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divBgColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerBgColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphBgColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/simpleSvgColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanBgColor.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanColor.html diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java index dea805d7d..269424aae 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtil.java @@ -61,6 +61,7 @@ This file is part of the iText (R) project. import com.itextpdf.layout.properties.BlendMode; import com.itextpdf.layout.properties.BackgroundRepeat.BackgroundRepeatValue; import com.itextpdf.layout.properties.Property; +import com.itextpdf.layout.properties.TransparentColor; import com.itextpdf.layout.properties.UnitValue; import com.itextpdf.styledxmlparser.css.CommonCssConstants; import com.itextpdf.styledxmlparser.css.util.CssBackgroundUtils; @@ -298,10 +299,8 @@ private static int getBackgroundSidePropertyIndex(final int propertiesNumber, fi private static void applyBackgroundColor(final String backgroundColorStr, final IPropertyContainer element, BackgroundBox clip) { if (backgroundColorStr != null && !CssConstants.TRANSPARENT.equals(backgroundColorStr)) { - float[] rgbaColor = CssDimensionParsingUtils.parseRgbaColor(backgroundColorStr); - Color color = new DeviceRgb(rgbaColor[0], rgbaColor[1], rgbaColor[2]); - float opacity = rgbaColor[3]; - final Background backgroundColor = new Background(color, opacity, clip); + TransparentColor color = CssDimensionParsingUtils.parseColor(backgroundColorStr); + final Background backgroundColor = new Background(color.getColor(), color.getOpacity(), clip); element.setProperty(Property.BACKGROUND, backgroundColor); } } diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/BorderStyleApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/BorderStyleApplierUtil.java index f8a1c3e93..683f6eed9 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/BorderStyleApplierUtil.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/BorderStyleApplierUtil.java @@ -44,7 +44,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.attach.ProcessorContext; import com.itextpdf.html2pdf.css.CssConstants; +import com.itextpdf.kernel.colors.Color; import com.itextpdf.kernel.colors.ColorConstants; +import com.itextpdf.kernel.colors.DeviceCmyk; import com.itextpdf.kernel.colors.DeviceRgb; import com.itextpdf.layout.IPropertyContainer; import com.itextpdf.layout.borders.Border; @@ -58,6 +60,7 @@ This file is part of the iText (R) project. import com.itextpdf.layout.borders.SolidBorder; import com.itextpdf.layout.properties.BorderRadius; import com.itextpdf.layout.properties.Property; +import com.itextpdf.layout.properties.TransparentColor; import com.itextpdf.layout.properties.UnitValue; import com.itextpdf.styledxmlparser.css.resolve.CssDefaults; import com.itextpdf.styledxmlparser.css.util.CssDimensionParsingUtils; @@ -191,13 +194,13 @@ public static Border getCertainBorder(String borderWidth, String borderStyle, St borderWidthValue = unitValue.getValue(); Border border = null; if (borderWidthValue > 0) { - DeviceRgb color = (DeviceRgb) ColorConstants.BLACK; + Color color = ColorConstants.BLACK; float opacity = 1f; if (borderColor != null) { if (!CssConstants.TRANSPARENT.equals(borderColor)) { - float[] rgbaColor = CssDimensionParsingUtils.parseRgbaColor(borderColor); - color = new DeviceRgb(rgbaColor[0], rgbaColor[1], rgbaColor[2]); - opacity = rgbaColor[3]; + TransparentColor tColor = CssDimensionParsingUtils.parseColor(borderColor); + color = tColor.getColor(); + opacity = tColor.getOpacity(); } else { opacity = 0f; } @@ -219,16 +222,36 @@ public static Border getCertainBorder(String borderWidth, String borderStyle, St border = new DoubleBorder(color, borderWidthValue, opacity); break; case CssConstants.GROOVE: - border = new GrooveBorder(color, borderWidthValue, opacity); + if (color instanceof DeviceRgb) { + border = new GrooveBorder((DeviceRgb)color, borderWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + border = new GrooveBorder((DeviceCmyk)color, borderWidthValue, opacity); + } break; case CssConstants.RIDGE: - border = new RidgeBorder(color, borderWidthValue, opacity); + if (color instanceof DeviceRgb) { + border = new RidgeBorder((DeviceRgb)color, borderWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + border = new RidgeBorder((DeviceCmyk)color, borderWidthValue, opacity); + } break; case CssConstants.INSET: - border = new InsetBorder(color, borderWidthValue, opacity); + if (color instanceof DeviceRgb) { + border = new InsetBorder((DeviceRgb)color, borderWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + border = new InsetBorder((DeviceCmyk)color, borderWidthValue, opacity); + } break; case CssConstants.OUTSET: - border = new OutsetBorder(color, borderWidthValue, opacity); + if (color instanceof DeviceRgb) { + border = new OutsetBorder((DeviceRgb)color, borderWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + border = new OutsetBorder((DeviceCmyk)color, borderWidthValue, opacity); + } break; default: border = null; diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/FontStyleApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/FontStyleApplierUtil.java index 8f1db56bd..edaa407ef 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/FontStyleApplierUtil.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/FontStyleApplierUtil.java @@ -125,9 +125,9 @@ public static void applyFontStyles(Map cssProps, ProcessorContex if (cssColorPropValue != null) { TransparentColor transparentColor; if (!CssConstants.TRANSPARENT.equals(cssColorPropValue)) { - float[] rgbaColor = CssDimensionParsingUtils.parseRgbaColor(cssColorPropValue); - Color color = new DeviceRgb(rgbaColor[0], rgbaColor[1], rgbaColor[2]); - float opacity = rgbaColor[3]; + TransparentColor tColor = CssDimensionParsingUtils.parseColor(cssColorPropValue); + Color color = tColor.getColor(); + float opacity = tColor.getOpacity(); transparentColor = new TransparentColor(color, opacity); } else { transparentColor = new TransparentColor(ColorConstants.BLACK, 0f); @@ -203,7 +203,7 @@ public static void applyFontStyles(Map cssProps, ProcessorContex } } - float [] colors = new float[4]; + TransparentColor tColor; Color textDecorationColor; float opacity = 1f; String textDecorationColorProp = cssProps.get(CssConstants.TEXT_DECORATION_COLOR); @@ -220,9 +220,9 @@ public static void applyFontStyles(Map cssProps, ProcessorContex logger.error(Html2PdfLogMessageConstant.HSL_COLOR_NOT_SUPPORTED); textDecorationColor = ColorConstants.BLACK; } else { - colors = CssDimensionParsingUtils.parseRgbaColor(textDecorationColorProp); - textDecorationColor = new DeviceRgb(colors[0], colors[1], colors[2]);; - opacity = colors[3]; + tColor = CssDimensionParsingUtils.parseColor(textDecorationColorProp); + textDecorationColor = tColor.getColor(); + opacity = tColor.getOpacity(); } } diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtil.java index 0f049613e..64585e579 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtil.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtil.java @@ -44,7 +44,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.attach.ProcessorContext; +import com.itextpdf.kernel.colors.Color; import com.itextpdf.kernel.colors.ColorConstants; +import com.itextpdf.kernel.colors.DeviceCmyk; import com.itextpdf.kernel.colors.DeviceRgb; import com.itextpdf.layout.IPropertyContainer; import com.itextpdf.layout.borders.Border; @@ -57,6 +59,7 @@ This file is part of the iText (R) project. import com.itextpdf.layout.borders.RidgeBorder; import com.itextpdf.layout.borders.SolidBorder; import com.itextpdf.layout.properties.Property; +import com.itextpdf.layout.properties.TransparentColor; import com.itextpdf.layout.properties.UnitValue; import com.itextpdf.html2pdf.css.CssConstants; import com.itextpdf.styledxmlparser.css.resolve.CssDefaults; @@ -151,13 +154,13 @@ public static Border getCertainBorder(String outlineWidth, String outlineStyle, outlineWidthValue = unitValue.getValue(); Border outline = null; if (outlineWidthValue > 0) { - DeviceRgb color = (DeviceRgb) ColorConstants.BLACK; + Color color = ColorConstants.BLACK; float opacity = 1f; if (outlineColor != null) { if (!CssConstants.TRANSPARENT.equals(outlineColor)) { - float[] rgbaColor = CssDimensionParsingUtils.parseRgbaColor(outlineColor); - color = new DeviceRgb(rgbaColor[0], rgbaColor[1], rgbaColor[2]); - opacity = rgbaColor[3]; + TransparentColor tColor = CssDimensionParsingUtils.parseColor(outlineColor); + color = tColor.getColor(); + opacity = tColor.getOpacity(); } else { opacity = 0f; } @@ -180,16 +183,36 @@ public static Border getCertainBorder(String outlineWidth, String outlineStyle, outline = new DoubleBorder(color, outlineWidthValue, opacity); break; case CssConstants.GROOVE: - outline = new GrooveBorder(color, outlineWidthValue, opacity); + if (color instanceof DeviceRgb) { + outline = new GrooveBorder((DeviceRgb)color, outlineWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + outline = new GrooveBorder((DeviceCmyk)color, outlineWidthValue, opacity); + } break; case CssConstants.RIDGE: - outline = new RidgeBorder(color, outlineWidthValue, opacity); + if (color instanceof DeviceRgb) { + outline = new RidgeBorder((DeviceRgb)color, outlineWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + outline = new RidgeBorder((DeviceCmyk)color, outlineWidthValue, opacity); + } break; case CssConstants.INSET: - outline = new InsetBorder(color, outlineWidthValue, opacity); + if (color instanceof DeviceRgb) { + outline = new InsetBorder((DeviceRgb)color, outlineWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + outline = new InsetBorder((DeviceCmyk)color, outlineWidthValue, opacity); + } break; case CssConstants.OUTSET: - outline = new OutsetBorder(color, outlineWidthValue, opacity); + if (color instanceof DeviceRgb) { + outline = new OutsetBorder((DeviceRgb)color, outlineWidthValue, opacity); + } + if (color instanceof DeviceCmyk) { + outline = new OutsetBorder((DeviceCmyk)color, outlineWidthValue, opacity); + } break; default: outline = null; diff --git a/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java b/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java index 74a5fcd92..dd6e69a76 100644 --- a/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java +++ b/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java @@ -201,6 +201,9 @@ public final class Html2PdfLogMessageConstant { /** The Constant WORKER_UNABLE_TO_PROCESS_OTHER_WORKER. */ public static final String WORKER_UNABLE_TO_PROCESS_OTHER_WORKER = "Worker of type {0} unable to process {1}"; + /** The Constant ELEMENT_DOES_NOT_FIT_CURRENT_AREA. */ + public static final String ELEMENT_DOES_NOT_FIT_CURRENT_AREA = "Element does not fit current area"; + private Html2PdfLogMessageConstant() { //Private constructor will prevent the instantiation of this class directly } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java b/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java index 5972c348b..5c808567c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java @@ -45,6 +45,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.styledxmlparser.css.validate.CssDeclarationValidationMaster; +import com.itextpdf.styledxmlparser.css.validate.impl.CssDefaultValidator; +import com.itextpdf.styledxmlparser.css.validate.impl.CssDeviceCmykAwareValidator; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; import com.itextpdf.test.annotations.type.IntegrationTest; @@ -130,6 +133,16 @@ public void border3DTest02() throws IOException, InterruptedException { convertToPdfAndCompare("border3DTest02", sourceFolder, destinationFolder); } + @Test + public void border3DCmykTest() throws IOException, InterruptedException { + try { + CssDeclarationValidationMaster.setValidator(new CssDeviceCmykAwareValidator()); + convertToPdfAndCompare("border3DCmykTest", sourceFolder, destinationFolder); + } finally { + CssDeclarationValidationMaster.setValidator(new CssDefaultValidator()); + } + } + @Test public void borderTransparencyTest01() throws IOException, InterruptedException { convertToPdfAndCompare("borderTransparencyTest01", sourceFolder, destinationFolder); diff --git a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java new file mode 100644 index 000000000..bf1c7e106 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java @@ -0,0 +1,93 @@ +package com.itextpdf.html2pdf.css; + +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.styledxmlparser.css.validate.CssDeclarationValidationMaster; +import com.itextpdf.styledxmlparser.css.validate.impl.CssDefaultValidator; +import com.itextpdf.styledxmlparser.css.validate.impl.CssDeviceCmykAwareValidator; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; +import com.itextpdf.test.annotations.type.IntegrationTest; + +import java.io.IOException; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +@Category(IntegrationTest.class) +public class DeviceCmykTest extends ExtendedHtmlConversionITextTest { + + private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css" + + "/DeviceCmykTest/"; + private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css" + + "/DeviceCmykTest/"; + + @BeforeClass + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + CssDeclarationValidationMaster.setValidator(new CssDeviceCmykAwareValidator()); + } + + @AfterClass + public static void after() { + CssDeclarationValidationMaster.setValidator(new CssDefaultValidator()); + } + + @Test + public void bodyBgColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("bodyBgColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void spanColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("spanColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void spanBgColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("spanBgColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void divColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("divColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void divBgColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("divBgColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void headerColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("headerColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void headerBgColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("headerBgColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void paragraphColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("paragraphColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void paragraphBgColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("paragraphBgColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + public void borderColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("borderColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA)}) + public void simpleSvgColorTest() throws IOException, InterruptedException { + convertToPdfAndCompare("simpleSvgColor", SOURCE_FOLDER, DESTINATION_FOLDER); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java new file mode 100644 index 000000000..bde16bc9f --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java @@ -0,0 +1,48 @@ +package com.itextpdf.html2pdf.css.apply.util; + +import com.itextpdf.kernel.colors.Color; +import com.itextpdf.kernel.colors.DeviceCmyk; +import com.itextpdf.layout.borders.Border; +import com.itextpdf.test.ExtendedITextTest; +import com.itextpdf.test.annotations.type.UnitTest; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +@Category(UnitTest.class) +public class OutlineApplierUtilTest extends ExtendedITextTest { + + @Test + public void grooveBorderColorTest() { + Border border = OutlineApplierUtil.getCertainBorder("10px", "groove", "device-cmyk(0, 81%, 81%, 30%", 12.0f, + 12.0f); + Color expected = new DeviceCmyk(0, 81, 81, 30); + Assert.assertEquals(expected, border.getColor()); + } + + @Test + public void ridgeBorderColorTest() { + Border border = OutlineApplierUtil.getCertainBorder("10px", "ridge", "device-cmyk(0, 81%, 81%, 30%", 12.0f, + 12.0f); + Color expected = new DeviceCmyk(0, 81, 81, 30); + Assert.assertEquals(expected, border.getColor()); + } + + @Test + public void insetBorderColorTest() { + Border border = OutlineApplierUtil.getCertainBorder("10px", "inset", "device-cmyk(0, 81%, 81%, 30%", 12.0f, + 12.0f); + Color expected = new DeviceCmyk(0, 81, 81, 30); + Assert.assertEquals(expected, border.getColor()); + } + + @Test + public void outsetBorderColorTest() { + Border border = OutlineApplierUtil.getCertainBorder("10px", "outset", "device-cmyk(0, 81%, 81%, 30%", 12.0f, + 12.0f); + Color expected = new DeviceCmyk(0, 81, 81, 30); + Assert.assertEquals(expected, border.getColor()); + } + +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/backgrounds/BackgroundPosition203Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/backgrounds/BackgroundPosition203Test.java index 3eac8409f..00c6c65e3 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/backgrounds/BackgroundPosition203Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/backgrounds/BackgroundPosition203Test.java @@ -29,8 +29,8 @@ This file is part of the iText (R) project. // TODO DEVSIX-2431 Positioned elements are lost when block is split across pages. @LogMessages(messages = { - @LogMessage(messageTemplate = StyledXmlParserLogMessageConstant.WAS_NOT_ABLE_TO_DEFINE_BACKGROUND_CSS_SHORTHAND_PROPERTIES, count = 3), - @LogMessage(messageTemplate = StyledXmlParserLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, count = 18), + @LogMessage(messageTemplate = StyledXmlParserLogMessageConstant.WAS_NOT_ABLE_TO_DEFINE_BACKGROUND_CSS_SHORTHAND_PROPERTIES, count = 2), + @LogMessage(messageTemplate = StyledXmlParserLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, count = 19), @LogMessage(messageTemplate = StyledXmlParserLogMessageConstant.ONLY_THE_LAST_BACKGROUND_CAN_INCLUDE_BACKGROUND_COLOR) }) public class BackgroundPosition203Test extends W3CCssTest { diff --git a/src/test/resources/com/itextpdf/html2pdf/css/BorderTest/border3DCmykTest.html b/src/test/resources/com/itextpdf/html2pdf/css/BorderTest/border3DCmykTest.html new file mode 100644 index 000000000..b32169924 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/BorderTest/border3DCmykTest.html @@ -0,0 +1,25 @@ + + + + + + +
+ Inset border. +
+
+ Outset border. +
+
+ Groove border. +
+
+ Ridge border. +
+ + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/BorderTest/cmp_border3DCmykTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/BorderTest/cmp_border3DCmykTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e0685c4c7820a058a3e249821755983c42727fce GIT binary patch literal 1542 zcmY!laBr;*z4 Xe5Ia8;dU3bNRr}cYnmtJD>tY^zlig5~Pv%C^sFjMKlw2QKO zHuk>4>SfDvPo;&N@9E#4Y@IuQ_PVzRxc(Sy`g>D@bC>L#Cdci?i?^P5cv&dxMQzT( z_Det48!npZfA)&U}>VLu6?rVItv|kmhCZFZ};z4ZEfcMd+(;dmW}JTpH=?Y@4fS~NP$m% zYXb8oUCa@ZnB-HEI<5Xe-J0v66Q`73DEFEwF_qQz$yBDr=BEnXg&n(RWJ#XZlr5Jk zaXrl1Ip<=T=KSQWETxRZZspWaRq0#S*)3Vmly%e(XB(Oax6OLV(XZMu@vdmxuLoCl z9h(1d&!78z-_K3=KcaKauX9~(J&hQ8idowO5K zh0VKHJ1yMU?!M{Dop&n*_)>Oktlx1zuYUd2;ED6YkLe0z?sS?WeZ4d%PGZuTw?Efh zIla-Z`|0}Cn>1H{(+Y5i-uY+Rm9q~VUiW6*dGxHsD2KuPu+jP8OYd}kaY>7FpLCY@ zDisQzz54-US*-4pbzJG)$Jd+6SZ~`PBd>o<=A90wVfWf#mFfKtH4?GZ({zkjjEopfTyG zc6K1=fE-~6)B(*AAcwn|Gtx8B4fb;k z2=?#~QHarSbPw=RC`&CW23i=SsiRPklI9WO>!VxXCNIp!5-!ui3a zNhP501O=5Lm;^@z!emfHK}~kfF9pV&p}u!!N^vwO-h*NxI>2F$&{9#9n#N_IV9o_} zHxwwCnVK4#Dx@jE#4HSeaRvekc`z|ULlX;hF#`(|px02<8JL-2sxvSICOTAgh6bic z>Pm_dGjmdlK!v8Ki$b(blBtDJQmUbarIE3viE*O2fuV_+iLr%cVv=!cvVp0w9bpx* z`kr}d`3j))6r>-NpAQThFf%x_3K;#s@K6QEmo6wd=%OYEm=rV(=%S_puHur!q7ra0 Q8X8(!a;d7i`nz!f0PP4Q`~Uy| literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html new file mode 100644 index 000000000..f5d1c93b3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html @@ -0,0 +1,6 @@ + + + +bgcolor device-cmyk test + + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderColor.html new file mode 100644 index 000000000..61eee567b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderColor.html @@ -0,0 +1,10 @@ + + + +
Css device-cmyk property defines border color as well
+
Css device-cmyk property defines border color as well
+
Css device-cmyk property defines border color as well
+
Css device-cmyk property defines border color as well
+ Css device-cmyk property defines border color as well + + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_bodyBgColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_bodyBgColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5df6740a25bf5990fd1687afa75123a12281fe3e GIT binary patch literal 1169 zcma)6O-~a+7$zDc+33N4Fu^pm!R^e>ezk@)LQ842h0<=|P&h2zX_j%uWo@Y1JD3x_1>uRa9^TS`73lL!2 zueAAjSPuIU;jrBIBT^zA77$n?v=_YumRTr>h!cOHjXum>;3IPbHIRpn%(ZX7vD2EG zX+7@T6XNdfM{m#CdzPKr{c;~_ga%2LoT(!A{}gl4wPIX5J$_?)$ZAek&t)z2)jBcV zwdv~Vapn2y!Qnn^R;v2<+R91&;Pa35bXCv(e6WAUAD(I#cc%Wle>5}Mhc)h_$Y?}p zB-)CICQuzVw_u$Fp})vRZ6w!r-Uc}fZ^4GoWhlTZ1~!RcL*5}mF(*OP%K(l#E64#o z9u6iDytg|Jo*FmZWUy z(o>8uMlN;@j16qfA#)a?*$k|+;P!w9XTh*TcslgRDB1%>#tCqD_*?@tSq`M5PZT2Azk$bVtla7*>DG}tY^k|Qrsm>Ec${d zQlS?Ph|rsC;8VCnr6)t$gBu}Tpd!3lw}#u1B34ml#LrlfF|txDK`yePl+b`L!a%f@ z52V^xs)%vQh?A~{Ku(i=Cj&UPZQ7s=GNer}@gnYreZtiTTrGk2yyLnKG6Q7fJH!a=E+IZ~d?TOVHUgaQ8ijvHY{4q+ zGN3#rea@KVE1tH(cLd}lN2yptU0FoGZjsBQ#25N?UuYuoc@$HdL-G%lT3Rh@e*s4p BRviEU literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_borderColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_borderColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d50866b185013850b94e676c35fb19a5907ddf83 GIT binary patch literal 2097 zcmah~du&rx7!Q9iNO2K62(JhSWzq@lef9RCrEF`rZecIG0vX$oyY{qP*zR5Ky~R2M z1f3|zcqjFfPht^PH}8TkG)tar52Z_kHJk z{l0S(^X%zbN@r9h-nrX&O~nEdh$Tx@77LNimnu*q(n~o7+M!$YKq3nYK4mdr8Omyv z6$x@>s=&^pTYeC3lA|kst58keVKd&D?Jv91Rg_FzX_hwGYZ9s#Z~B@TyFD0M;Cwbk zx9U83Z^y1;&^R}KVK8;=#C3s#>xRL1MN44D>PyWP-Q`WogKF=DMf1|#t6uNAUj1<1 zEJnWn)v*!r@zMro@sYrXvwGT$Z5cmV&mIV+HBDO@I#bs2$5kD<=0L`c-OcyAJ{aR% z)8$&x`kj97EIRaFEw4TwYJ9TiQDFSS$!D(xR@^^#o9Jw~_T;djo_+c5kx6G;Z|!z; zE?2LtJz39BscG!!8vpZt>OouP)`cgkHaq|YEn6Q=Y6<1MZ4U|Etgmz0Tiq8A&zySm z(__Ip&32FP^!Ju~dx{sS=NzfyeBajftQPBYoR4?X!5V#z0NStSZqA;d8TDAI`+VeU zOyxJaG0!KzxVEe1&^Aj`oWq^-K-+L}+nC+XwR_hXG;wp!0rQlOkqHIcJ4TV}Q>i)Rv=abFTJ4WRf?CogS7$0n>Z_pPW?z(KN{c+-w5mV0` zcO|$#JNRgR$MRt3Wq+`_wei>XW$y&P1VsrwQ)`A(OWWsfv|L?j8h5)@eRxrcv>r@! zG^dVkST!!Ww%}I5#w`gK>VMDM@n=Hd?k_#VwvK&avkD5H2s@C3*`)7hl}!{BC@3<( zOmh<1(8F`7VxW*jpRAb$COutD3_vgr;*j-#q9P&-sNQoOvH?&`1T_K*Cy8xMfa=Z7A)5hZz^K(qq@%p? zQcxg*Aj~E4Wih$C-Ykcx03WnkaU*c~ICNyGvN*w~fkIN)LXK1zcCm2^S1S7Yy>My~ zFB@7lg%<@os$64#g(hj5G}1AzZ*&#-US27Az%|F z2#h*fr`P7^q~zsiIT_-n5-z?B%37yb#tB54fbJPy@DcNQAw`h+f4}qnB?@jV zZWR@NhbPj1GM;H)w?sc84@J!3J#t}qs>Qt?cq($g3nov*#mxay$M&l*nTAkdb`7Bl z(`_i-01`w;3lnlEzX3Fe@f)yLF}eXad5mtr7@~Cn33^o|po}Us&By}`EX%OK3;HmV z0W}CeKi*s zOtCTacp6c5dOf;GqOt$zf!-V&gB{oxMdJ8UDB<60rX3VoU*agMqaEzeO>TDR@QDdyzRs5iuVz)Jf#?6%dUPaXK-)j#|9!+QHl2r;4n& ZcJPX;WQCKIFd-@~ literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_divBgColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_divBgColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6232b996d7329de9c975a946132703bc7844388b GIT binary patch literal 1238 zcmah}O=uHA6c)jQi_i+5YPF*!G{Gi2JK4=9Qi5szTAH?D6BL>j*=8qkYr0!^HyRah zDy7hag7%=Ipa;btJX)*>dJqKZ!BZ8iv4`rh;14Q-Guv&`HdyDd%)Ix$_w&7vb){no zFXs~(*QbTqw~PQF(1%Bujt(}VmMmZ)zTE_s#2f|^~GO#?#RIX1> zK4o4UYK;H>IguOj&&{10h&;UT=X_}^)44Yuo_FoL;(otls`|l9NX@rEy0o-^Vdub` zroP?d)p1XzzoF^N<-60{W3AuL&YpPOwdck~&!TvB#<%$O&hdA@=07&}JlK+~es6gK zZa2T$RWWaFdpR@t3?FS>x`d}v)Ayy%(dz5xiE8_`mWhUQKQcK6Yl_nxxzSk)|R1_q)J`FL-pFOtr5^=HALJCaPNz)5VFq~M^Z9gHc3u551#@IJU%Ah?Gh zgkIVku=9hYp_j)%-(gQ}Cd!?|M5kTP;=3(|HD-= zaDjm!#E@y70|J8J7eE25*!)Crwhw5lHc=olpl6MZ=R-JhnHPq6SipP$1%>ecBZk;+t)K&{ zR*98#oiJ}-GwK-(LWEM6tp+a@n|Hm~R$Pw4yz3Rln3il!Nj literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_divColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_divColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8bc432bc38409b130d9a40d6eb644ea175d1ac40 GIT binary patch literal 1210 zcmah|J#W)M7-p>8!pwLKp$R4N-Pw*~)LKfDCJjy6G>PcYcDU4+V3eGzvjd?!5R zPS@cp{hMYkj+FNBjo<37K*ryO2;_q9u&wM%c9 zHaeAi$TscK++{MRXMb#cuU^@DH1{NKJlM3JUfp>AdKBRqQiLp28I|z6PpNQgtZB%jYBw|P%EBuKA_4yr?*CV z+-=Z)@Dk)aPJx-iDLq-A&sOWR3k|Rm&lam?aF=pl6kJJM2kTC2woxeqJq6DLg69}Q zn3TPNFh3}AueT27ZzTpZN$w&hrio7_scOURQa@Sqx`e4SOi0dUZFR|IS?0SZ_j<1x zNMa>bDEx*S8Dy3_jWXxFo>($c=Um5MmJ+G09!1El_=6C+Q1}+AuT&w7{`XON-p{0CwUtu~_JkPsc(ULq5Uc86QMK)kCBNCB%n<3d%t|^{Bg@-P^t03pvm`?-Wlv?+&B%vh{ZET03`+-Mu)4 zf_jRGD5XCSQ6l+}K|=VN6@>&sN+H-w4+TL~L{9~gHM5>xUS<2R%>3s2zWKi2@5eZz z!H|n{ON`^q+xeG_2q3`y159Hh8`82CGT2a7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ZYNGiRI!zcQEo)>ji@MD zgRL2QjCAOY9p)g%L5Y(P$01HU1o=(~JAG`%Q2*_aH4U{^#HLp(;JW<;L=6)IDZm8; zf4;9Ln@{x@z@WD$nN5Rp*tAH&L0=cBs-;vRlLkTn{>u?O=?1fHPsrR3ds$vN6@8MjS#wHH>9Wl7$ADzSQuUUU!LkFE-?^<7&5GTKu{EU z5tP6N#>=EEJwV^YBtEna6L?an$&W*%uOIltJXH2T!Hzw3XHLA#k3u|WkFy(o_K$P`3)gSY^DGJ literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_paragraphBgColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_paragraphBgColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6e9e7c63263db92b5e778250801fb9f2d493e2d9 GIT binary patch literal 1245 zcmah}O-vI(6i$c-vr%F=7|~!Rl0qxAJGF#^2jP}&u6*O& z509mbuXYFC)CULV+FR?Y7P_h?H%0eR0iqQVHdx>xmd{6raDGA|1B4|H_9b;CS5YH*ERS%Z4D$I%!=z0HBT6fX zN@~WAREHH|lsd5>e#w-wTBeM0mr;Ja7*o;I0PfHp*uz4Wg(535EX%N56LdF1*yx}; zHF^Djn6Al%6w>WV5*5vRz^~~Dh%VN}ITKxNu|%Xh33}~q;aC(5BHh3RdmYUnFQ+5P z&M4qqaJ@iqi-iz6NpHZ)55l@u$b+r}j`B=|yAl)al7R@RbW+J7!x`6dl1c|vtV%`A z&<7Q@O*NF2d!o>95@HEejP literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_paragraphColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_paragraphColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6134ac2e694414b7023e475a35302e788e61bd6f GIT binary patch literal 1216 zcmah|O=uHA6h3%cr088`goY;SW@l%2vzs5kSEB(Puc9L#QcEj$b#8L!B zym%6^UW7_f#DfJ--imk-5r06Xc<@jay$FH`7D3RN?Y6Nk);TOQZ@%~Dd*AyukV~m7 zAC{TGhmS8`GZKKnDorx67^fOF7u%d#(_EawWlP6g7MoRf0`N$T#~s(kTAgX#xc!Xp zxNu~b`u^PDx9e|r_VhgIJu|=5>FgNJyy+hf#uhstKRunD7++bu(xLv$fPGW@+1&>| z7wPWEYs2eOAqI|wLr7msr)sZUknL1Z;TVny4i zZ+WA5wt>k*RUD5~!jvXYGJKV@npq8EGvpy0pNW@})LgA*RohuYJ1a@FcMZ!-5r)B3 zH-ZR38Oc0CJdzGVp$o#U5I11y+XHg8r8mpi4jM(=au-0-vN4duC@ivt!9=dmKU4&x z!9+Tj1yk5|$b+MyL!hBo`ilcuAco;~KyVj92wBPvc=bWrwwetvcp}v9iE8I7(W^O_ zipmv@I(FE+Ro6_e&m_h(%qn-%FcYR@te*?bl1qi9Qt{r`n@GDdovB|rX*J1^dG45@ zJ0sL0`LWduIu)m#LWk_9lr;duQu~Td{U28?8&?&XhS`zD+M|9Zo9p4^HcGJ!zfkjnf41n6mT literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_simpleSvgColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_simpleSvgColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c3937e1136ff73b5bf463bdb1fafa0b229fbf586 GIT binary patch literal 1585 zcmbVM+i%-c81D;GWtGB9RUwc#d&rtF5+C2Lp$%Y6G+5lguTtqhn`e zh&=#ePY6{44S@z@2oM7ni7~W2@Ko(#(}Z?mVh5 zG?@13eH)lryZw@&L;lckZk>-8q5RDqfzyX`Yqy)<=by>va`{8Uqu$+-YxnSjYs|(I z8~jb-TPTV;9GVV4`uVLZtC<@=XZ9%LN1yMUeeHm%aYM{6V~;b)vAS-^jYcK*qf5Jv zj~w3vG~xoAN0x1*-1Z_QpOPYhgvgg!&Auba6sOa61k4;#(-V@coPxhHKeLENE#YPG`hsi8BQ&XoJfH1y50kowBZ|dx7ODZ z`dVqir*FGXhR_|(JjFwvhY2V_S>gq89~34aoQSY_*V-MRVb^L^5DwcqYWp3Kb}<5S zjE{-Y;=yUHxPM*;OX2BRZ4Mkm*dq>?B2R**Ro$=W=YSZ4y8*#D9zqzUv4Oxon8j|Z z2@aMbtZw^t6rO3A$g+?Hilx~|KTpbXmz|X1Axb|{Xdo||a_bg5xmbXYdrBL3~poQ}KDzvt}SbCLJAOxZW z%eyqa#IsvFXnVgTs5_M$wij{M#f?q(UF4RLA+s`+DyM;AE`PLg`ue9|XiKL$+B;`n zSUr3d4WBx>GNqijw3L3}-B&tOv7v?YBMXD0Kt2ACEI3};n#O+&cqTtNn&L)&I>E4C z9sc+;tyJ2(cT{UlB_BTX>K|`kOn!akt*0+&m&ebJt$n%v=H!Pf7ro~q*V=C+O6B=q zxxZE)ivM{XAOCJr9IxJWUVrb-C)p2^j19zvePvF=+|NP|S*CnTlZu97@Q%VscOx z%tTx<1zG)fM48PwRTt1zQeX?NOJ*Rr7VVc2P)Og0f>DjqO%UC_33|V};~(8V{*31v R*bnID$jCFH(9C?6`3GpM>+t{p literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_spanBgColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_spanBgColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ee3fc9b48aa30fb3ee7c12cbcafa82040dd7db03 GIT binary patch literal 1235 zcmah}O=uHA6h@(77wM@8BElRDP0(a#|GK+USK6dWt7#gN&?0G(O?DDjlHIzysj-JD zf_P|)A|eU~JXl+M=%HSPS}W2^vEZc_K~(&~g5JcNGuv%r8?19!-n@C=`}y9-`jU}o zkO_&D@59G8Zz%ylVCF7T9UXL3FFDAfqb1cr5tKJIM8}a)bS?mf=M=?uETopH>ciUV zsg{@UVAK0|Gd~YZd|xk*4;=eCdH2X#YxC{7Cr2e^b~bxs|HRF<#a~k|Rz9tcwf=Z? zs8(FKJ`kw#T}!#d+VbJ36q!wYuH`mPFP@oyy}lHhX`z?%E7HuD=eI=Z_4KnTUih7Q ze5rLjIycHzYxnjwznZ>JJ-7&R?dGp?RHQi%i1TCkmT}gAB(8 zWXcrXhcsR7GOJmLuYxQ9iD!rDq-x<9z`7wRWSbQ$k8I3Gch!ld9ZUwcV>SasHzH=U zKq8i+&{3S95XXS_O%L{EEWO-NBXea0;X*~ED5PQ1CW8?k@p08C`jHWEBW$k|7ZO$- zwPY6SD6WnQ<8?T?X+&^`{>VudvMdx?kzrYe6^=u$4Z^kn-Dhfh2P7?1tK^a8*E6W< z%!9CLAs~j>5Fbn@I+N+1{tOuMcgB)&Fp4Z27aR(l03%wVC({=PdF%YQFM7Z;q=u&M&NToA+8QH;sclmf86SB+4vRJ{pe2{7MwF`~;L|JaYO6*@X z981+p$RfXh-U!HcAjEM6hL?C*lVw##5-ji>-XkM2S^@Hc^8bioy4NU}fT%S^r%V$w t@0w|S3;`Ka>T}f)Bw`Eh6x-I5r?B8og;BPnT8>M%Byg0^*WDkb{s0Kna5w+} literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_spanColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_spanColor.pdf new file mode 100644 index 0000000000000000000000000000000000000000..624f645dc4032667717c30c35d3c0b6d5ab27d48 GIT binary patch literal 1199 zcmah}O=uHA6c)Uc1qBZU@iaYzCe&nSW_Pn$DSdiA{tt!uk}{CLx?msPoLd7*O?@+iwv+?$ybF zZ-E^12{2PQr6+3(Gu7JMVjVQ%Go@+;JS2V~3N{iq!K&MytIt<}o`M$v!6t?fCS`9R z%nwRF>#u@^yNTgUlDmkBStlTpRJHE)NRYHy&!K983Y~ehqu%rA3=O=KbFJUxl2}O< z3g6*IhMDC~qs%$h7fVL!ZO;vsr9|wNqX@Z`U>G8o9EG$T08_^BN^bohR|B846$mUv zOdCBQZ5WyX+Thry8DdcR0D9sR+dAjdk&x#I4rQ!!K8S>>M{sGu^Qg~E3(<_=OzTt) z?mJ$W`112E=fU!{mUfyZv^2NbBvwY#A#7{9>9!q=T$C}i?EeufYMHhfkZQG6n=!$B sXx6+Z1XzO7Sg3}i6kGDF*p9Cvg(c4_ObNK-^N{Wg691=IVX>(E1t;WLZU6uP literal 0 HcmV?d00001 diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divBgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divBgColor.html new file mode 100644 index 000000000..186dcde18 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divBgColor.html @@ -0,0 +1,9 @@ + + + +
green text
+
green text
+
red text
+
red text
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divColor.html new file mode 100644 index 000000000..e2111bf53 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/divColor.html @@ -0,0 +1,9 @@ + + + +
green text
+
green text
+
red text
+
red text
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerBgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerBgColor.html new file mode 100644 index 000000000..6cb41b9fc --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerBgColor.html @@ -0,0 +1,9 @@ + + + +

green color text

+

green color text

+

red color text

+

red color text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerColor.html new file mode 100644 index 000000000..b3076df43 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/headerColor.html @@ -0,0 +1,9 @@ + + + +

green color text

+

green color text

+

red color text

+

red color text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphBgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphBgColor.html new file mode 100644 index 000000000..17d2ad66a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphBgColor.html @@ -0,0 +1,9 @@ + + + +

green color text

+

green color text

+

red color text

+

red color text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphColor.html new file mode 100644 index 000000000..294b51a93 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/paragraphColor.html @@ -0,0 +1,9 @@ + + + +

green color text

+

green color text

+

red color text

+

red color text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/simpleSvgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/simpleSvgColor.html new file mode 100644 index 000000000..b198eb4c4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/simpleSvgColor.html @@ -0,0 +1,13 @@ + + + + + Embedded SVG + + +

Embedded SVG

+ + + + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanBgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanBgColor.html new file mode 100644 index 000000000..563f3c149 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanBgColor.html @@ -0,0 +1,9 @@ + + + +

red color text

+

red color text

+

red color text

+

red color text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanColor.html new file mode 100644 index 000000000..c5cf0c824 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/spanColor.html @@ -0,0 +1,9 @@ + + + +

red color text

+

red color text

+

red color text

+

red color text

+ + \ No newline at end of file From 6a7008380a1b482569f05eafd0c219515f3e5ee4 Mon Sep 17 00:00:00 2001 From: iText Software Date: Fri, 5 Aug 2022 05:05:36 +0000 Subject: [PATCH 03/11] Add missing copyright headers --- .../itextpdf/html2pdf/css/DeviceCmykTest.java | 22 +++++++++++++++++++ .../apply/util/OutlineApplierUtilTest.java | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java index bf1c7e106..a088ab2bb 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java @@ -1,3 +1,25 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2022 iText Group NV + Authors: iText Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java index bde16bc9f..72596917e 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java @@ -1,3 +1,25 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2022 iText Group NV + Authors: iText Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ package com.itextpdf.html2pdf.css.apply.util; import com.itextpdf.kernel.colors.Color; From 593e2337335e8050198e47c39255a6b1537b7fef Mon Sep 17 00:00:00 2001 From: Andrei Stryhelski Date: Tue, 2 Aug 2022 13:23:05 +0300 Subject: [PATCH 04/11] Add a test when the image is in the figure tag DEVSIX-6986 --- .../itextpdf/html2pdf/element/FigureTest.java | 25 +++++ .../utils/ImageSizeMeasuringListener.java | 98 ++++++++++++++++++ .../element/FigureTest/imageInFigure.html | 13 +++ .../element/FigureTest/imageInFigure.jpg | Bin 0 -> 8008 bytes 4 files changed, 136 insertions(+) create mode 100644 src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java create mode 100644 src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.jpg diff --git a/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java b/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java index a6f480206..1718d3968 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java @@ -23,6 +23,12 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.HtmlConverter; +import com.itextpdf.html2pdf.utils.ImageSizeMeasuringListener; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfName; +import com.itextpdf.kernel.pdf.PdfReader; +import com.itextpdf.kernel.pdf.canvas.parser.PdfCanvasProcessor; +import com.itextpdf.kernel.pdf.xobject.PdfImageXObject; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.type.IntegrationTest; @@ -61,4 +67,23 @@ public void figureInSpanTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "figureInSpan.html"), new File(destinationFolder + "figureInSpan.pdf")); Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "figureInSpan.pdf", sourceFolder + "cmp_figureInSpan.pdf", destinationFolder, "diff04_")); } + + @Test + //TODO DEVSIX-6985: change 1 to 2 in "PdfImageXObject image = doc.getPage(1).getResources()", change the assert + // from "Assert.assertTrue(isImageCropped)" to assertFalse + public void checkImageRemainsUncutWithFigureTagTest() throws IOException { + File pdfFile = new File(destinationFolder + "imageInFigure.pdf"); + HtmlConverter.convertToPdf(new File(sourceFolder + "imageInFigure.html"), + pdfFile); + try (PdfDocument doc = new PdfDocument(new PdfReader(pdfFile))) { + PdfImageXObject image = doc.getPage(1).getResources() + .getImage(new PdfName("Im1")); + Assert.assertNotNull(image); + ImageSizeMeasuringListener listener = new ImageSizeMeasuringListener(1); + PdfCanvasProcessor processor = new PdfCanvasProcessor(listener); + processor.processPageContent(doc.getPage(1)); + boolean isImageCropped = listener.bbox.getY() < 0; + Assert.assertTrue(isImageCropped); + } + } } diff --git a/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java b/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java new file mode 100644 index 000000000..2373f5377 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java @@ -0,0 +1,98 @@ +package com.itextpdf.html2pdf.utils; + +import com.itextpdf.kernel.geom.AffineTransform; +import com.itextpdf.kernel.geom.Matrix; +import com.itextpdf.kernel.geom.NoninvertibleTransformException; +import com.itextpdf.kernel.geom.Point; +import com.itextpdf.kernel.geom.Rectangle; +import com.itextpdf.kernel.pdf.canvas.parser.EventType; +import com.itextpdf.kernel.pdf.canvas.parser.data.IEventData; +import com.itextpdf.kernel.pdf.canvas.parser.data.ImageRenderInfo; +import com.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +public class ImageSizeMeasuringListener implements IEventListener { + + Rectangle cropbox; + public Rectangle bbox; + int page; + + public ImageSizeMeasuringListener(int page) { + + if (cropbox == null) { + cropbox = new Rectangle(Float.MIN_VALUE, Float.MIN_VALUE, Float.MAX_VALUE, Float.MAX_VALUE); + } + this.page = page; + } + + public void eventOccurred(IEventData data, EventType type) { + switch (type) { + case RENDER_IMAGE: + ImageRenderInfo renderInfo = (ImageRenderInfo) data; + final Matrix imageCtm = renderInfo.getImageCtm(); + bbox = calcImageRect(imageCtm); + default: + break; + } + } + + public Set getSupportedEvents() { + return null; + } + + private double getWidth(Matrix m) { + return Math.sqrt(Math.pow(m.get(Matrix.I11), 2) + Math.pow(m.get(Matrix.I21), 2)); + } + + private double getHeight(Matrix m) { + return Math.sqrt(Math.pow(m.get(Matrix.I12), 2) + Math.pow(m.get(Matrix.I22), 2)); + } + + private Rectangle calcImageRect(Matrix ctm) { + if (ctm == null) { + return null; + } + + Point[] points = transformPoints(ctm, false, + new Point(0, 0), new Point(0, 1), + new Point(1, 0), new Point(1, 1)); + + return getAsRectangle(points[0], points[1], points[2], points[3]); + } + + private Rectangle getAsRectangle(Point p1, Point p2, Point p3, Point p4) { + List xs = Arrays.asList(p1.getX(), p2.getX(), p3.getX(), p4.getX()); + List ys = Arrays.asList(p1.getY(), p2.getY(), p3.getY(), p4.getY()); + + double left = Collections.min(xs); + double bottom = Collections.min(ys); + double right = Collections.max(xs); + double top = Collections.max(ys); + + return new Rectangle((float) left, (float) bottom, (float) right, (float) top); + } + + private Point[] transformPoints(Matrix transformationMatrix, boolean inverse, Point... points) { + AffineTransform t = new AffineTransform(transformationMatrix.get(Matrix.I11), + transformationMatrix.get(Matrix.I12), + transformationMatrix.get(Matrix.I21), transformationMatrix.get(Matrix.I22), + transformationMatrix.get(Matrix.I31), transformationMatrix.get(Matrix.I32)); + Point[] transformed = new Point[points.length]; + + if (inverse) { + try { + t = t.createInverse(); + } catch (NoninvertibleTransformException e) { + throw new RuntimeException("Exception during effective image rectangle calculation", e); + } + } + + t.transform(points, 0, transformed, 0, points.length); + + return transformed; + } +} diff --git a/src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.html b/src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.html new file mode 100644 index 000000000..db08a0caf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.html @@ -0,0 +1,13 @@ + + + + +

In this test, the picture in figure is checked. The picture should not be cropped

+
+
+ +
+ + + + diff --git a/src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.jpg b/src/test/resources/com/itextpdf/html2pdf/element/FigureTest/imageInFigure.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ee1a720413778acece0264136297db05da0fd419 GIT binary patch literal 8008 zcmeHLXHZjJw?3hTrhs%of&zk6>7YnNUO+?yM5$sFqzect-9%8T6afJ#l2?i-0+AAs z8WE&QFQK@{=doVE8n&)&~oYo9|Or_TetSBy=K z0T2iT1T!vxJ_Q&8Od!zj_MgVg%KY2dSXh`@!E9jgZ)fM=;$UazWCw#ek8pBwaWf3e zag^r>_tD??zX$o<{dX@$<7Nl5|Bm>-8T|{u#|~0t;%5e(0+{$f%zPkv8vp?S5Gw=i zZ@~X)ASPxORyGDCPA*0OnwJ5enVE?JmX(Et5&eYm9$?{PJ$6#nfQ{ekF8GwcfLcV# zTXv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fjF;s{4l}|@*-5LfOV$0 zwLf;OHn380p!evr(9}!o0i~tm09E?|>a5fhRHdc%Ak%iPV3UdvNS^Xqg6oC5 z48uX;(qk0+lH4gzp%tT8am}{kGML0jG12i1M-q}L(sP7b#3%g`I^ai} zrVSi|)0g$b`_Jzoey);haJjagj1BI=_&iM`2DN9~KBH*QqeRx>B7-S@@9HXsWa}bH zYb`)bqMfsbw2S2OTvGJAN-wU=5YM$$+HKeCp1nKw)2ZQ@{!Yeu_Af$l0^&X*;b6HP z>Gjxx&nth+q5ejvrGTiYZMp7b>;-$)N61gbcomgRG?CVEqt5-fL;)Q*hIdw!kaUAI zcI*}05&Iz$gleDz^BK^}^wlps&x5j8V;}9`*Rx*CGDw|W(CT&d7CogiE^+g9M!73Cgqxzj%{YrN4nOS}7!4k+DBJ$vONB=;E5a~2X< zz8-bC{k+2*;et|e$&M76@T#b3mkvNNH<#eqGP`Q_Ti=-*kVjD4=o*FqR zp|_q2shp`5&jXz>*u04Py4<&ru&U?W^l%Y^cOfE3Z$BlsW@BPCk-RPHks2Ffa*M)> z?DEIY2V=jt-g)|E{;7%PPs}F-guoBFy+a2kUTSgqNhNE30=4YlaM5*Uy^HIzAImg@3)e2v7QMT! zAS;p>^&**~x(FdSLO9J`h?uXTV{^MtOpLTjW>MUIy$4s*@d$#kirBX@TJJ%7ToZiw z?S`7F!HAKDM|a11k0c#Sou@0wvb`vEX6kpGq>6KhOz{k;nbHp=>zkeCrK9A1xK=%vJN(!w7__S$h z$y?~kf8;il%FF6_2rEWb_-&TCAIea~V=kGd?%6h_;j__`JQ<$d5ok5_<-Y;t(Cr6Y zd=7VUoBQi#LAAY(+t`ur##j5E9mV@|H1NCPaw{W28CC(Si+}vj9Q@J19}WDgGytJb F{2N2vU`zl2 literal 0 HcmV?d00001 From ca253c6832c41da508532f03b0782f75c3bc3345 Mon Sep 17 00:00:00 2001 From: iText Software Date: Tue, 16 Aug 2022 13:10:24 +0000 Subject: [PATCH 05/11] Add missing copyright headers --- .../utils/ImageSizeMeasuringListener.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java b/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java index 2373f5377..5d388325b 100644 --- a/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java +++ b/src/test/java/com/itextpdf/html2pdf/utils/ImageSizeMeasuringListener.java @@ -1,3 +1,25 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2022 iText Group NV + Authors: iText Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ package com.itextpdf.html2pdf.utils; import com.itextpdf.kernel.geom.AffineTransform; From 48f4b4bf058c49329b077b5b561ea7c45bf3b851 Mon Sep 17 00:00:00 2001 From: Evgeniy Prudnikov Date: Thu, 18 Aug 2022 11:45:25 +0300 Subject: [PATCH 06/11] Review orphaned TODOs in pdfHTML (5) DEVSIX-6981 --- .../attach/impl/DefaultHtmlProcessor.java | 15 --------------- .../attach/util/WaitingInlineElementsHelper.java | 4 +--- .../css/apply/impl/PageMarginBoxCssApplier.java | 2 +- .../css/apply/impl/SpanTagCssApplier.java | 2 +- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultHtmlProcessor.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultHtmlProcessor.java index 10107c392..4ba2628cd 100644 --- a/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultHtmlProcessor.java +++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultHtmlProcessor.java @@ -431,20 +431,6 @@ private ITagWorker processRunningElement(ITagWorker tagWorker, IElementNode elem return tagWorker; } - // TODO For now the whole ITagWorker of the running element is preserved inside RunningElementContainer - // for the sake of future processing in page margin box. This is somewhat a workaround and storing - // tag workers might be easily seen as something undesirable, however at least for now it seems to be - // most suitable solution because: - // - in any case, processing of the whole running element with it's children should be done in - // "normal flow", i.e. in DefaultHtmlProcessor, based on the spec that says that element should be - // processed as it was still in the same position in DOM, but visually as if "display: none" was set. - // - the whole process would need to be repeated in PageContextProcessor again, so it's a double work; - // also currently there is still no convenient way for unifying the processing here and in - // PageContextProcessor, currently only running elements require processing of the whole hierarchy of - // children outside of the default DOM processing and also it's unclear whether this code would be suitable - // for the simplified approach of processing all other children of page margin boxes. - // - ITagWorker is only publicly passed to the constructor, but there is no exposed way to get it out of - // RunningElementContainer, so it would be fairly easy to change this approach in future if needed. RunningElementContainer runningElementContainer = new RunningElementContainer(element, tagWorker); context.getCssContext().getRunningManager().addRunningElement(runningElemName, runningElementContainer); @@ -455,7 +441,6 @@ private ITagWorker processRunningElement(ITagWorker tagWorker, IElementNode elem * Adds @font-face fonts to the FontProvider. */ private void addFontFaceFonts() { - //TODO Shall we add getFonts() to ICssResolver? if (cssResolver instanceof DefaultCssResolver) { for (CssFontFaceRule fontFace : ((DefaultCssResolver) cssResolver).getFonts()) { boolean findSupportedSrc = false; diff --git a/src/main/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelper.java b/src/main/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelper.java index d867acfab..c488f5044 100644 --- a/src/main/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelper.java +++ b/src/main/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelper.java @@ -237,9 +237,7 @@ private Paragraph createLeavesContainer() { } } if (runningElementsOnly) { - // TODO this might be avoided in future if we will come up with removing of completely empty - // (both in terms of content and possible properties like background and borders) tags from - // logical structure of resultant PDF documents + // TODO DEVSIX-7008 Remove completely empty tags from logical structure of resultant PDF documents p.getAccessibilityProperties().setRole(StandardRoles.ARTIFACT); } return p; diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/PageMarginBoxCssApplier.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/PageMarginBoxCssApplier.java index dfc927633..24ee21efc 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/PageMarginBoxCssApplier.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/PageMarginBoxCssApplier.java @@ -131,7 +131,7 @@ public void apply(ProcessorContext context, IStylesContainer stylesContainer, IT marginBox.setProperty(Property.OVERFLOW_Y, OverflowPropertyValue.VISIBLE); } - // TODO outlines are currently not supported for page margin boxes, because of the outlines handling specificity (they are handled on renderer's parent level) + //TODO DEVSIX-7024 Support outlines for page margin boxes OutlineApplierUtil.applyOutlines(boxStyles, context, marginBox); marginBox.setProperty(Property.FONT_PROVIDER, context.getFontProvider()); diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/SpanTagCssApplier.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/SpanTagCssApplier.java index 3afb9cab3..f38e94a0a 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/SpanTagCssApplier.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/SpanTagCssApplier.java @@ -81,7 +81,7 @@ public void apply(ProcessorContext context, IStylesContainer stylesContainer, IT Map cssStyles = stylesContainer.getStyles(); for (IPropertyContainer child : spanTagWorker.getOwnLeafElements()) { // Workaround for form fields so that SpanTagCssApplier does not apply its font-size to the child. - // Form fields have their own CSS applier // TODO remove when form fields are not leaf elements anymore + // Form fields have their own CSS applier if (!(child instanceof IFormField)) { applyChildElementStyles(child, cssStyles, context, stylesContainer); } From 1cc41674ed2a869bccb7c1de44071f34de81bb34 Mon Sep 17 00:00:00 2001 From: "dmitry.radchuk" Date: Mon, 29 Aug 2022 04:47:40 +0300 Subject: [PATCH 07/11] Add border and background shorthand color test DEVSIX-7028 --- .../itextpdf/html2pdf/css/DeviceCmykTest.java | 7 + .../css/DeviceCmykTest/bodyBgColor.html | 16 ++- .../css/DeviceCmykTest/borderShorthand.html | 120 ++++++++++++++++++ .../css/DeviceCmykTest/cmp_bodyBgColor.pdf | Bin 1169 -> 1555 bytes .../DeviceCmykTest/cmp_borderShorthand.pdf | Bin 0 -> 7642 bytes 5 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderShorthand.html create mode 100644 src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_borderShorthand.pdf diff --git a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java index a088ab2bb..db1548c4a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java @@ -24,6 +24,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.styledxmlparser.css.validate.CssDeclarationValidationMaster; import com.itextpdf.styledxmlparser.css.validate.impl.CssDefaultValidator; import com.itextpdf.styledxmlparser.css.validate.impl.CssDeviceCmykAwareValidator; @@ -106,6 +107,12 @@ public void borderColorTest() throws IOException, InterruptedException { convertToPdfAndCompare("borderColor", SOURCE_FOLDER, DESTINATION_FOLDER); } + @Test + @LogMessages(messages = @LogMessage(messageTemplate = IoLogMessageConstant.LAST_ROW_IS_NOT_COMPLETE, count = 3)) + public void borderShorthandTest() throws IOException, InterruptedException { + convertToPdfAndCompare("borderShorthand", SOURCE_FOLDER, DESTINATION_FOLDER); + } + @Test @LogMessages(messages = { @LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA)}) diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html index f5d1c93b3..bd10ce53e 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/bodyBgColor.html @@ -1,6 +1,20 @@ -bgcolor device-cmyk test +
+ background-color device-cmyk test +
+
+ half visible background-color with commas device-cmyk test (should be previous mixed with green) +
+
+ background shorthand test +
+
+ half visible background with commas shorthand test +
+
+ background padding box test +
\ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderShorthand.html b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderShorthand.html new file mode 100644 index 000000000..ff3be32c7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/borderShorthand.html @@ -0,0 +1,120 @@ + + + +

BorderColorShorthandResolver tests:

+
+ border should be half visible and green +
+
+ border should be green +
+
+ border should be green +
+
+ +

BorderShorthandResolver tests:

+
+ border should be half visible and green +
+
+ border should be half visible and green +
+
+ border should be green +
+
+ +

BorderBottomShorthandResolver tests:

+
+ bottom border should be green and dashed +
+
+ bottom border should be green +
+
+ +

BorderLeftShorthandResolver tests:

+
+ left border should be green +
+
+ left border should be green and dashed +
+
+ +

BorderRightShorthandResolver tests:

+
+ right border should be green and dashed +
+
+ right border should be green +
+
+ +

BorderTopShorthandResolver tests:

+
+ top border should be green and dashed +
+
+ top border should be green +
+
+ +

BorderRadiusShorthandResolver tests:

+
+ device-cmyk with border-radius (half visible) +
+
+ device-cmyk with border-bottom-left-radius (half visible) +
+
+ device-cmyk with border-bottom-right-radius (half visible) +
+
+ device-cmyk with border-top-right-radius +
+
+ device-cmyk with border-top-left-radius +
+
+ +

TableRenderer "border-collapse: separate" with CMYK colors tests:

+ + + + + + + + +
first columnsecond column + +
border collapsewith device-cmyk
+

TableRenderer "border-collapse: collapse" with CMYK colors tests:

+ + + + + + + + +
first columnsecond column + +
border collapsewith device-cmyk
+

TableRenderer "border-collapse: collapse" with RGB colors tests:

+ + + + + + + + +
first columnsecond column + +
border collapsewith rgb
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_bodyBgColor.pdf b/src/test/resources/com/itextpdf/html2pdf/css/DeviceCmykTest/cmp_bodyBgColor.pdf index 5df6740a25bf5990fd1687afa75123a12281fe3e..f5c5d90c9f087bd2f654673962cade244b83d6a0 100644 GIT binary patch delta 756 zcmbQpIhkj|!g?b!Q#-rjlA_eaT&{{aQzzKwA65`(E3Z4+ds0B?z>nm$S5nqJG3?IW z;QPmsschE2-StriY|pK7T>rB8 zZ2rpMlT`z5KEI}M?BJ{~GajUPt>3(@W%nkneANn#_gO0zUWlC@$<1cW0@B|-yZ!0$96hVo zkK)C`k9=a-Y+tJD@^^OoSsQVkC}-gvh5m<3g`K{NKKZq==PwJ>$1PS9KPBn7R+P90 zmn4>?+Sus37aJ;AC>SUN0a->0mQa?lf}sJ3X=gV%m~j%Pg^{J9iK&^P@#J@m5(wUA zekKXVXprvwq%1C=VabUK2716?=Ss~>0SSSOLzc2YNP*4AAy-k9n#N_IU}!j5pIOG< z%*0T^00b2B6u7_)0|QG-a||&vOH&Lnpra>uF{{>F8epn7FvL)AXkY^L4XRy+2IiRR z3=NDB>Pm_dGjmdlKmp+Cq7ZFknQCNgWSW+0Vw7rPkYZ|@mJ*PdoN8*2W|5edY+_)X zVuwWunu=I`&%CsJ1!Hi01m)+KC;$Ti7)imIRjHtWab$7hHZ(Lg;8Im}^>^a}07w=2 Aw*UYD delta 379 zcmbQtGm&$`!a#EaJGZF)#_@@O*4!7HqKH|Y z8<`s#85tUxOuo+~f#7XomS9Y-C`w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16 +0300 Subject: [PATCH 08/11] Fix copy constructor of ConverterProperties to copy immediateFlush DEVSIX-6984 --- .../itextpdf/html2pdf/ConverterProperties.java | 1 + .../html2pdf/ConverterPropertiesTest.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java b/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java index 30e5a1ce4..0f5d8bfb7 100644 --- a/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java +++ b/src/main/java/com/itextpdf/html2pdf/ConverterProperties.java @@ -145,6 +145,7 @@ public ConverterProperties(ConverterProperties other) { this.charset = other.charset; this.metaInfo = other.metaInfo; this.limitOfLayouts = other.limitOfLayouts; + this.immediateFlush = other.immediateFlush; } /** diff --git a/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java b/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java index ca4d6b6b9..db5d3afa0 100644 --- a/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java @@ -74,6 +74,24 @@ public void setEventMetaInfoAndGetTest() { Assert.assertSame(testMetaInfo, metaInfo); } + @Test + public void checkDefaultsTest() { + ConverterProperties properties = new ConverterProperties(); + + Assert.assertTrue(properties.isImmediateFlush()); + Assert.assertFalse(properties.isCreateAcroForm()); + Assert.assertEquals(10, properties.getLimitOfLayouts()); + + properties.setImmediateFlush(false); + properties.setCreateAcroForm(true); + properties.setLimitOfLayouts(20); + ConverterProperties propertiesCopied = new ConverterProperties(properties); + + Assert.assertFalse(propertiesCopied.isImmediateFlush()); + Assert.assertTrue(propertiesCopied.isCreateAcroForm()); + Assert.assertEquals(20, propertiesCopied.getLimitOfLayouts()); + } + private static class TestMetaInfo implements IMetaInfo { } } From 9e1e587b4faa550335196b88e042c7fcc1361f49 Mon Sep 17 00:00:00 2001 From: "vitali.prudnikovich" Date: Fri, 9 Sep 2022 12:52:32 +0300 Subject: [PATCH 09/11] Move the tests from html2pdf#DirAttributeTest to crossmodule#ListDirectionTest DEVSIX-7040 --- .../html2pdf/attribute/DirAttributeTest.java | 161 ------------------ .../cmp_differentDirsOfDls.pdf | Bin 1709 -> 0 bytes .../cmp_differentDirsOfOrderedLists.pdf | Bin 1108 -> 0 bytes .../cmp_differentDirsOfUnorderedLists.pdf | Bin 1117 -> 0 bytes .../cmp_floatedTableInRtlDocument.pdf | Bin 1392 -> 0 bytes ...cmp_paragraphsOfDifferentDirsWithImage.pdf | Bin 2369 -> 0 bytes .../DirAttributeTest/cmp_rtlDirTest01.pdf | Bin 740 -> 0 bytes .../DirAttributeTest/cmp_rtlDirTest02.pdf | Bin 765 -> 0 bytes .../cmp_rtlDirectionOfLink.pdf | Bin 1795 -> 0 bytes .../cmp_rtlDirectionOfListInsideList.pdf | Bin 1108 -> 0 bytes .../cmp_rtlDirectionOfSpan.pdf | Bin 1039 -> 0 bytes ...mp_spansOfDifferentDirsInsideParagraph.pdf | Bin 16305 -> 0 bytes ...ignedToWrongSideInCaseOfNotEnoughSpace.pdf | Bin 1729 -> 0 bytes .../DirAttributeTest/differentDirsOfDls.html | 24 --- .../differentDirsOfOrderedLists.html | 28 --- .../differentDirsOfUnorderedLists.html | 28 --- .../floatedTableInRtlDocument.html | 27 --- .../attribute/DirAttributeTest/one.png | Bin 281 -> 0 bytes .../paragraphsOfDifferentDirsWithImage.html | 11 -- .../DirAttributeTest/rtlDirTest01.html | 11 -- .../DirAttributeTest/rtlDirTest02.html | 12 -- .../DirAttributeTest/rtlDirectionOfLink.html | 12 -- .../rtlDirectionOfListInsideList.html | 23 --- .../DirAttributeTest/rtlDirectionOfSpan.html | 12 -- .../spansOfDifferentDirsInsideParagraph.html | 10 -- .../attribute/DirAttributeTest/square.png | Bin 2483 -> 0 bytes ...gnedToWrongSideInCaseOfNotEnoughSpace.html | 44 ----- .../attribute/DirAttributeTest/two.png | Bin 450 -> 0 bytes 28 files changed, 403 deletions(-) delete mode 100644 src/test/java/com/itextpdf/html2pdf/attribute/DirAttributeTest.java delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfDls.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfOrderedLists.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfUnorderedLists.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_floatedTableInRtlDocument.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_paragraphsOfDifferentDirsWithImage.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirTest01.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirTest02.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfLink.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfListInsideList.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfSpan.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_spansOfDifferentDirsInsideParagraph.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_tableAlignedToWrongSideInCaseOfNotEnoughSpace.pdf delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfDls.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfOrderedLists.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfUnorderedLists.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/floatedTableInRtlDocument.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/one.png delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/paragraphsOfDifferentDirsWithImage.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest01.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest02.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfLink.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfListInsideList.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfSpan.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/spansOfDifferentDirsInsideParagraph.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/square.png delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/tableAlignedToWrongSideInCaseOfNotEnoughSpace.html delete mode 100644 src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/two.png diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/DirAttributeTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/DirAttributeTest.java deleted file mode 100644 index f551f65f9..000000000 --- a/src/test/java/com/itextpdf/html2pdf/attribute/DirAttributeTest.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - This file is part of the iText (R) project. - Copyright (c) 1998-2022 iText Group NV - Authors: iText Software. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License version 3 - as published by the Free Software Foundation with the addition of the - following permission added to Section 15 as permitted in Section 7(a): - FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY - ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT - OF THIRD PARTY RIGHTS - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Affero General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program; if not, see http://www.gnu.org/licenses or write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA, 02110-1301 USA, or download the license from the following URL: - http://itextpdf.com/terms-of-use/ - - The interactive user interfaces in modified source and object code versions - of this program must display Appropriate Legal Notices, as required under - Section 5 of the GNU Affero General Public License. - - In accordance with Section 7(b) of the GNU Affero General Public License, - a covered work must retain the producer line in every PDF that is created - or manipulated using iText. - - You can be released from the requirements of the license by purchasing - a commercial license. Buying such a license is mandatory as soon as you - develop commercial activities involving the iText software without - disclosing the source code of your own applications. - These activities include: offering paid services to customers as an ASP, - serving PDFs on the fly in a web application, shipping iText with a closed - source product. - - For more information, please contact iText Software Corp. at this - address: sales@itextpdf.com - */ -package com.itextpdf.html2pdf.attribute; - -import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.io.logs.IoLogMessageConstant; -import com.itextpdf.test.annotations.LogMessage; -import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; - -import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -@Category(IntegrationTest.class) -public class DirAttributeTest extends ExtendedHtmlConversionITextTest { - - public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/"; - public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attribute/DirAttributeTest/"; - - @BeforeClass - public static void beforeClass() { - createDestinationFolder(destinationFolder); - } - - @Test - // TODO DEVSIX-5034 Direction of the contents of description list items with dir = "rtl" is wrong - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 8), - }) - public void differentDirsOfDlsTest() throws IOException, InterruptedException { - convertToPdfAndCompare("differentDirsOfDls", sourceFolder, destinationFolder, false); - } - - @Test - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 18), - }) - public void differentDirsOfOrderedListsTest() throws IOException, InterruptedException { - convertToPdfAndCompare("differentDirsOfOrderedLists", sourceFolder, destinationFolder); - } - - @Test - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 18), - }) - public void differentDirsOfUnorderedListsTest() throws IOException, InterruptedException { - convertToPdfAndCompare("differentDirsOfUnorderedLists", sourceFolder, destinationFolder); - } - - @Test - //TODO: DEVSIX-2438 html2Pdf: float + rtl works incorrectly for element placement - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 16), - }) - public void floatedTableInRtlDocumentTest() throws IOException, InterruptedException { - convertToPdfAndCompare("floatedTableInRtlDocument", sourceFolder, destinationFolder, false); - } - - @Test - //TODO: DEVSIX-2435 Process several elements which do not respect the specified direction - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 4), - }) - public void paragraphsOfDifferentDirsWithImageTest() throws IOException, InterruptedException { - convertToPdfAndCompare("paragraphsOfDifferentDirsWithImage", sourceFolder, destinationFolder, false); - } - - @Test - //TODO: DEVSIX-2435 Process several elements which do not respect the specified direction - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 4), - }) - public void rtlDirectionOfLinkTest() throws IOException, InterruptedException { - convertToPdfAndCompare("rtlDirectionOfLink", sourceFolder, destinationFolder); - } - - @Test - //TODO: DEVSIX-2435 Process several elements which do not respect the specified direction - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 26), - }) - public void rtlDirectionOfListInsideListTest() throws IOException, InterruptedException { - convertToPdfAndCompare("rtlDirectionOfListInsideList", sourceFolder, destinationFolder, false); - } - - @Test - //TODO: DEVSIX-2435 Process several elements which do not respect the specified direction - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 4), - }) - public void rtlDirectionOfSpanTest() throws IOException, InterruptedException { - convertToPdfAndCompare("rtlDirectionOfSpan", sourceFolder, destinationFolder); - } - - @Test - public void rtlDir01Test() throws IOException, InterruptedException { - convertToPdfAndCompare("rtlDirTest01", sourceFolder, destinationFolder); - } - - @Test - public void rtlDir02Test() throws IOException, InterruptedException { - convertToPdfAndCompare("rtlDirTest02", sourceFolder, destinationFolder); - } - - @Test - //TODO DEVSIX-2437 dir ltr is ignored in rtl documents - public void spansOfDifferentDirsInsideParagraphTest() throws IOException, InterruptedException { - convertToPdfAndCompare("spansOfDifferentDirsInsideParagraph", sourceFolder, destinationFolder, false); - } - - @Test - //TODO DEVSIX-3069 pdfHTML: RTL tables are not aligned correctly if there is no enough space - @LogMessages(messages = { - @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 32), - @LogMessage(messageTemplate = IoLogMessageConstant.TABLE_WIDTH_IS_MORE_THAN_EXPECTED_DUE_TO_MIN_WIDTH)}) - public void tableAlignedToWrongSideInCaseOfNotEnoughSpaceTest() throws IOException, InterruptedException { - convertToPdfAndCompare("tableAlignedToWrongSideInCaseOfNotEnoughSpace", sourceFolder, destinationFolder); - } -} diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfDls.pdf b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfDls.pdf deleted file mode 100644 index 3c77d80741cc48eb206ea5434aab72a4bee6ee66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1709 zcmah}ZA=_R7>;5IZepe458@AowB8Z{9}Ewz@^6kzI)JMZ(nZ%H^%?S!%-rEkJLe0RzWaLf zz6JAUYQCV7-E-sm3^?BR#{<2uo)67VT$$-Ont%FSLGZpae2@;0fkW}7qV~Lj3#Y!1 z92g2J!;`a*e#21is}n;GW8mb$uFcA^7wo-NT%>^GC<%WYd#?o}W zhU>vg$h7c*JIbB{sd%C$+E5P!n!OVc9N}1&b&}XX#y<#}MmhzyKUbE!6G>z?0hO|a zNQRlHsv*lM8Jes!RXP@=s<$$Ys$QX6>gs9vVpOC3j z<5n|KgA`ldk;!>(3*m1i7}d7I$n+ap%Fu}#JdEE+8fGLVE2x?A%SkC%2{7+LS<~cZ zj^;r2jWG?fZK_yPw16q`0+!|==fcO*EcEi2M4A`fq6d#|C_;QD4WSnj9Q3dP7ADQQ zIY`#MA}hq0#x~VPVMEnz?2?#x00E>~Z_MY5G0PQ;C94sIR{lrW7T`(zX-&s7mI<3! z_=;_q0E$?xx9I>iNNsJi3AQ#L%`POf$bx4^8hP^)3}F6T5`5}2?!ZXrCo z+CggSew%xG<7=R}NA9}&$G3_edw8FpO)>dJ8^3HyJ@H<&UHW+BhkkngMDZJE9XtCr zg=Sx$uDEdRp0`Jz8UOR|&%gL-LF)S}Di4qhGJQP-S_5m(Yi|}f+i2p zS8Z+)bH2tVh`93C*tpx+Scvto2Iq3E_lJd(!`Y^+CXq>cdu;$TmveH$(At69sfvy$>K_vSA9}&YcNEm>0Ac>I-16NaK8c}y6;K3DClBsYfX&}y98_3F1 bwrezFs;2%0ax*Xx diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfOrderedLists.pdf b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_differentDirsOfOrderedLists.pdf deleted file mode 100644 index b789c801f7ad42362701701c59cf7df9815d011d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1108 zcmah|TSyd97}i3_fub8m58)x0a?9O0Gdr{ErtGGBDY0~0x3pXzW_QkR6T34qGh14U z6jl_dpcDlXJs2TH85PontSAz?LLv2_-JmFlh#rdW=S-U`2K6({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EavRb3+^5Q<2 ziWo#9GCga)O>OhcMEe}G2c@tXEZr!_^f0k9(E7W=lrdkD)?l1sfRn<5i$2Xm2Obu2#_lhpaTeDZOmm*?t;LH^{|)*+Lky> T>4u~krbsSEq%4-YT|Vj;hEHcp diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_floatedTableInRtlDocument.pdf b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_floatedTableInRtlDocument.pdf deleted file mode 100644 index d34eee0031951cdf68c1ad57ca2499bbbdcfd5f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1392 zcmY!laBba$*+KDlbvy)&P`tiGrIb!pzK z1)q!m2bwWd*~;1Q#Klkb{OvTgc#>SsKbc7z7Ve#3yLnfEl5>a>8;f&?1d~Ok!kOK7 zn08GQ=*@0U$(zKw^=jar&@^uTc&DNhWot7YUlIhKBwIf#}rk(tFq#{+9*=7o38T*II zI^H8j`;Wi>xyJtd@ykE&$v){R_Ga+eY%gY-E}9!8C*vEKn#1ktI_1&~MLpwy8Hp_q zzKh-2-yiFc{hfO=i?EMUXZ`Y@ED=4aOXv8{@%;Vz??am(TNrd(s%m-mu2a6GwpFk& z$1OYh(tqdOE&oe8Cz=&-#vIrx@=!VGkE7mSEzMUu*9o##Ox9_&iCDsZdiCU`#nST@ z7E2}nYMwCvSlLW_hN~HdZ@5zPQlRkyWP#$*1QDOk`FSO&c_qaPpg0cF_f1X7Omxbx zh&BLnO)X6oEKH1I^#c-%fNB(sz)FHri}Op1l2eO8sR5`PL>VfWf#uwc6wE;kJ0Q>x zDay>nFe;?7AQfm{da9ir$Xy`U7y@-bQx{007-|n#rE_9QVorWKLa{MIu`@8Km1O4U zxd4-*hKrSvfsvtsv4NqXxsjQXiMD~Ux`BbZroL}}3VsCvMfoYE$*DyenIWkaCF>N- z^$hh4O?89)90P(q{6iF08W|WE=z>gF0IN`NFUl`1Q1A;=h|zF#5Ae|~OD!q}IwM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MgnVHCSBJaw{|j{}Rm%UWjFPiHUem-m;ImP&$0^WMPE)>K4?~(x?t`YcoFV73{XD%sZb&`p;##Np&0F8% z<0F_xU9z_ zY=w1Pt197WU;4P~asHmA`XTk%!IvF1Gmaz|BxI}%N_F*6xKdJzFRV!$7=8BM{M*r| zuCHUmn+==SvBo8feFnco9}jC5?~Gki3SZrLKQy4&)8HM_JEGwF)Ja>k#m1{cf1YU_ z=)o>3teDr(d`0R1nx!qgf_ifP&i$Aj;8CyE0Lyb^oF~A^7y)z`s@5G1sA*bBgUR5j zO+}(|B{$&cv}s6GtGn4$G%8!&Y?SI*8$qJ7)(xkop7p0uqjLCX9H}J!;7<}5HU|pw zKN4dUNDn7;3}a_(LJt}&fL5{*=W9sX8D1z7<*HD`f}~Nmm*@q$ z%29fOE_#C`y+=vIv49$Axgef~^WJENw5G|}CW8Q2505{80S{uxZ$E-CMB}DaOrUXF zD3-92R}5XUZlOLv>PL}Of)#gQ_5I|@$?@Kgdo?(Cb+9kXcwc6(-<|vq3g;_cYBqXcZzjNLZh6bD^@kdd%l`s{pk%oc5Rbr` z$KVCnvH^)VU^?Ov*y2Q;2B{KwWgma`@BcqGg5kJByDl<*-hTUmYz$ajy+-{$8Rsj- zB^j?0#fLl<87F7FSgKdpp}t=#$&+ie`E$T*OGx)YqylV$g^@*WfjiJ-cs2d*+{-XfE@(;fgRg6ZM?wuHD?~`YW&4f>#zn?H|m~KGRaq5R^Mnc#It^qxh`Xio|!P_F((C{T4w5AQO`4V zV2=NPVooN-Lg1iAf5)+-y&Lf;iaTeM!KiZ)jiBRpq02ha#nT{qei@@u RB~sPFSdNDbV{|!2e*mv$(}4g0 diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfLink.pdf b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfLink.pdf deleted file mode 100644 index a5aea2088239d7f72a059043060fb2b1b08d05bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1795 zcmbtVPl#JZ7zay5pDjwGsPy2p8oS$)%*^|nlo-rzHrvH+8(z{~Bn|R5Z<2j&@+Q8S zY-1IRO3{mmODijQs2;=~Ea*xL-Fgrd+lv;f2SL;-RPj*vpw^4v%-f{NZon0tOETYl z-|w66_xrwi(R?-+!*NTA{_x}HR}>2%KxYmqsT9nBgxJ_{ga$4NN=R%_8Rmcv^FR+z zY*OJRLo^c@wBlBx3=6Fp{#28|y`FzKomPnNO4wvSJeH8_c2{0XuSl9@+kqaoc-eF5mcSXD;&4!{>fG1Akq*{LSU|rH>*D z8={d*AK!g+=fZ2~{;~06@vB#EdH476#1q>WIY8EJ$^lREqll4;q%W}!*8BCSzXLW9=!F%T|-+QcJ+Hjv`lAe6u^!%^yU;&TQhWj357uIG%VL(fr%J9S#?IcoyG zQ_QFkjC<723PFdmyH%uOq@pBJb;~e!A#DdjJBHyTb^qBRA5gbdA;FMWByD~MSaBT3 zMy#+elP~PqUj(OBgiuVPgU|zv2ej1$`=-Fbq0D%GZ)}bPOkCsO@Nn;%l7-GSM;t~Z zJ+SCC2#eXY;rMXO7Y*q7H8}108J~GK_uV;^)ngcPAcK3zlKUbV4TBq|*ddr_Km0zytQgNHx$@ZhxA-(*JuM&J1nwSc~-mw*yjD5Wt!ul-LlSIO_D!Qqeu3JT}YNglr xD8mWAN`ahR8`_kLrValVyrV?WE;=?w>p0T1QDnyD+%=-B?8@;4!+6$$_V diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfListInsideList.pdf b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_rtlDirectionOfListInsideList.pdf deleted file mode 100644 index f6d2fb22825a2032db473cf47190c0f36e8f1317..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1108 zcmah|TSyd97&ae@rVDDJMG~jW;!3S^=C$gTGwc2Vab1uby5Q zy{liHFuSjMQ>xeEX)u=td$D<@qNzS?uH9F{LY9Fn6d?y0UYG~D z0tgEV>1CSyZ$LoTFkL25A=Q&dG7yo64l51Fa0ImmNu|qGJdBDOr&lU!nQACQ z=TIVQ5{XFnjP zW&<+id;j6pA|(O{tbswQwUvn)ITzVXG^e>Jg3^|bm~Lcd-7|odctvqs8)98;R8>KZEwd8o_1 z-X&cMnR>Zfyd%>Il_|rP=_1p00GT|&#E@=iZC0@l;-eT8L9@W6n7C$R4B$LS0y$Q} zP9ukCgsaJi1ro_AcrmJNEPBfH5^QPG_Ra)1r6BAx6B z#gj*SRWQRr2x-C&JOt>lt-=uKIRW~cLLKpLdKlRbZlmAtue3>2D9_ZUIf%%^s74++ zbi&GOCev=>dt{hd=A>bUOvhM1Ckq2Ek%&ysdT&qL3Nz8Z%pA4~*bJ8GGIXbpSeZ!u zsqkd1loV~0p&*bcJVC(TKG)Wa9J0v|))@hPt$Lc5ASZE9mx2SD6y$WI36K+bnagNUiRu o2_|7#SQ~GfG%g|_V?BJHf%GPaDaX}p*Aq$RS<2^Y?~PKw0qhY$9RL6T diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_spansOfDifferentDirsInsideParagraph.pdf b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/cmp_spansOfDifferentDirsInsideParagraph.pdf deleted file mode 100644 index 709e7ecb06ffb01f1ba268b7e149e00033c0a3a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16305 zcma)@1yo#1v#60E!3pjI1Pv|&1a}MW9%O#Bu3p~c z-*(+QGggEv_m5FX`nH=t3nDPKR{4GJy?zxa${w;vk(8=wj_+eBmAAwn4w{293B_3S+wx7*xb(?y-a-H*e+AX8!J>$irnz# zXYI7%tdl~=tcyVcU&49+`FDmZHG|#I&3WtHoVddcM_TH7legQEv%7v#y(VFHd|xpe zc7)>x)(sbUA2KLHFA$rvE7DOwc4q(Z=2?32p6l-@h=c8%L3YkgfS1UqvMPYgERDs$ z?s{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me>W}wqfe8n diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfDls.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfDls.html deleted file mode 100644 index 7885b09a8..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfDls.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -
    -
    -
    Definition description with rtl direction inside a description list
    -
    -
    -
    -
    -
    Definition description with ltr direction inside a description list
    -
    -
    -
    -
    -
    Definition description with default direction inside a description list
    -
    -
    - - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfOrderedLists.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfOrderedLists.html deleted file mode 100644 index 2dd9afb42..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfOrderedLists.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - -

    ol tag with ltr

    -
      -
    1. list item 1
    2. -
    3. list item 2
    4. -
    -

    ol tag with rtl

    -
      -
    1. list item 1
    2. -
    3. list item 2
    4. -
    -

    ol tag with default direction

    -
      -
    1. list item 1
    2. -
    3. list item 2
    4. -
    - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfUnorderedLists.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfUnorderedLists.html deleted file mode 100644 index 1ec505883..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/differentDirsOfUnorderedLists.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - -

    ul tag with ltr

    -
      -
    • list item 1
    • -
    • list item 2
    • -
    -

    ul tag with rtl

    -
      -
    • list item 1
    • -
    • list item 2
    • -
    -

    ul tag with default direction

    -
      -
    • list item 1
    • -
    • list item 2
    • -
    - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/floatedTableInRtlDocument.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/floatedTableInRtlDocument.html deleted file mode 100644 index 2d587bc07..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/floatedTableInRtlDocument.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - -
    - Table Header -
    TD1TD2
    - - - - - - -
    TD1
    - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/one.png b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/one.png deleted file mode 100644 index 2623db6337d4cca1292f2657fb41d81130309c6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1SGcvS$+jljKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!F8T4jv*f2Z?D<%H7iIoB-SzA?GRRxo8)Xz zpwA}EcObGrYg$NF(5kgJX6fDEEYZ40F}_F8|8mPY$5UTfCaiPV_37u{efOT`_82-z z^=;Z|y1mHoSjO5=FHXfh-&1p! Oi#HA>ayldU;?S<#s6E#l%UbFmo;hgSn=9lH0 z7f|&It WXH!(4JV6-fat2RVKbLh*2~7ZSw{4&R diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/paragraphsOfDifferentDirsWithImage.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/paragraphsOfDifferentDirsWithImage.html deleted file mode 100644 index e5f435f70..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/paragraphsOfDifferentDirsWithImage.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - -

    Paragraph with child img with ltr direction

    -

    Paragraph with child img with rtl direction

    -

    Paragraph with child img with default direction

    - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest01.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest01.html deleted file mode 100644 index 6237bb78c..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest01.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -
    - - - diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest02.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest02.html deleted file mode 100644 index 7a8adcac5..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirTest02.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -
    -
    -
    - - - diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfLink.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfLink.html deleted file mode 100644 index 3d058eb44..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfLink.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -

    html tag with rtl direction. Values of a tag in increasing order

    -3 -2 -1 - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfListInsideList.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfListInsideList.html deleted file mode 100644 index 34e900a0e..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfListInsideList.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -

    body tag with rtl direction

    - -
      -
    1. list item 1
    2. -
    3. list item 2
    4. -
    5. list item 3
    6. -
    - -
      -
    • list item 1
    • -
    • list item 2
    • -
    • list item 3
    • -
    - - - - diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfSpan.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfSpan.html deleted file mode 100644 index 78e40548b..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/rtlDirectionOfSpan.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -

    Spans are placed in the html in decreasing order, but should be rendered in the opposite way

    -3 -2 -1 - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/spansOfDifferentDirsInsideParagraph.html b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/spansOfDifferentDirsInsideParagraph.html deleted file mode 100644 index 318afebd8..000000000 --- a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/spansOfDifferentDirsInsideParagraph.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - -

    [ʔ~ʕ, -] Span with ltr direction inside a paragraph

    -

    [ʔ~ʕ, -] Span with rtl direction inside a paragraph

    -

    [ʔ~ʕ, -] Span with default direction inside a paragraph

    - - \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/square.png b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/square.png deleted file mode 100644 index 6d6943e3f7e7945c2f01ee77b811e6527257d89c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2483 zcmbtVX*d)L7ar?aZzM*!G|3uKQPx|-*hWaAOw=X2MA^v*sVkMx&F&`Ii9*>*RQ4rH z3fIG=Q-524?%X#<1> zAR-9TMu-Yw^CoN&hL{L`CqY~k5}UDg3&>*F_B$lSv0VaETOmz`%r?kMLT)?crLaR9 z3NlcX#ZEaW$wPSulohZ`5xaL{j}larp}GrucSB7D>Z;J#3(bAdQiHZS{?NdFO&rhy zMH@PQKzBc=2cSoRz77m@VMql{AI1haXb4jp%#3m9Ak0m0*c29KIC2P<=CC@9qZT-J z1lE?ITY-KQ$B)6r8n$$tIF6GxusZ?!lQ{J!9PQzB3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KQ`E5K0ehKD(H{)KBitIXb}hPOs)rLq>IJ{~c{XOD)o2lQP{9 zx1Q%}aG|>&P79uOwHum?Uzp@_Fnt5A2&rs;H|f|=`T^T#(Qd{5l+nU@1;agK+INXG zs#vynPQew!DQ?c>dzIngb)3)H_lfj+u+&E9eTTx+3hoc2zCVfW zs$rs6-JDq-e##$Z?fp(>G=$9$q=g=NDBEuMA-AdeVZFJ@c7qEQv(bL62A_3m1%##( zTIRO8-xriRwopQN@?1oNvD-BK>y@_z>dNqIE2Uk!qEWR;Ik|#aU6tgO zfX>;O*l&wA9$SyghSeJgPNk)7nHuSY6z& zWSq3@5n)R9dG))MB1!6!ri)?@y|8e9vFM&Giw!+BW9eOb3ir9C=*tx`eW#N8KI$;r z;jZn9)Y4B*b$(_Wyv0`JSDUHt#LBtZXDXu2mJ*`!t0|*ZQKwQkD7nV@PtR+$UEJkc z++T9*gfel>Dl78MG|QCSVwi?BHQUr7F0@yaZgND8lGf`K;-=g^ - - - - - - - -

    Huge table with rtl direction

    -
    - - - - - - - - - - - - - -
    - TableDataCell1 - - TableDataCell2 - - TableDataCell3 - - TableDataCell4 - - TableDataCell5 - - TableDataCell6 - - TableDataCell7 - - TableDataCell8 -
    -
    - - - diff --git a/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/two.png b/src/test/resources/com/itextpdf/html2pdf/attribute/DirAttributeTest/two.png deleted file mode 100644 index 5e53af3b34c3fdc470d23571616caf5b5d975ec3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 450 zcmV;z0X_bSP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0ar;xK~zXf?Up^V zf-n$((FfF80B7I^Z~_YMft8e$baDmHz$K`lp+PG;2WPaf@BsY!cHF!-4n`6R3TOBV z2$SW@CL1y=9*>7G4NG#LfLYyRR`-}t&HKq<*njZi3AR7MmG$j*+wb?5W&J!+Rdu`F z9*;-T{Rv29n6fNas}+fUK~a>$;Xs0DaH(#PK+4za6{`wc#dTfML1Tov zZQC?W(F--yb^U(7lRg@}YAEJzw|mZ0fK6hWCRTL-E_GE^j^m(L6h+_nhx0|)>ZWNt z&qJ@KX-Sfh4i*eG)Gg0*^h%PHWf`paDk From ed80bdd1bf5d400e9286e25cabb10d1f82415f61 Mon Sep 17 00:00:00 2001 From: iText Software Date: Tue, 11 Oct 2022 12:21:03 +0000 Subject: [PATCH 10/11] Update dependencies --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4caeb059d..18ec2155f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.itextpdf root - 7.2.4-SNAPSHOT + 7.2.5-SNAPSHOT From 5e0117078df527d3381418774154b9c0b9577673 Mon Sep 17 00:00:00 2001 From: iText Software Date: Thu, 13 Oct 2022 10:12:20 +0300 Subject: [PATCH 11/11] [RELEASE] pdfHTML 4.0.4 --- pom.xml | 4 ++-- .../itextpdf/html2pdf/actions/data/PdfHtmlProductData.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 18ec2155f..b721199ba 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ com.itextpdf root - 7.2.5-SNAPSHOT + 7.2.4 html2pdf - 4.0.4-SNAPSHOT + 4.0.4 pdfHTML pdfHTML is an iText 7 add-on that lets you to parse (X)HTML snippets and the associated CSS and converts diff --git a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java index 80c5b01a0..b31a76e29 100644 --- a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java +++ b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java @@ -30,7 +30,7 @@ This file is part of the iText (R) project. */ public final class PdfHtmlProductData { private static final String PDF_HTML_PUBLIC_PRODUCT_NAME = "pdfHTML"; - private static final String PDF_HTML_VERSION = "4.0.4-SNAPSHOT"; + private static final String PDF_HTML_VERSION = "4.0.4"; private static final int PDF_HTML_COPYRIGHT_SINCE = 2000; private static final int PDF_HTML_COPYRIGHT_TO = 2022;