diff --git a/itext.tests/itext.layout.tests/itext/layout/ParagraphTest.cs b/itext.tests/itext.layout.tests/itext/layout/ParagraphTest.cs
index 93df2b4f9b..0e1ef8cd41 100644
--- a/itext.tests/itext.layout.tests/itext/layout/ParagraphTest.cs
+++ b/itext.tests/itext.layout.tests/itext/layout/ParagraphTest.cs
@@ -111,5 +111,32 @@ public virtual void WordWasSplitAndItWillFitOntoNextLineTest02() {
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
, "diff"));
}
+
+ [NUnit.Framework.Test]
+ public virtual void ParagraphUsingSvgRenderingModeTest() {
+ String outFileName = destinationFolder + "paragraphUsingSvgRenderingMode.pdf";
+ String cmpFileName = sourceFolder + "cmp_paragraphUsingSvgRenderingMode.pdf";
+ using (PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName))) {
+ using (Document document = new Document(pdfDocument)) {
+ Paragraph paragraph1 = new Paragraph().SetBorder(new SolidBorder(ColorConstants.YELLOW, 1));
+ paragraph1.SetWidth(200).SetHorizontalAlignment(HorizontalAlignment.RIGHT);
+ Paragraph paragraph2 = new Paragraph().SetBorder(new SolidBorder(ColorConstants.PINK, 1));
+ paragraph2.SetWidth(200).SetHorizontalAlignment(HorizontalAlignment.RIGHT);
+ paragraph2.SetProperty(Property.RENDERING_MODE, RenderingMode.SVG_MODE);
+ for (int i = 0; i < 5; i++) {
+ Text textChunk = new Text("text" + i).SetBorder(new SolidBorder(ColorConstants.GREEN, 1));
+ textChunk.SetRelativePosition(-70 * i, 0, 0, 0);
+ paragraph1.Add(textChunk);
+ paragraph2.Add(textChunk);
+ }
+ document.Add(new Paragraph("Default rendering mode:"));
+ document.Add(paragraph1);
+ document.Add(new Paragraph("SVG rendering mode:"));
+ document.Add(paragraph2);
+ }
+ }
+ NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
+ , "diff"));
+ }
}
}
diff --git a/itext.tests/itext.layout.tests/resources/itext/layout/ParagraphTest/cmp_paragraphUsingSvgRenderingMode.pdf b/itext.tests/itext.layout.tests/resources/itext/layout/ParagraphTest/cmp_paragraphUsingSvgRenderingMode.pdf
new file mode 100644
index 0000000000..32bf1dd61a
Binary files /dev/null and b/itext.tests/itext.layout.tests/resources/itext/layout/ParagraphTest/cmp_paragraphUsingSvgRenderingMode.pdf differ
diff --git a/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/parse/CssStyleSheetParserTest.cs b/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/parse/CssStyleSheetParserTest.cs
index 495838c72d..06bc560fec 100644
--- a/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/parse/CssStyleSheetParserTest.cs
+++ b/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/parse/CssStyleSheetParserTest.cs
@@ -229,6 +229,13 @@ public virtual void BackgroundWithSvgDataTest() {
declaration.Length - 1)));
}
+ [NUnit.Framework.Test]
+ public virtual void Base64Test() {
+ String cssString = "data:image/jpeg;base64,/9j/aGVsbG8gd29ybGQ=";
+ CssStyleSheet styleSheet = CssStyleSheetParser.Parse(new MemoryStream(cssString.GetBytes()), sourceFolder);
+ NUnit.Framework.Assert.IsTrue(styleSheet.GetStatements().IsEmpty());
+ }
+
private String GetCssFileContents(String filePath) {
byte[] bytes = StreamUtil.InputStreamToArray(FileUtil.GetInputStreamForFile(filePath));
String content = iText.Commons.Utils.JavaUtil.GetStringForBytes(bytes);
diff --git a/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/util/CssTypesValidationUtilsTest.cs b/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/util/CssTypesValidationUtilsTest.cs
index 4739630af7..0bd3603615 100644
--- a/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/util/CssTypesValidationUtilsTest.cs
+++ b/itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/util/CssTypesValidationUtilsTest.cs
@@ -20,6 +20,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
+using System;
using iText.Test;
namespace iText.StyledXmlParser.Css.Util {
@@ -127,5 +128,14 @@ public virtual void TestSpacesAfterUnitTypes() {
NUnit.Framework.Assert.IsTrue(CssTypesValidationUtils.IsMetricValue("10px "));
NUnit.Framework.Assert.IsTrue(CssTypesValidationUtils.IsPercentageValue("10% "));
}
+
+ [NUnit.Framework.Test]
+ public virtual void IsBase64Test() {
+ String base64String = "data:image/jpeg;base64,/9j/aGVsbG8gd29ybGQ=";
+ bool isBase64Data = CssTypesValidationUtils.IsBase64Data(base64String);
+ bool isInlineData = CssTypesValidationUtils.IsInlineData(base64String);
+ NUnit.Framework.Assert.IsTrue(isBase64Data);
+ NUnit.Framework.Assert.IsTrue(isInlineData);
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/converter/SvgConverterIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/converter/SvgConverterIntegrationTest.cs
index 20556f1c53..e8fd445a91 100644
--- a/itext.tests/itext.svg.tests/itext/svg/converter/SvgConverterIntegrationTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/converter/SvgConverterIntegrationTest.cs
@@ -531,5 +531,33 @@ public virtual void ParseDoubleValues() {
public virtual void ParsePathWithNewLinesTest() {
ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "pathWithNewLines");
}
+
+ [NUnit.Framework.Test]
+ //TODO DEVSIX-8769: adapt after supporting
+ [LogMessage(SvgLogMessageConstant.UNMAPPED_TAG)]
+ public virtual void DescriptionTagsTest() {
+ IDictionary map = new Dictionary();
+ RectangleSvgNodeRenderer rect = new RectangleSvgNodeRenderer();
+ rect.SetAttribute("title", "Blue rectangle title");
+ rect.SetAttribute("desc", "This is a description of a blue rectangle in a desc tag.");
+ rect.SetAttribute("aria-describedby", "This description inside the aria-describedby will take precedent over desc tag description."
+ );
+ rect.SetAttribute("fill", "blue");
+ rect.SetAttribute("width", "300");
+ rect.SetAttribute("height", "200");
+ ISvgNodeRenderer root = new SvgTagSvgNodeRenderer();
+ root.SetAttribute("xmlns", "http://www.w3.org/2000/svg");
+ root.SetAttribute("font-size", "12pt");
+ root.SetAttribute("width", "800");
+ root.SetAttribute("height", "500");
+ ISvgProcessorResult expected = new SvgProcessorResult(map, root, new SvgProcessorContext(new SvgConverterProperties
+ ()));
+ String name = "descriptions";
+ using (Stream fis = FileUtil.GetInputStreamForFile(sourceFolder + name + ".svg")) {
+ ISvgProcessorResult actual = SvgConverter.ParseAndProcess(fis);
+ NUnit.Framework.Assert.AreEqual(expected.GetRootRenderer().GetAttributeMapCopy(), actual.GetRootRenderer()
+ .GetAttributeMapCopy());
+ }
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/css/BaselineTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/BaselineTest.cs
index c7b80d3064..04d19539ae 100644
--- a/itext.tests/itext.svg.tests/itext/svg/css/BaselineTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/css/BaselineTest.cs
@@ -54,5 +54,12 @@ public virtual void DominantBaselineTest() {
//TODO DEVSIX-5890: update cmp file after supporting
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "dominant-baseline");
}
+
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void DominantBaselineTspanTest() {
+ //TODO DEVSIX-5890: update cmp file after supporting
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "dominant-baseline-tspan");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/css/FontAttributesTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/FontAttributesTest.cs
index 93412b450a..aed3a50f24 100644
--- a/itext.tests/itext.svg.tests/itext/svg/css/FontAttributesTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/css/FontAttributesTest.cs
@@ -57,11 +57,23 @@ public virtual void FontSizeAdjustTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "font-size-adjust");
}
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void FontSizeAdjustTspanTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "font-size-adjust-tspan");
+ }
+
[NUnit.Framework.Test]
public virtual void FontStretchTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "font-stretch");
}
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void FontStretchTspanTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "font-stretch-tspan");
+ }
+
[NUnit.Framework.Test]
public virtual void FontVariantTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "font-variant");
diff --git a/itext.tests/itext.svg.tests/itext/svg/css/ImportRuleTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/ImportRuleTest.cs
index e5904e5c55..b31dcc406f 100644
--- a/itext.tests/itext.svg.tests/itext/svg/css/ImportRuleTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/css/ImportRuleTest.cs
@@ -91,6 +91,16 @@ public virtual void MediaQueryTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQuery", properties);
}
+ [NUnit.Framework.Test]
+ [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNABLE_TO_RETRIEVE_STREAM_WITH_GIVEN_BASE_URI
+ , LogLevel = LogLevelConstants.ERROR)]
+ public virtual void MediaQueryPrintTest() {
+ // TODO DEVSIX-2263 SVG: CSS: Media query processing
+ ISvgConverterProperties properties = new SvgConverterProperties().SetMediaDeviceDescription(new MediaDeviceDescription
+ (MediaType.SCREEN));
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryPrint", properties);
+ }
+
[NUnit.Framework.Test]
[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNABLE_TO_RETRIEVE_STREAM_WITH_GIVEN_BASE_URI
, LogLevel = LogLevelConstants.ERROR)]
diff --git a/itext.tests/itext.svg.tests/itext/svg/css/MediaTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/MediaTest.cs
new file mode 100644
index 0000000000..faf1d967cb
--- /dev/null
+++ b/itext.tests/itext.svg.tests/itext/svg/css/MediaTest.cs
@@ -0,0 +1,157 @@
+/*
+This file is part of the iText (R) project.
+Copyright (c) 1998-2024 Apryse Group NV
+Authors: Apryse 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 .
+*/
+using System;
+using iText.Svg.Renderers;
+using iText.Test;
+
+namespace iText.Svg.Css {
+ [NUnit.Framework.Category("IntegrationTest")]
+ public class MediaTest : SvgIntegrationTest {
+ // TODO DEVSIX-2263 SVG: Update cmp files
+ private static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
+ .CurrentContext.TestDirectory) + "/resources/itext/svg/css/MediaTest/";
+
+ private static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ + "/test/itext/svg/css/MediaTest/";
+
+ [NUnit.Framework.OneTimeSetUp]
+ public static void BeforeClass() {
+ ITextTest.CreateDestinationFolder(DESTINATION_FOLDER);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryWidthTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryWidth");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryMinWidthTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryMinWidth");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryBigMinWidthTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryMinWidth2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryBigMaxWidthTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryMaxWidth");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryHeightTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryHeight");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryMinHeightTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryMinHeight");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryMaxHeightTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryMaxHeight");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryOrientationLandscapeTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryOrientationLandscape");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryOrientationPortraitTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryOrientationPortrait");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryAspectRatioTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryRatio");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryAspectRatioSingleValTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryRatioSingleVal");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryScreenTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryScreen");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryPrintTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryPrint");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryResolutionTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryResolution");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryOverflowBlockTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryOverflowBlock");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryOverflowInlineTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryOverflowInline");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryNotTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryNot");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryOnlyTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryOnly");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryOnlyAndTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryOnlyAnd");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryColorTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryColor");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryMinColorTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryMinColor");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryColorGamutTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryColorGamut");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void MediaQueryDisplayBrowserTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "mediaQueryDisplayBrowser");
+ }
+ }
+}
diff --git a/itext.tests/itext.svg.tests/itext/svg/css/OpacityTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/OpacityTest.cs
new file mode 100644
index 0000000000..279d59c6f2
--- /dev/null
+++ b/itext.tests/itext.svg.tests/itext/svg/css/OpacityTest.cs
@@ -0,0 +1,52 @@
+/*
+This file is part of the iText (R) project.
+Copyright (c) 1998-2024 Apryse Group NV
+Authors: Apryse 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 .
+*/
+using System;
+using iText.Svg.Renderers;
+using iText.Test;
+
+namespace iText.Svg.Css {
+ [NUnit.Framework.Category("IntegrationTest")]
+ public class OpacityTest : SvgIntegrationTest {
+ //TODO DEVSIX-8822: update cmp after supporting
+ public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
+ .CurrentContext.TestDirectory) + "/resources/itext/svg/css/OpacityTest/";
+
+ public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ + "/test/itext/svg/css/OpacityTest/";
+
+ [NUnit.Framework.OneTimeSetUp]
+ public static void BeforeClass() {
+ ITextTest.CreateDestinationFolder(DESTINATION_FOLDER);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void OpacityShapesTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "opacityShapes");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void OpacityPathsTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "opacityPaths");
+ }
+ }
+}
diff --git a/itext.tests/itext.svg.tests/itext/svg/css/SvgStyleResolverIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/SvgStyleResolverIntegrationTest.cs
index 532f60c592..0b77ae8895 100644
--- a/itext.tests/itext.svg.tests/itext/svg/css/SvgStyleResolverIntegrationTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/css/SvgStyleResolverIntegrationTest.cs
@@ -166,6 +166,12 @@ public virtual void SvgWithInternalCSStoSingleDefaultPage() {
ConvertAndCompare(sourceFolder, destinationFolder, "internalCss");
}
+ [NUnit.Framework.Test]
+ public virtual void SvgWithInternalCSSWithoutOverlapTest() {
+ // TODO: update cmp files when DEVSIX-2286 resolved
+ ConvertAndCompare(sourceFolder, destinationFolder, "internalCssNoOverlap");
+ }
+
[NUnit.Framework.Test]
public virtual void SvgWithExternalCSStoCustomPage() {
// TODO: update cmp files when DEVSIX-2286 resolved
@@ -308,5 +314,11 @@ public virtual void CssStylesResolverOrder16Test() {
public virtual void CssStylesResolverOrder17Test() {
ConvertAndCompare(sourceFolder, destinationFolder, "cssStylesResolverOrder17");
}
+
+ [NUnit.Framework.Test]
+ public virtual void HeightWidthSvgStyleTest() {
+ //TODO DEVSIX-8823: update after issue is fixed
+ ConvertAndCompare(sourceFolder, destinationFolder, "height-width-style");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/customization/CustomizeTextLeafSvgNodeRendererTest.cs b/itext.tests/itext.svg.tests/itext/svg/customization/CustomizeTextLeafSvgNodeRendererTest.cs
index 7947499fce..e775b2edca 100644
--- a/itext.tests/itext.svg.tests/itext/svg/customization/CustomizeTextLeafSvgNodeRendererTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/customization/CustomizeTextLeafSvgNodeRendererTest.cs
@@ -91,10 +91,10 @@ protected internal override void DoDraw(SvgDrawContext context) {
)) {
String initialText = this.attributesAndStyles.Get(SvgConstants.Attributes.TEXT_CONTENT);
String amendedText = "_" + initialText + "_";
+ this.attributesAndStyles.Put(SvgConstants.Attributes.TEXT_CONTENT, amendedText);
SvgTextProperties properties = new SvgTextProperties(context.GetSvgTextProperties());
context.GetSvgTextProperties().SetFillColor(ColorConstants.RED);
base.DoDraw(context);
- GetText().SetText(amendedText);
context.SetSvgTextProperties(properties);
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/FillTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/FillTest.cs
index 305a7cee0f..25c642731f 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/FillTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/FillTest.cs
@@ -123,5 +123,11 @@ public virtual void TextFillFallbackTest() {
//TODO update cmp file after DEVSIX-2915 will be fixed
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textFillFallbackTest");
}
+
+ [NUnit.Framework.Test]
+ public virtual void FillLinkToNonExistingGradientTest() {
+ //TODO DEVSIX-8821: update after supported
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "fillLinkToNonExistingGradient");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs
new file mode 100644
index 0000000000..c3fe8dad8e
--- /dev/null
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs
@@ -0,0 +1,70 @@
+/*
+This file is part of the iText (R) project.
+Copyright (c) 1998-2024 Apryse Group NV
+Authors: Apryse 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 .
+*/
+using System;
+using iText.Test;
+
+namespace iText.Svg.Renderers {
+ [NUnit.Framework.Category("IntegrationTest")]
+ public class RelativePositionsTest : SvgIntegrationTest {
+ private static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
+ .CurrentContext.TestDirectory) + "/resources/itext/svg/renderers/impl/RelativePositionsTest/";
+
+ private static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ + "/test/itext/svg/renderers/impl/RelativePositionsTest/";
+
+ [NUnit.Framework.OneTimeSetUp]
+ public static void BeforeClass() {
+ ITextTest.CreateDestinationFolder(DESTINATION_FOLDER);
+ }
+
+ //TODO DEVSIX-5740: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void RelativePositionsBasic1Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsBasic");
+ }
+
+ //TODO DEVSIX-5740: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void RelativePositionsBasic2Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsBasic2");
+ }
+
+ //TODO DEVSIX-5740: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void RelativePositionsListValuesTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsListValues");
+ }
+
+ //TODO DEVSIX-5740: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void RelativePositionsListValuesNoXTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsListValuesNoX");
+ }
+
+ //TODO DEVSIX-5740: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void RelativePositionsListValuesNoYTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsListValuesNoY");
+ }
+ }
+}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/StrokeTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/StrokeTest.cs
index 6cfaf2c708..d07299e7f5 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/StrokeTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/StrokeTest.cs
@@ -97,5 +97,17 @@ public virtual void StrokeDashArrayLinesTest() {
//TODO: update cmp-file after DEVSIX-2258
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "strokeDashArrayLines");
}
+
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void StrokeTextTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "strokeText");
+ }
+
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void StrokeTspanTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "strokeTspan");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/WhiteSpaceTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/WhiteSpaceTest.cs
new file mode 100644
index 0000000000..12c2b46358
--- /dev/null
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/WhiteSpaceTest.cs
@@ -0,0 +1,66 @@
+/*
+This file is part of the iText (R) project.
+Copyright (c) 1998-2024 Apryse Group NV
+Authors: Apryse 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 .
+*/
+using System;
+using iText.Test;
+
+namespace iText.Svg.Renderers {
+ [NUnit.Framework.Category("IntegrationTest")]
+ public class WhiteSpaceTest : SvgIntegrationTest {
+ //TODO DEVSIX-2284: Update cmp file after supporting
+ private static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
+ .CurrentContext.TestDirectory) + "/resources/itext/svg/renderers/impl/WhiteSpaceTest/";
+
+ private static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ + "/test/itext/svg/renderers/impl/WhiteSpaceTest/";
+
+ [NUnit.Framework.OneTimeSetUp]
+ public static void BeforeClass() {
+ ITextTest.CreateDestinationFolder(DESTINATION_FOLDER);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void WhiteSpacexLinkBasicTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "whiteSpace");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void WhiteSpaceBasicTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-basic");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void WhiteSpaceBasicTspanTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-basic-tspan");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void WhiteSpaceNestedTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-nested");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void WhiteSpaceRelativePositionsTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-basic-relative-positions");
+ }
+ }
+}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ClipPathSvgNodeRendererIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ClipPathSvgNodeRendererIntegrationTest.cs
index 11a32f7dc7..6848dcafb0 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ClipPathSvgNodeRendererIntegrationTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ClipPathSvgNodeRendererIntegrationTest.cs
@@ -108,6 +108,7 @@ public virtual void ClipPathCssProperty() {
[NUnit.Framework.Test]
public virtual void ClipPathRulesCombined() {
+ // TODO DEVSIX-2589 Support overflow attribute for symbol
ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "clipPathRulesCombined");
}
@@ -121,5 +122,15 @@ public virtual void InvalidClipPathTagTest() {
public virtual void ClipPathUnitsTest() {
ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "clipPathUnits");
}
+
+ [NUnit.Framework.Test]
+ public virtual void ClipPathUrlTopLevelTest() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "clipPathUrlTopLevel");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void ClipPathUrl2ndLevelTest() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "clipPathUrl2ndLevel");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ImageSvgNodeRendererIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ImageSvgNodeRendererIntegrationTest.cs
index 7878018cd9..d6b68b973d 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ImageSvgNodeRendererIntegrationTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ImageSvgNodeRendererIntegrationTest.cs
@@ -21,10 +21,12 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
using System;
+using iText.Svg.Logs;
using iText.Svg.Processors;
using iText.Svg.Processors.Impl;
using iText.Svg.Renderers;
using iText.Test;
+using iText.Test.Attributes;
namespace iText.Svg.Renderers.Impl {
[NUnit.Framework.Category("IntegrationTest")]
@@ -189,5 +191,19 @@ public virtual void ImageWithPreserveAspectRatioXMaxYMaxTest() {
public virtual void ImageRenderingTest() {
ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "image-rendering", properties);
}
+
+ [NUnit.Framework.Test]
+ //TODO DEVSIX-8769: adapt after supporting
+ [LogMessage(SvgLogMessageConstant.UNMAPPED_TAG)]
+ public virtual void ImageWithDescriptionsTest() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "image-descriptions", properties);
+ }
+
+ //TODO DEVSIX-4589: update after supporting
+ //TODO DEVSIX-4901: update after supporting
+ [NUnit.Framework.Test]
+ public virtual void ImageBase64WithUrlTest() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "base64Image", properties);
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest.cs
index f9d73516ab..85ca20abbe 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest.cs
@@ -541,5 +541,115 @@ public virtual void HrefBasicReferenceTest() {
public virtual void TransitiveHrefBasicReferenceTest() {
ConvertAndCompare(sourceFolder, destinationFolder, "transitiveHrefBasicReference");
}
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHref");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlink3StopsTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHref3Stops");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkGradientTransformTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefGradientTransform");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkNegativeOffsetTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefNegativeOffset");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkNegativeOpacityTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefNegativeOpacity");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkOpacityTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefOpacity");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkOpacity2Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefOpacity2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkSpreadMethodTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefSpreadMethod1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkSpreadMethod2Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefSpreadMethod2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkSpreadMethod3Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefSpreadMethod3");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHrefXYvalsTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefXYvals1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHrefXYvals2Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefXYvals2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHrefXYvals3Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefXYvals3");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHreOffsetSwapTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHreOffsetSwap");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradTransitiveHrefOpacityTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradTransitiveHrefOpacity");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradTransitiveHrefNegativeOpacityTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradTransitiveHrefNegativeOpacity");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradTransitiveHrefNegativeOffsetTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradTransitiveHrefNegativeOffset");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradTransitiveHref3stopsTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradTransitiveHref3stops");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradHrefTransitiveSpreadMethodTopLayerTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefTransitiveSpreadMethodTopLayer");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradHrefTransitiveSpreadMethodBottomLayerTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefTransitiveSpreadMethodBottomLayer");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradHrefTransitiveSpreadMethod3Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefTransitiveSpreadMethod3");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradHrefTransitiveSpreadMethod2Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "linearGradHrefTransitiveSpreadMethod2");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/PathSvgNodeRendererTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/PathSvgNodeRendererTest.cs
index 4d4d7415e4..b0a3ed8c6a 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/PathSvgNodeRendererTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/PathSvgNodeRendererTest.cs
@@ -30,6 +30,7 @@ You should have received a copy of the GNU Affero General Public License
using iText.StyledXmlParser.Node;
using iText.StyledXmlParser.Node.Impl.Jsoup;
using iText.Svg.Exceptions;
+using iText.Svg.Processors;
using iText.Svg.Processors.Impl;
using iText.Svg.Renderers;
using iText.Test;
@@ -43,11 +44,18 @@ public class PathSvgNodeRendererTest : SvgIntegrationTest {
public static readonly String destinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ "/test/itext/svg/renderers/impl/PathSvgNodeRendererTest/";
+ private ISvgConverterProperties properties;
+
[NUnit.Framework.OneTimeSetUp]
public static void BeforeClass() {
ITextTest.CreateDestinationFolder(destinationFolder);
}
+ [NUnit.Framework.SetUp]
+ public virtual void Before() {
+ properties = new SvgConverterProperties().SetBaseUri(sourceFolder);
+ }
+
[NUnit.Framework.Test]
public virtual void PathNodeRendererMoveToTest() {
String filename = "pathNodeRendererMoveToTest.pdf";
@@ -361,5 +369,65 @@ public virtual void PathHOperatorAbsoluteAfterMultiplePairsTest() {
public virtual void PathHOperatorRelativeAfterMultiplePairsTest() {
ConvertAndCompare(sourceFolder, destinationFolder, "pathHOperatorRelativeAfterMultiplePairs");
}
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHref");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPatternContentUnits1Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefPatternContentUnits1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPatternContentUnits2Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefPatternContentUnits2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPatternUnitsTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefPatternUnits");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPreserveAR1Test() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "patternHrefPreserveAR1", properties);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPreserveAR2Test() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "patternHrefPreserveAR2", properties);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternHrefTransitivePatternUnitsTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefTransitivePatternUnits");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternHrefTransitivePCUTopLayerTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefTransitivePCUTopLayer");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternHrefTransitivePCUBottomLayerTest() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefTransitivePCUBottomLayer");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternHrefTransitivePCU2Test() {
+ ConvertAndCompare(sourceFolder, destinationFolder, "patternHrefTransitivePCU2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternHrefTransitivePresAR1Test() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "patternHrefTransitivePresAR1", properties);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternHrefTransitivePresAR2Test() {
+ ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "patternHrefTransitivePresAR2", properties);
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest.cs
new file mode 100644
index 0000000000..bef6eb2a64
--- /dev/null
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest.cs
@@ -0,0 +1,47 @@
+/*
+This file is part of the iText (R) project.
+Copyright (c) 1998-2024 Apryse Group NV
+Authors: Apryse 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 .
+*/
+using System;
+using iText.Svg.Renderers;
+using iText.Test;
+
+namespace iText.Svg.Renderers.Impl {
+ [NUnit.Framework.Category("IntegrationTest")]
+ public class RadialGradientSvgNodeRendererTest : SvgIntegrationTest {
+ public static readonly String sourceFolder = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
+ .CurrentContext.TestDirectory) + "/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/";
+
+ public static readonly String destinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory
+ + "/test/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/";
+
+ [NUnit.Framework.OneTimeSetUp]
+ public static void BeforeClass() {
+ ITextTest.CreateOrClearDestinationFolder(destinationFolder);
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void RadialGradientBasicTest() {
+ //TODO DEVSIX-4396: update after supporting
+ ConvertAndCompare(sourceFolder, destinationFolder, "radialGradientBasic");
+ }
+ }
+}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest.cs
index d3cc289da8..1cb23e444d 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest.cs
@@ -267,8 +267,14 @@ public virtual void YWithoutXTest() {
}
[NUnit.Framework.Test]
- public virtual void NegativeAbsoluteAndRelativePositionTest() {
+ public virtual void AbsoluteAndRelativePositionTest() {
// TODO DEVSIX-2507 support x, y, dx, dy attributes
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "absoluteAndRelativePosition");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void NegativeAbsoluteAndRelativePositionTest() {
+ // TODO DEVSIX-2507 support x, y, dx, dy attributes, handle whitespaces
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "negativeAbsoluteAndRelativePosition");
}
@@ -277,5 +283,28 @@ public virtual void NoPositionAfterRelativeTest() {
// TODO DEVSIX-2507 support x, y, dx, dy attributes
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "noPositionAfterRelative");
}
+
+ [NUnit.Framework.Test]
+ public virtual void NestedPositioningTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedPositioningTest");
+ }
+
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void TextDecorationTspanTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textDecorationTspan");
+ }
+
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void TextDecorationTspanSubTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textDecorationTspanSub");
+ }
+
+ //TODO DEVSIX-2507: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ public virtual void TspanFillTest() {
+ ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "tspanFill");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ViewBoxSvgTagSvgNodeRendererIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ViewBoxSvgTagSvgNodeRendererIntegrationTest.cs
index 9e59da0ea7..546c6ebcdb 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ViewBoxSvgTagSvgNodeRendererIntegrationTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/ViewBoxSvgTagSvgNodeRendererIntegrationTest.cs
@@ -87,7 +87,6 @@ public virtual void ViewBox400x200() {
[NUnit.Framework.Test]
public virtual void ViewBoxXYValuesPreserveAspectRatioNoneValues() {
- //TODO (DEVSIX-3493) change cmp files after fix
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "viewBoxXYValuesPreserveAspectRatioNoneValues"
);
}
diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/XLinkDataTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/XLinkDataTest.cs
index 8e1ff271ba..18f9017484 100644
--- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/XLinkDataTest.cs
+++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/XLinkDataTest.cs
@@ -21,6 +21,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
using System;
+using iText.Svg.Logs;
using iText.Svg.Renderers;
using iText.Test;
using iText.Test.Attributes;
@@ -50,5 +51,112 @@ public virtual void CorrectImageWithDataTest() {
public virtual void IncorrectImageWithDataTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "incorrectImageWithData");
}
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHref");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlink3StopsTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHref3Stops");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkGradientTransformTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefGradientTransform");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkNegativeOffsetTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefNegativeOffset");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkNegativeOpacityTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefNegativeOpacity");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkOpacityTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefOpacity");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkOpacity2Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefOpacity2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkSpreadMethodTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefSpreadMethod1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkSpreadMethod2Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefSpreadMethod2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkSpreadMethod3Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefSpreadMethod3");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHrefXYvalsTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefXYvals1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHrefXYvals2Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefXYvals2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHrefXYvals3Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHrefXYvals3");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void LinearGradXlinkHreOffsetSwapTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linearGradXlinkHreOffsetSwap");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "patternXlinkHref");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPatternContentUnits1Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "patternXlinkHrefPatternContentUnits1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPatternContentUnits2Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "patternXlinkHrefPatternContentUnits2");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPatternUnitsTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "patternXlinkHrefPatternUnits");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPreserveAR1Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "patternXlinkHrefPreserveAR1");
+ }
+
+ [NUnit.Framework.Test]
+ public virtual void PatternXlinkHrefPreserveAR2Test() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "patternXlinkHrefPreserveAR2");
+ }
+
+ //TODO DEVSIX-2255: Update cmp file after supporting
+ [NUnit.Framework.Test]
+ [LogMessage(SvgLogMessageConstant.UNMAPPED_TAG)]
+ public virtual void TextPathXlinkTest() {
+ ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "textPathXrefHref");
+ }
}
}
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/converter/SvgConverterTest/descriptions.svg b/itext.tests/itext.svg.tests/resources/itext/svg/converter/SvgConverterTest/descriptions.svg
new file mode 100644
index 0000000000..c79b29d4f6
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/converter/SvgConverterTest/descriptions.svg
@@ -0,0 +1,11 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/BaselineTest/cmp_dominant-baseline-tspan.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/BaselineTest/cmp_dominant-baseline-tspan.pdf
new file mode 100644
index 0000000000..8f12217b47
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/BaselineTest/cmp_dominant-baseline-tspan.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/BaselineTest/dominant-baseline-tspan.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/BaselineTest/dominant-baseline-tspan.svg
new file mode 100644
index 0000000000..7b1f5a3031
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/BaselineTest/dominant-baseline-tspan.svg
@@ -0,0 +1,19 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/DefaultInheritance/cmp_usePropertiesInheritance.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/DefaultInheritance/cmp_usePropertiesInheritance.pdf
index c05db79c9c..8618c09a55 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/css/DefaultInheritance/cmp_usePropertiesInheritance.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/css/DefaultInheritance/cmp_usePropertiesInheritance.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/cmp_font-size-adjust-tspan.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/cmp_font-size-adjust-tspan.pdf
new file mode 100644
index 0000000000..0875e4b2f7
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/cmp_font-size-adjust-tspan.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/cmp_font-stretch-tspan.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/cmp_font-stretch-tspan.pdf
new file mode 100644
index 0000000000..0c2624d7d3
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/cmp_font-stretch-tspan.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/font-size-adjust-tspan.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/font-size-adjust-tspan.svg
new file mode 100644
index 0000000000..af4ff946f7
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/font-size-adjust-tspan.svg
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/font-stretch-tspan.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/font-stretch-tspan.svg
new file mode 100644
index 0000000000..15c1310bdd
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontAttributesTest/font-stretch-tspan.svg
@@ -0,0 +1,21 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontRelativeUnitTest/cmp_textFontSizeInheritanceFromUseTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontRelativeUnitTest/cmp_textFontSizeInheritanceFromUseTest.pdf
index fe5a914797..7ec840b308 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontRelativeUnitTest/cmp_textFontSizeInheritanceFromUseTest.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontRelativeUnitTest/cmp_textFontSizeInheritanceFromUseTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/ImportRuleTest/cmp_mediaQueryPrint.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/ImportRuleTest/cmp_mediaQueryPrint.pdf
new file mode 100644
index 0000000000..83935a88a8
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/ImportRuleTest/cmp_mediaQueryPrint.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/ImportRuleTest/mediaQueryPrint.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/ImportRuleTest/mediaQueryPrint.svg
new file mode 100644
index 0000000000..cb3b9467a8
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/ImportRuleTest/mediaQueryPrint.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryColor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryColor.pdf
new file mode 100644
index 0000000000..d95f90a8d4
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryColor.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryColorGamut.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryColorGamut.pdf
new file mode 100644
index 0000000000..1a7348601f
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryColorGamut.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryDisplayBrowser.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryDisplayBrowser.pdf
new file mode 100644
index 0000000000..b81b1d01ee
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryDisplayBrowser.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryHeight.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryHeight.pdf
new file mode 100644
index 0000000000..2d6f0713f9
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryHeight.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMaxHeight.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMaxHeight.pdf
new file mode 100644
index 0000000000..3bbaa8c50c
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMaxHeight.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMaxWidth.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMaxWidth.pdf
new file mode 100644
index 0000000000..25d03e4ae2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMaxWidth.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinColor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinColor.pdf
new file mode 100644
index 0000000000..3b6006dfc7
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinColor.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinHeight.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinHeight.pdf
new file mode 100644
index 0000000000..0e6afa7424
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinHeight.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinWidth.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinWidth.pdf
new file mode 100644
index 0000000000..25d03e4ae2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinWidth.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinWidth2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinWidth2.pdf
new file mode 100644
index 0000000000..25d03e4ae2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryMinWidth2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryNot.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryNot.pdf
new file mode 100644
index 0000000000..17e1c5564a
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryNot.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOnly.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOnly.pdf
new file mode 100644
index 0000000000..5b86fe7298
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOnly.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOnlyAnd.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOnlyAnd.pdf
new file mode 100644
index 0000000000..51acf4452f
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOnlyAnd.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOrientationLandscape.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOrientationLandscape.pdf
new file mode 100644
index 0000000000..25d03e4ae2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOrientationLandscape.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOrientationPortrait.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOrientationPortrait.pdf
new file mode 100644
index 0000000000..25d03e4ae2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOrientationPortrait.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOverflowBlock.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOverflowBlock.pdf
new file mode 100644
index 0000000000..d140041b0e
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOverflowBlock.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOverflowInline.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOverflowInline.pdf
new file mode 100644
index 0000000000..ba6c5bff82
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryOverflowInline.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryPrint.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryPrint.pdf
new file mode 100644
index 0000000000..25ae974cbf
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryPrint.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryRatio.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryRatio.pdf
new file mode 100644
index 0000000000..904951dc24
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryRatio.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryRatioSingleVal.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryRatioSingleVal.pdf
new file mode 100644
index 0000000000..6d988d2aac
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryRatioSingleVal.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryResolution.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryResolution.pdf
new file mode 100644
index 0000000000..a622d6e329
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryResolution.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryScreen.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryScreen.pdf
new file mode 100644
index 0000000000..fdf6cd9544
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryScreen.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryWidth.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryWidth.pdf
new file mode 100644
index 0000000000..416b868000
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/cmp_mediaQueryWidth.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryColor.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryColor.svg
new file mode 100644
index 0000000000..5acb201bcc
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryColor.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryColorGamut.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryColorGamut.svg
new file mode 100644
index 0000000000..14f4d3a27a
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryColorGamut.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryDisplayBrowser.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryDisplayBrowser.svg
new file mode 100644
index 0000000000..3d19ea174d
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryDisplayBrowser.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryHeight.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryHeight.svg
new file mode 100644
index 0000000000..0077f9f756
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryHeight.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMaxHeight.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMaxHeight.svg
new file mode 100644
index 0000000000..be6396ec91
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMaxHeight.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMaxWidth.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMaxWidth.svg
new file mode 100644
index 0000000000..f428fb0350
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMaxWidth.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinColor.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinColor.svg
new file mode 100644
index 0000000000..a7ced4a704
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinColor.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinHeight.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinHeight.svg
new file mode 100644
index 0000000000..1254717ee2
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinHeight.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinWidth.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinWidth.svg
new file mode 100644
index 0000000000..c64dfa05d0
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinWidth.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinWidth2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinWidth2.svg
new file mode 100644
index 0000000000..c37ea235b4
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryMinWidth2.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryNot.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryNot.svg
new file mode 100644
index 0000000000..62b3f3a3cf
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryNot.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOnly.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOnly.svg
new file mode 100644
index 0000000000..e461cbd3a8
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOnly.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOnlyAnd.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOnlyAnd.svg
new file mode 100644
index 0000000000..7cdb176108
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOnlyAnd.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOrientationLandscape.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOrientationLandscape.svg
new file mode 100644
index 0000000000..fc0d123a08
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOrientationLandscape.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOrientationPortrait.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOrientationPortrait.svg
new file mode 100644
index 0000000000..d1874dce20
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOrientationPortrait.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOverflowBlock.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOverflowBlock.svg
new file mode 100644
index 0000000000..50aed2df5f
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOverflowBlock.svg
@@ -0,0 +1,15 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOverflowInline.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOverflowInline.svg
new file mode 100644
index 0000000000..140cc4c891
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryOverflowInline.svg
@@ -0,0 +1,15 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryPrint.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryPrint.svg
new file mode 100644
index 0000000000..34e1949825
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryPrint.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryRatio.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryRatio.svg
new file mode 100644
index 0000000000..14cc351e7b
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryRatio.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryRatioSingleVal.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryRatioSingleVal.svg
new file mode 100644
index 0000000000..b012c44cb4
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryRatioSingleVal.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryResolution.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryResolution.svg
new file mode 100644
index 0000000000..0d91326063
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryResolution.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryScreen.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryScreen.svg
new file mode 100644
index 0000000000..7c8b590c55
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryScreen.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryWidth.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryWidth.svg
new file mode 100644
index 0000000000..43bbc3b5c8
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/MediaTest/mediaQueryWidth.svg
@@ -0,0 +1,14 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/cmp_opacityPaths.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/cmp_opacityPaths.pdf
new file mode 100644
index 0000000000..86343e1f56
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/cmp_opacityPaths.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/cmp_opacityShapes.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/cmp_opacityShapes.pdf
new file mode 100644
index 0000000000..c06105d0e5
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/cmp_opacityShapes.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/opacityPaths.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/opacityPaths.svg
new file mode 100644
index 0000000000..246914679a
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/opacityPaths.svg
@@ -0,0 +1,38 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/opacityShapes.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/opacityShapes.svg
new file mode 100644
index 0000000000..ff8ba7d1b5
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/OpacityTest/opacityShapes.svg
@@ -0,0 +1,38 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText1.pdf
index 51a43e0af6..6f4a3e7bcd 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText1.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText2.pdf
index 0122f6a001..c78f932c5d 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText2.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_googleFontsTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_googleFontsTest.pdf
index 77baee8ba3..c394316122 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_googleFontsTest.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_googleFontsTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_height-width-style.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_height-width-style.pdf
new file mode 100644
index 0000000000..f9a2eadfc0
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_height-width-style.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_internalCssNoOverlap.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_internalCssNoOverlap.pdf
new file mode 100644
index 0000000000..04d79c09c2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_internalCssNoOverlap.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/height-width-style.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/height-width-style.svg
new file mode 100644
index 0000000000..02937b0464
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/height-width-style.svg
@@ -0,0 +1,35 @@
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/internalCssNoOverlap.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/internalCssNoOverlap.svg
new file mode 100644
index 0000000000..e3b9628a68
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/internalCssNoOverlap.svg
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+SVG demonstration
+Mozilla CSS Getting Started - SVG demonstration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SVG demonstration
+
+ Move your mouse pointer over the flower.
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/GoogleChartsTest/cmp_calendarChart.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/GoogleChartsTest/cmp_calendarChart.pdf
index 0dfd6f276d..b031b303a3 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/GoogleChartsTest/cmp_calendarChart.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/GoogleChartsTest/cmp_calendarChart.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/WordTreesChartsTest/cmp_wordTrees4Chart.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/WordTreesChartsTest/cmp_wordTrees4Chart.pdf
index cbec3fa7ea..90063a93c8 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/WordTreesChartsTest/cmp_wordTrees4Chart.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/googlecharts/WordTreesChartsTest/cmp_wordTrees4Chart.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceTtcTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceTtcTest.pdf
index 8f31345d88..98bb3d5bdb 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceTtcTest.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceTtcTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceWoff2TtcTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceWoff2TtcTest.pdf
index 0134c8a6bb..f161d68133 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceWoff2TtcTest.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_fontFaceWoff2TtcTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest01.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest01.pdf
index 405dda4d52..da4410322b 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest01.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest01.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest02.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest02.pdf
index acd89ea1c2..1f0eb00267 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest02.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest02.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest03.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest03.pdf
index 331463ecb0..5deec023be 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest03.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_incorrectFontNameTest03.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_unicodeRangeTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_unicodeRangeTest.pdf
index 0f94beced7..e5490a7618 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_unicodeRangeTest.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_unicodeRangeTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest01.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest01.pdf
index dbb97d87b3..c50b2f76eb 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest01.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest01.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest03.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest03.pdf
index fd0aa43a60..cf6cc04113 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest03.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest03.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest04.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest04.pdf
index 92e54922c8..160523ef66 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest04.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest04.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest05.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest05.pdf
index 6e9d13d392..bf4f66cffb 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest05.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest05.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest06.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest06.pdf
index 78f5dbc5db..7c00a54ad5 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest06.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/processors/impl/font/FontFaceTest/cmp_w3cProblemTest06.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/clipPathUrl2ndLevel.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/clipPathUrl2ndLevel.svg
new file mode 100644
index 0000000000..a60fe68d58
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/clipPathUrl2ndLevel.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/clipPathUrlTopLevel.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/clipPathUrlTopLevel.svg
new file mode 100644
index 0000000000..d7a7c3c989
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/clipPathUrlTopLevel.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/cmp_clipPathUrl2ndLevel.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/cmp_clipPathUrl2ndLevel.pdf
new file mode 100644
index 0000000000..f33cbf0b96
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/cmp_clipPathUrl2ndLevel.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/cmp_clipPathUrlTopLevel.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/cmp_clipPathUrlTopLevel.pdf
new file mode 100644
index 0000000000..b073de52dd
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ClipPathTest/cmp_clipPathUrlTopLevel.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/FillTest/cmp_fillLinkToNonExistingGradient.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/FillTest/cmp_fillLinkToNonExistingGradient.pdf
new file mode 100644
index 0000000000..ab0806a1e2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/FillTest/cmp_fillLinkToNonExistingGradient.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/FillTest/fillLinkToNonExistingGradient.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/FillTest/fillLinkToNonExistingGradient.svg
new file mode 100644
index 0000000000..3e9b91ba37
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/FillTest/fillLinkToNonExistingGradient.svg
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/base64Image.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/base64Image.svg
new file mode 100644
index 0000000000..7dfaea17db
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/base64Image.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/cmp_base64Image.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/cmp_base64Image.pdf
new file mode 100644
index 0000000000..bdff20f3be
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/cmp_base64Image.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/cmp_image-descriptions.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/cmp_image-descriptions.pdf
new file mode 100644
index 0000000000..99cc55eb2b
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/cmp_image-descriptions.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/image-descriptions.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/image-descriptions.svg
new file mode 100644
index 0000000000..9f532a642c
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/ImageSvgNodeRendererTest/image-descriptions.svg
@@ -0,0 +1,11 @@
+
+
+ Star image title
+
+ This is a description of the star image in a desc tag.
+
+
+ This description inside the aria-describedby will take precedent over desc tag description.
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHreOffsetSwap.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHreOffsetSwap.pdf
new file mode 100644
index 0000000000..bac5a2721f
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHreOffsetSwap.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHref.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHref.pdf
new file mode 100644
index 0000000000..31a4272cd9
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHref.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHref3Stops.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHref3Stops.pdf
new file mode 100644
index 0000000000..5371b6f1f7
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHref3Stops.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefGradientTransform.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefGradientTransform.pdf
new file mode 100644
index 0000000000..32c8484588
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefGradientTransform.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefNegativeOffset.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefNegativeOffset.pdf
new file mode 100644
index 0000000000..096a59cfea
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefNegativeOffset.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefNegativeOpacity.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefNegativeOpacity.pdf
new file mode 100644
index 0000000000..506adf5edc
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefNegativeOpacity.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefOpacity.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefOpacity.pdf
new file mode 100644
index 0000000000..01b3b7a02b
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefOpacity.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefOpacity2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefOpacity2.pdf
new file mode 100644
index 0000000000..9b1926bb38
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefOpacity2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod1.pdf
new file mode 100644
index 0000000000..45e9dcfdba
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod2.pdf
new file mode 100644
index 0000000000..689d36e72f
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod3.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod3.pdf
new file mode 100644
index 0000000000..4007600eaa
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefSpreadMethod3.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethod2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethod2.pdf
new file mode 100644
index 0000000000..835df52c13
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethod2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethod3.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethod3.pdf
new file mode 100644
index 0000000000..b5c95062aa
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethod3.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethodBottomLayer.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethodBottomLayer.pdf
new file mode 100644
index 0000000000..c64ce7e049
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethodBottomLayer.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethodTopLayer.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethodTopLayer.pdf
new file mode 100644
index 0000000000..5fbd469fbe
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefTransitiveSpreadMethodTopLayer.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals1.pdf
new file mode 100644
index 0000000000..2b558f1715
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals2.pdf
new file mode 100644
index 0000000000..b2856cfbe9
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals3.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals3.pdf
new file mode 100644
index 0000000000..4d7ff518b0
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradHrefXYvals3.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHref3stops.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHref3stops.pdf
new file mode 100644
index 0000000000..2042f383e6
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHref3stops.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefNegativeOffset.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefNegativeOffset.pdf
new file mode 100644
index 0000000000..831ce792b6
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefNegativeOffset.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefNegativeOpacity.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefNegativeOpacity.pdf
new file mode 100644
index 0000000000..03d3eda454
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefNegativeOpacity.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefOpacity.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefOpacity.pdf
new file mode 100644
index 0000000000..5d81da8043
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_linearGradTransitiveHrefOpacity.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_textDxTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_textDxTest.pdf
index c26aee9abc..b07712c05c 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_textDxTest.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/cmp_textDxTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHreOffsetSwap.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHreOffsetSwap.svg
new file mode 100644
index 0000000000..522a14dae3
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHreOffsetSwap.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHref.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHref.svg
new file mode 100644
index 0000000000..1ebbc21360
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHref.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHref3Stops.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHref3Stops.svg
new file mode 100644
index 0000000000..5ddfa460c6
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHref3Stops.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefGradientTransform.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefGradientTransform.svg
new file mode 100644
index 0000000000..fdbeff3acd
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefGradientTransform.svg
@@ -0,0 +1,12 @@
+
+
+ >
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefNegativeOffset.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefNegativeOffset.svg
new file mode 100644
index 0000000000..2029a59105
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefNegativeOffset.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefNegativeOpacity.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefNegativeOpacity.svg
new file mode 100644
index 0000000000..dbf667930a
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefNegativeOpacity.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefOpacity.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefOpacity.svg
new file mode 100644
index 0000000000..7369fb9f83
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefOpacity.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefOpacity2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefOpacity2.svg
new file mode 100644
index 0000000000..cabaa04187
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefOpacity2.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod1.svg
new file mode 100644
index 0000000000..273055d38a
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod1.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod2.svg
new file mode 100644
index 0000000000..e11224274d
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod2.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod3.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod3.svg
new file mode 100644
index 0000000000..e59c572bde
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefSpreadMethod3.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethod2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethod2.svg
new file mode 100644
index 0000000000..1d0086b8c7
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethod2.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethod3.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethod3.svg
new file mode 100644
index 0000000000..94f45a93e2
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethod3.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethodBottomLayer.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethodBottomLayer.svg
new file mode 100644
index 0000000000..d56eb272db
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethodBottomLayer.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethodTopLayer.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethodTopLayer.svg
new file mode 100644
index 0000000000..5a41ccda2c
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefTransitiveSpreadMethodTopLayer.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals1.svg
new file mode 100644
index 0000000000..f02b87c88f
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals1.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals2.svg
new file mode 100644
index 0000000000..fb7753349f
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals2.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals3.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals3.svg
new file mode 100644
index 0000000000..d4a185f964
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradHrefXYvals3.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHref3stops.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHref3stops.svg
new file mode 100644
index 0000000000..51455f8206
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHref3stops.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefNegativeOffset.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefNegativeOffset.svg
new file mode 100644
index 0000000000..7c51efd045
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefNegativeOffset.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefNegativeOpacity.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefNegativeOpacity.svg
new file mode 100644
index 0000000000..1585c4f79f
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefNegativeOpacity.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefOpacity.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefOpacity.svg
new file mode 100644
index 0000000000..90c4805ab9
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/LinearGradientSvgNodeRendererTest/linearGradTransitiveHrefOpacity.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/MarkerSvgNodeRendererIntegrationTest/cmp_markerPathRefXRefYNoAspectRatioPreservation.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/MarkerSvgNodeRendererIntegrationTest/cmp_markerPathRefXRefYNoAspectRatioPreservation.pdf
index 89a3c75408..bb928f252d 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/MarkerSvgNodeRendererIntegrationTest/cmp_markerPathRefXRefYNoAspectRatioPreservation.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/MarkerSvgNodeRendererIntegrationTest/cmp_markerPathRefXRefYNoAspectRatioPreservation.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHref.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHref.pdf
new file mode 100644
index 0000000000..20359353a2
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHref.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternContentUnits1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternContentUnits1.pdf
new file mode 100644
index 0000000000..c8f261e6f0
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternContentUnits1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternContentUnits2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternContentUnits2.pdf
new file mode 100644
index 0000000000..fbcfcc8c67
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternContentUnits2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternUnits.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternUnits.pdf
new file mode 100644
index 0000000000..a4602d5baa
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPatternUnits.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPreserveAR1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPreserveAR1.pdf
new file mode 100644
index 0000000000..0d6093762a
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPreserveAR1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPreserveAR2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPreserveAR2.pdf
new file mode 100644
index 0000000000..9f3e2def1b
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefPreserveAR2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCU2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCU2.pdf
new file mode 100644
index 0000000000..9a3dd1061c
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCU2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCUBottomLayer.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCUBottomLayer.pdf
new file mode 100644
index 0000000000..e9d5e12a42
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCUBottomLayer.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCUTopLayer.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCUTopLayer.pdf
new file mode 100644
index 0000000000..91a25f6c84
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePCUTopLayer.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePatternUnits.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePatternUnits.pdf
new file mode 100644
index 0000000000..09f18fc364
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePatternUnits.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePresAR1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePresAR1.pdf
new file mode 100644
index 0000000000..90e546b3fb
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePresAR1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePresAR2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePresAR2.pdf
new file mode 100644
index 0000000000..06832e0291
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/cmp_patternHrefTransitivePresAR2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHref.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHref.svg
new file mode 100644
index 0000000000..1eea3f22a6
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHref.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternContentUnits1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternContentUnits1.svg
new file mode 100644
index 0000000000..8e79cd6de0
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternContentUnits1.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternContentUnits2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternContentUnits2.svg
new file mode 100644
index 0000000000..415875387d
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternContentUnits2.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternUnits.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternUnits.svg
new file mode 100644
index 0000000000..285ffd4044
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPatternUnits.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPreserveAR1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPreserveAR1.svg
new file mode 100644
index 0000000000..fdc9967c53
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPreserveAR1.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPreserveAR2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPreserveAR2.svg
new file mode 100644
index 0000000000..fd2b61a972
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefPreserveAR2.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCU2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCU2.svg
new file mode 100644
index 0000000000..c9a629b5f8
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCU2.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCUBottomLayer.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCUBottomLayer.svg
new file mode 100644
index 0000000000..a1b949aec9
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCUBottomLayer.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCUTopLayer.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCUTopLayer.svg
new file mode 100644
index 0000000000..cb9f23b436
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePCUTopLayer.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePatternUnits.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePatternUnits.svg
new file mode 100644
index 0000000000..c0765ee1ba
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePatternUnits.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePresAR1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePresAR1.svg
new file mode 100644
index 0000000000..cfdac03b0b
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePresAR1.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePresAR2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePresAR2.svg
new file mode 100644
index 0000000000..f9a5815e55
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/patternHrefTransitivePresAR2.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/star.jpg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/star.jpg
new file mode 100644
index 0000000000..c2557e3476
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PathSvgNodeRendererTest/star.jpg differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/cmp_radialGradientBasic.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/cmp_radialGradientBasic.pdf
new file mode 100644
index 0000000000..7102bc5e08
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/cmp_radialGradientBasic.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/radialGradientBasic.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/radialGradientBasic.svg
new file mode 100644
index 0000000000..757044443a
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RadialGradientSvgNodeRendererTest/radialGradientBasic.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsBasic.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsBasic.pdf
new file mode 100644
index 0000000000..fc7d821c8d
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsBasic.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsBasic2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsBasic2.pdf
new file mode 100644
index 0000000000..ab8fec65a4
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsBasic2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValues.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValues.pdf
new file mode 100644
index 0000000000..6851c60e67
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValues.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValuesNoX.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValuesNoX.pdf
new file mode 100644
index 0000000000..765771c0ed
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValuesNoX.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValuesNoY.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValuesNoY.pdf
new file mode 100644
index 0000000000..33be1a1c9d
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/cmp_relativePositionsListValuesNoY.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsBasic.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsBasic.svg
new file mode 100644
index 0000000000..69d0660718
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsBasic.svg
@@ -0,0 +1,8 @@
+
+
+
+ No attributes set
+ Only x=20 and y=50
+ Only dx=10 and dy=20
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsBasic2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsBasic2.svg
new file mode 100644
index 0000000000..f1372b6af8
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsBasic2.svg
@@ -0,0 +1,9 @@
+
+
+
+ All attr are set: x=0, dx=20, y=20 and dy=25
+ x=0 and dy=25
+ x=0, dx=20 and y=90
+ dx=20 and y=100
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValues.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValues.svg
new file mode 100644
index 0000000000..b97a824174
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValues.svg
@@ -0,0 +1,8 @@
+
+
+
+ Multiple dx values
+ Multiple dy values
+ Multiple dx and dy values
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValuesNoX.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValuesNoX.svg
new file mode 100644
index 0000000000..44840bb2e5
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValuesNoX.svg
@@ -0,0 +1,8 @@
+
+
+
+ Multiple dx values; no x
+ Multiple dy values; no x
+ Multiple dx and dy values; no x
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValuesNoY.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValuesNoY.svg
new file mode 100644
index 0000000000..f5f02c1174
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RelativePositionsTest/relativePositionsListValuesNoY.svg
@@ -0,0 +1,8 @@
+
+
+
+ Multiple dx values; no y
+ Multiple dy values; no y
+ Multiple dx and dy values; no y
+
+
\ No newline at end of file
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/viewbox/cmp_viewBoxXYValuesPreserveAspectRatioNoneValues.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/viewbox/cmp_viewBoxXYValuesPreserveAspectRatioNoneValues.pdf
index 5ab3eb43e9..7b7d6a9a55 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/viewbox/cmp_viewBoxXYValuesPreserveAspectRatioNoneValues.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/viewbox/cmp_viewBoxXYValuesPreserveAspectRatioNoneValues.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/cmp_strokeText.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/cmp_strokeText.pdf
new file mode 100644
index 0000000000..6f228efa99
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/cmp_strokeText.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/cmp_strokeTspan.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/cmp_strokeTspan.pdf
new file mode 100644
index 0000000000..68b1d44ab4
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/cmp_strokeTspan.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/strokeText.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/strokeText.svg
new file mode 100644
index 0000000000..beaf9b64c0
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/strokeText.svg
@@ -0,0 +1,26 @@
+
+
+ Stroke-width: 4 /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linecap: butt /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linejoin: bevel /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linejoin: miter /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linecap: square /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linecap: round /\/\/ – --- () [] {}
+
+
+ stroke-width: 6; stroke-linejoin: miter; stroke-miterlimit: 1 /\/\/ – --- () [] {}
+
+
+ stroke-width: 6; stroke-linejoin: miter; stroke-miterlimit: 10 /\/\/ – --- () [] {}
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/strokeTspan.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/strokeTspan.svg
new file mode 100644
index 0000000000..8d20a17b52
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/StrokeTest/strokeTspan.svg
@@ -0,0 +1,26 @@
+
+
+ Stroke-width: 4 /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linecap: butt /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linejoin: bevel /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linejoin: miter /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linecap: square /\/\/ – --- () [] {}
+
+
+ stroke-width: 4; stroke-linecap: round /\/\/ – --- () [] {}
+
+
+ stroke-width: 6; stroke-linejoin: miter; stroke-miterlimit: 1 /\/\/ – --- () [] {}
+
+
+ stroke-width: 6; stroke-linejoin: miter; stroke-miterlimit: 10 /\/\/ – --- () [] {}
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/absoluteAndRelativePosition.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/absoluteAndRelativePosition.svg
new file mode 100644
index 0000000000..2b2fb653ee
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/absoluteAndRelativePosition.svg
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ green
+
+
+ orange
+
+
+ red
+
+
+ blue
+
+
+
+
+
+
+
+
+ green
+
+
+ orange
+
+
+ red
+
+
+ blue
+
+
+
+
+
+
+
+
+ green
+
+
+ orange
+
+
+ red
+
+
+ blue
+
+
+
+
+
+
+
+
+ green
+
+
+ orange
+
+
+ red
+
+
+ blue
+
+
+
+
+
+
+
+
+ green
+
+
+ orange
+
+
+ red
+
+
+ blue
+
+
+
+
+
+
+
+
+ green
+
+
+ orange
+
+
+ red
+
+
+ blue
+
+
+
+
+
+
+
+
+ green
+
+ orange
+
+ red
+
+ blue
+
+
+
+
+
+
+
+
+
+
+
+ green
+
+ orange
+
+
+ red
+
+ blue
+
+
+
+
+
+
+
+
+
+
+ green
+
+ orange
+
+
+
+ red
+
+ blue
+
+
+
+
+
+
+
+
+
+ green
+
+ orange
+
+ red
+
+ blue
+
+
+
+
+
+
+
+
+
+
+ Hello,
+ World
+ !
+
+
+
+
+
+
+ Hello,
+ World
+ !
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_absoluteAndRelativePosition.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_absoluteAndRelativePosition.pdf
new file mode 100644
index 0000000000..6cff9f4b5a
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_absoluteAndRelativePosition.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_negativeAbsoluteAndRelativePosition.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_negativeAbsoluteAndRelativePosition.pdf
index 72ed952f59..f5a0fe5e3c 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_negativeAbsoluteAndRelativePosition.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_negativeAbsoluteAndRelativePosition.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_nestedPositioningTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_nestedPositioningTest.pdf
new file mode 100644
index 0000000000..285fb648cf
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_nestedPositioningTest.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textDecorationTspan.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textDecorationTspan.pdf
new file mode 100644
index 0000000000..5c4867f17e
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textDecorationTspan.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textDecorationTspanSub.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textDecorationTspanSub.pdf
new file mode 100644
index 0000000000..2f651fdf12
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textDecorationTspanSub.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textspan-textAnchor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textspan-textAnchor.pdf
index 8c7b62bdc0..ffddef471b 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textspan-textAnchor.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_textspan-textAnchor.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanBasicExample.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanBasicExample.pdf
index a1baa1cf66..2de2e711f3 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanBasicExample.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanBasicExample.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanFill.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanFill.pdf
new file mode 100644
index 0000000000..1ed060dd65
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanFill.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanNestedExample.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanNestedExample.pdf
index 39acd806ff..091fe954db 100644
Binary files a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanNestedExample.pdf and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/cmp_tspanNestedExample.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/negativeAbsoluteAndRelativePosition.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/negativeAbsoluteAndRelativePosition.svg
index f0b50a44dd..502ea4a0d1 100644
--- a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/negativeAbsoluteAndRelativePosition.svg
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/negativeAbsoluteAndRelativePosition.svg
@@ -7,17 +7,9 @@
-
- x="-30"
-
-
- dx="-70" dy="20"
-
-
- x="0" dy="20"
-
-
- dx="-150" dy="20"
-
+ x="-30"
+ dx="-70" dy="20"
+ x="0" dy="20"
+ dx="-150" dy="20"
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/nestedPositioningTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/nestedPositioningTest.svg
new file mode 100644
index 0000000000..d852eb2fa9
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/nestedPositioningTest.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+ x="-30"
+
+ dx="-70" dy="20"
+
+ x="0" dy="20"
+
+
+
+ dx="-150" dy="20"
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/textDecorationTspan.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/textDecorationTspan.svg
new file mode 100644
index 0000000000..6c15e82c3e
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/textDecorationTspan.svg
@@ -0,0 +1,29 @@
+
+
+ Underlined tspan
+
+
+
+ Overlined tspan
+
+
+
+ Line-through tspan
+
+
+
+ Overline and line-through tspan
+
+
+
+ Underline and line-through tspan
+
+
+
+ Underlined and overlined tspan
+
+
+
+ All three applied to tspan
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/textDecorationTspanSub.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/textDecorationTspanSub.svg
new file mode 100644
index 0000000000..ec9da6c81d
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/textDecorationTspanSub.svg
@@ -0,0 +1,29 @@
+
+
+ Underlined tspan
+
+
+
+ Overlined tspan
+
+
+
+ Line-through tspan
+
+
+
+ Overline and line-through tspan
+
+
+
+ Underline and line-through tspan
+
+
+
+ Underlined and overlined tspan
+
+
+
+ All three applied to tspan
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/tspanFill.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/tspanFill.svg
new file mode 100644
index 0000000000..e8529c238d
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/TSpanNodeRendererIntegrationTest/tspanFill.svg
@@ -0,0 +1,21 @@
+
+
+ tspan with red fill
+
+
+
+ tspan with HEX color blue fill
+
+
+
+ tspan with RGB color pink fill
+
+
+
+ tspan with currentColor fill
+
+
+
+ tspan with fill none should not be visible
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic-relative-positions.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic-relative-positions.pdf
new file mode 100644
index 0000000000..0708f8e9f8
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic-relative-positions.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic-tspan.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic-tspan.pdf
new file mode 100644
index 0000000000..8bf58a5bed
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic-tspan.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic.pdf
new file mode 100644
index 0000000000..7a64262b8c
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-basic.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-nested.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-nested.pdf
new file mode 100644
index 0000000000..14e998ce3c
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_white-space-nested.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_whiteSpace.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_whiteSpace.pdf
new file mode 100644
index 0000000000..c443354e32
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/cmp_whiteSpace.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic-relative-positions.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic-relative-positions.svg
new file mode 100644
index 0000000000..2b249d0efc
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic-relative-positions.svg
@@ -0,0 +1,38 @@
+
+
+
+
+
+ 1. white-space: normal. This text has some extra spaces in front which are also ignored by relative positioning.
+
+
+
+ 2. white-space: pre. This text also has extra spaces in front but
+ these do not
+ get ignored by white-space attribute
+
+
+
+ 3. white-space: nowrap. The extra leading spaces are ignored
+ by relative positioning.
+ New line
+ is ignored
+
+
+
+ 4. white-space: pre-wrap. Leading spaces count for relative
+ positioning .
+
+
+
+ 5. white-space: pre-line. The leading spaces will not get ignored for
+ relative
+ positioning.
+
+
+
+ 6. white-space: break-spaces. Here leading spaces are counted
+ for
+ relative positioning
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic-tspan.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic-tspan.svg
new file mode 100644
index 0000000000..6b805628c9
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic-tspan.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+ white-space: normal. This will ignore double spaces and line wrap, and handle it as
+ normal.
+
+
+
+ white-space: pre. This text will keep extra spaces
+ and line
+ breaks
+
+
+
+ white-space: nowrap. This text will
+ ignore
+ line
+ wrap
+
+
+
+ white-space: pre-wrap. This text does keep double spaces
+ and line wrap but will remove end of line spaces
+
+
+
+ white-space: pre-line. This text will not keep extra spaces
+ but will keep
+ line breaks
+
+
+
+ white-space: break-spaces. This text will keep extra spaces
+ and
+ line breaks but will remove end-of-line spaces
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic.svg
new file mode 100644
index 0000000000..013213a0cd
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-basic.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+ white-space: normal. This will ignore double spaces and line wrap, and handle it as
+ normal.
+
+
+
+ white-space: pre. This text will keep extra spaces
+ and line
+ breaks
+
+
+
+ white-space: nowrap. This text will
+ ignore
+ line
+ wrap
+
+
+
+ white-space: pre-wrap. This text does keep double spaces
+ and line wrap but will remove end of line spaces
+
+
+
+ white-space: pre-line. This text will not keep extra spaces
+ but will keep
+ line breaks
+
+
+
+ white-space: break-spaces. This text will keep extra spaces
+ and
+ line breaks but will remove end-of-line spaces
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-nested.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-nested.svg
new file mode 100644
index 0000000000..5b4be52fa4
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/white-space-nested.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+ white-space: normal. Double spaces will be ignored
+ and so are line breaks .
+
+
+
+ white-space: pre. This text will keep extra spaces
+ and line
+ breaks
+
+
+
+ white-space: nowrap. This text will
+ ignore
+ line
+ wrap
+
+
+
+ white-space: pre-wrap. This text does keep double spaces
+ and line wrap but will remove end of line spaces
+
+
+
+ white-space: pre-line. This text will not keep extra spaces
+ but will keep
+ line breaks
+
+
+
+ white-space: break-spaces. This text will keep extra spaces
+ and
+ line breaks but will remove end-of-line spaces
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/whiteSpace.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/whiteSpace.svg
new file mode 100644
index 0000000000..586575ba3f
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/WhiteSpaceTest/whiteSpace.svg
@@ -0,0 +1,14 @@
+
+
+ Spaces are preserved in this text object.
+
+
+
+ Spaces are preserved in this tspan object.
+
+
+
+ Spaces are collapsed in this line of text.
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHreOffsetSwap.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHreOffsetSwap.pdf
new file mode 100644
index 0000000000..64846a6fa1
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHreOffsetSwap.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHref.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHref.pdf
new file mode 100644
index 0000000000..93bbb7c2cf
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHref.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHref3Stops.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHref3Stops.pdf
new file mode 100644
index 0000000000..b90987d9ec
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHref3Stops.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefGradientTransform.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefGradientTransform.pdf
new file mode 100644
index 0000000000..af06387dbd
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefGradientTransform.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefNegativeOffset.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefNegativeOffset.pdf
new file mode 100644
index 0000000000..1fe77c37cb
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefNegativeOffset.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefNegativeOpacity.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefNegativeOpacity.pdf
new file mode 100644
index 0000000000..caef791fe3
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefNegativeOpacity.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefOpacity.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefOpacity.pdf
new file mode 100644
index 0000000000..04ff2a8b71
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefOpacity.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefOpacity2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefOpacity2.pdf
new file mode 100644
index 0000000000..4dab76f89b
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefOpacity2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod1.pdf
new file mode 100644
index 0000000000..3acfdf4869
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod2.pdf
new file mode 100644
index 0000000000..602c10b428
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod3.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod3.pdf
new file mode 100644
index 0000000000..439d7eee21
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefSpreadMethod3.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals1.pdf
new file mode 100644
index 0000000000..5808589987
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals2.pdf
new file mode 100644
index 0000000000..9aa5f0b51e
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals3.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals3.pdf
new file mode 100644
index 0000000000..c62392a12e
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_linearGradXlinkHrefXYvals3.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHref.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHref.pdf
new file mode 100644
index 0000000000..16123b5447
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHref.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternContentUnits1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternContentUnits1.pdf
new file mode 100644
index 0000000000..4a45e62e82
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternContentUnits1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternContentUnits2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternContentUnits2.pdf
new file mode 100644
index 0000000000..a763439cb3
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternContentUnits2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternUnits.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternUnits.pdf
new file mode 100644
index 0000000000..fbff603285
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPatternUnits.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPreserveAR1.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPreserveAR1.pdf
new file mode 100644
index 0000000000..2471df81b5
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPreserveAR1.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPreserveAR2.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPreserveAR2.pdf
new file mode 100644
index 0000000000..5caf730f59
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_patternXlinkHrefPreserveAR2.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_textPathXrefHref.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_textPathXrefHref.pdf
new file mode 100644
index 0000000000..94aef348db
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/cmp_textPathXrefHref.pdf differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHreOffsetSwap.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHreOffsetSwap.svg
new file mode 100644
index 0000000000..4c0707a51a
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHreOffsetSwap.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHref.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHref.svg
new file mode 100644
index 0000000000..5a81f72256
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHref.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHref3Stops.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHref3Stops.svg
new file mode 100644
index 0000000000..3f093694d4
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHref3Stops.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefGradientTransform.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefGradientTransform.svg
new file mode 100644
index 0000000000..2b63841186
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefGradientTransform.svg
@@ -0,0 +1,12 @@
+
+
+ >
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefNegativeOffset.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefNegativeOffset.svg
new file mode 100644
index 0000000000..63c42f11cc
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefNegativeOffset.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefNegativeOpacity.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefNegativeOpacity.svg
new file mode 100644
index 0000000000..e932c9f39e
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefNegativeOpacity.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefOpacity.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefOpacity.svg
new file mode 100644
index 0000000000..786a4dc205
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefOpacity.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefOpacity2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefOpacity2.svg
new file mode 100644
index 0000000000..7bd90b4be1
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefOpacity2.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod1.svg
new file mode 100644
index 0000000000..0ba9bf418e
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod1.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod2.svg
new file mode 100644
index 0000000000..164b206bcf
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod2.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod3.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod3.svg
new file mode 100644
index 0000000000..cdfc46fee0
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefSpreadMethod3.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals1.svg
new file mode 100644
index 0000000000..2422271e1c
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals1.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals2.svg
new file mode 100644
index 0000000000..3473519d84
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals2.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals3.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals3.svg
new file mode 100644
index 0000000000..01982a7fa3
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/linearGradXlinkHrefXYvals3.svg
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHref.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHref.svg
new file mode 100644
index 0000000000..085087c4fe
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHref.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternContentUnits1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternContentUnits1.svg
new file mode 100644
index 0000000000..7a5b1840e5
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternContentUnits1.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternContentUnits2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternContentUnits2.svg
new file mode 100644
index 0000000000..0d378590bf
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternContentUnits2.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternUnits.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternUnits.svg
new file mode 100644
index 0000000000..0c00b7468c
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPatternUnits.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPreserveAR1.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPreserveAR1.svg
new file mode 100644
index 0000000000..e3bd056dfb
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPreserveAR1.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPreserveAR2.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPreserveAR2.svg
new file mode 100644
index 0000000000..c7e6724898
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/patternXlinkHrefPreserveAR2.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/star.jpg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/star.jpg
new file mode 100644
index 0000000000..c2557e3476
Binary files /dev/null and b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/star.jpg differ
diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/textPathXrefHref.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/textPathXrefHref.svg
new file mode 100644
index 0000000000..ac30cac062
--- /dev/null
+++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/XLinkDataTest/textPathXrefHref.svg
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+ Text on path! Text on path! Text on path! Text on path!
+
+
+
diff --git a/itext/itext.layout/itext/layout/properties/RenderingMode.cs b/itext/itext.layout/itext/layout/properties/RenderingMode.cs
index 9e32a9cdb2..70349a67e6 100644
--- a/itext/itext.layout/itext/layout/properties/RenderingMode.cs
+++ b/itext/itext.layout/itext/layout/properties/RenderingMode.cs
@@ -26,6 +26,8 @@ public enum RenderingMode {
/// Default object layout mode
DEFAULT_LAYOUT_MODE,
/// Mode in which objects are processed in accordance with the HTML documentation
- HTML_MODE
+ HTML_MODE,
+ /// Mode in which objects are processed in accordance with the SVG documentation
+ SVG_MODE
}
}
diff --git a/itext/itext.layout/itext/layout/renderer/LineRenderer.cs b/itext/itext.layout/itext/layout/renderer/LineRenderer.cs
index 39af7ad3a4..79e9ccc9a5 100644
--- a/itext/itext.layout/itext/layout/renderer/LineRenderer.cs
+++ b/itext/itext.layout/itext/layout/renderer/LineRenderer.cs
@@ -663,6 +663,7 @@ public override LayoutResult Layout(LayoutContext layoutContext) {
}
if (anythingPlaced || floatsPlacedInLine) {
toProcess.AdjustChildrenYLine().TrimLast();
+ toProcess.AdjustChildrenXLine();
result.SetMinMaxWidth(minMaxWidth);
}
if (wasXOverflowChanged) {
@@ -1627,6 +1628,42 @@ private bool HasInlineBlocksWithVerticalAlignment() {
return false;
}
+ private void AdjustChildrenXLine() {
+ RenderingMode? mode = this.GetProperty(Property.RENDERING_MODE);
+ if (RenderingMode.SVG_MODE != mode) {
+ return;
+ }
+ // LineRenderer first child contains initial x of the occupied area, in order to identify originX we need to
+ // also add relative x position of the first text chunk in the svg which is ParagraphRenderer first child.
+ float originX = (float)GetChildRenderers()[0].GetOccupiedArea().GetBBox().GetLeft() + (float)((TextRenderer
+ )GetParent().GetChildRenderers()[0]).GetPropertyAsFloat(Property.LEFT, 0f);
+ float leftmostX = GetLeftmostX();
+ float xShift = originX - leftmostX;
+ foreach (IRenderer renderer in GetChildRenderers()) {
+ if (renderer is TextRenderer) {
+ renderer.Move(xShift, 0);
+ }
+ }
+ }
+
+ private float GetLeftmostX() {
+ float leftmostX = float.MaxValue;
+ for (int i = 0; i < GetChildRenderers().Count; i++) {
+ IRenderer renderer = GetChildRenderers()[i];
+ if (renderer is TextRenderer) {
+ TextRenderer textRenderer = (TextRenderer)renderer;
+ float x = textRenderer.GetOccupiedArea().GetBBox().GetX();
+ if (textRenderer.IsRelativePosition()) {
+ x += (float)textRenderer.GetPropertyAsFloat(Property.LEFT, 0f);
+ }
+ if (x < leftmostX) {
+ leftmostX = x;
+ }
+ }
+ }
+ return leftmostX;
+ }
+
public class RendererGlyph {
private Glyph glyph;
diff --git a/itext/itext.layout/itext/layout/renderer/TextRenderer.cs b/itext/itext.layout/itext/layout/renderer/TextRenderer.cs
index 01dfaf6544..50efd29514 100644
--- a/itext/itext.layout/itext/layout/renderer/TextRenderer.cs
+++ b/itext/itext.layout/itext/layout/renderer/TextRenderer.cs
@@ -598,7 +598,8 @@ public override LayoutResult Layout(LayoutContext layoutContext) {
isPlacingForcedWhileNothing = true;
}
}
- yLineOffset = FontProgram.ConvertTextSpaceToGlyphSpace(currentLineAscender * fontSize.GetValue());
+ yLineOffset = RenderingMode.SVG_MODE == mode ? 0 : FontProgram.ConvertTextSpaceToGlyphSpace(currentLineAscender
+ * fontSize.GetValue());
occupiedArea.GetBBox().MoveDown(currentLineHeight);
occupiedArea.GetBBox().SetHeight(occupiedArea.GetBBox().GetHeight() + currentLineHeight);
occupiedArea.GetBBox().SetWidth(Math.Max(occupiedArea.GetBBox().GetWidth(), currentLineWidth));
diff --git a/itext/itext.svg/itext/svg/css/impl/SvgNodeRendererInheritanceResolver.cs b/itext/itext.svg/itext/svg/css/impl/SvgNodeRendererInheritanceResolver.cs
index 3ea7e68dfa..75519fa3b8 100644
--- a/itext/itext.svg/itext/svg/css/impl/SvgNodeRendererInheritanceResolver.cs
+++ b/itext/itext.svg/itext/svg/css/impl/SvgNodeRendererInheritanceResolver.cs
@@ -56,6 +56,12 @@ public static void ApplyInheritanceToSubTree(ISvgNodeRenderer root, ISvgNodeRend
ApplyInheritanceToSubTree(subTreeAsBranch, child, cssContext);
}
}
+ if (subTree is TextSvgBranchRenderer) {
+ TextSvgBranchRenderer subTreeAsBranch = (TextSvgBranchRenderer)subTree;
+ foreach (ISvgNodeRenderer child in subTreeAsBranch.GetChildren()) {
+ ApplyInheritanceToSubTree(subTreeAsBranch, child, cssContext);
+ }
+ }
}
private static void ApplyStyles(ISvgNodeRenderer parent, ISvgNodeRenderer child, SvgCssContext cssContext) {
diff --git a/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs b/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs
index dc5a9777c4..04c2779369 100644
--- a/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs
+++ b/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs
@@ -60,13 +60,11 @@ public class SvgDrawContext {
private SvgCssContext cssContext;
- private AffineTransform lastTextTransform;
-
private AffineTransform rootTransform;
private float[] textMove = new float[] { 0.0f, 0.0f };
- private float[] previousElementTextMove;
+ private float[] relativePosition;
/// Create an instance of the context that is used to store information when converting SVG.
///
@@ -149,7 +147,7 @@ public virtual Rectangle GetRootViewPort() {
/// Remove the currently set view box.
public virtual void RemoveCurrentViewPort() {
- if (this.viewports.Count > 0) {
+ if (!this.viewports.IsEmpty()) {
viewports.RemoveFirst();
}
}
@@ -230,25 +228,24 @@ public virtual void RemoveUsedId(String elementId) {
this.useIds.Pop();
}
- /// Get the text transformation that was last applied
+ /// Get the text transformation that was last applied.
///
///
///
/// representing the last text transformation
///
+ [System.ObsoleteAttribute(@"in favour of GetRootTransform()")]
public virtual AffineTransform GetLastTextTransform() {
- if (lastTextTransform == null) {
- lastTextTransform = new AffineTransform();
- }
- return this.lastTextTransform;
+ return new AffineTransform();
}
- /// Set the last text transformation
+ /// Set the last text transformation.
/// last text transformation
+ [System.ObsoleteAttribute(@"in favour of SetRootTransform(iText.Kernel.Geom.AffineTransform)")]
public virtual void SetLastTextTransform(AffineTransform newTransform) {
- this.lastTextTransform = newTransform;
}
+ // Do nothing.
/// Get the current root transformation that was last applied.
///
///
@@ -268,7 +265,7 @@ public virtual void SetRootTransform(AffineTransform newTransform) {
this.rootTransform = newTransform;
}
- /// Get the stored current text move
+ /// Get the stored current text move.
/// [horizontal text move, vertical text move]
public virtual float[] GetTextMove() {
return textMove;
@@ -279,7 +276,7 @@ public virtual void ResetTextMove() {
textMove = new float[] { 0.0f, 0.0f };
}
- /// Increment the stored text move
+ /// Increment the stored text move.
/// horizontal value to add
/// vertical value to add
public virtual void AddTextMove(float additionalMoveX, float additionalMoveY) {
@@ -287,7 +284,7 @@ public virtual void AddTextMove(float additionalMoveX, float additionalMoveY) {
textMove[1] += additionalMoveY;
}
- /// Get the current canvas transformation
+ /// Get the current canvas transformation.
///
/// the
///
@@ -347,12 +344,12 @@ public virtual void PopPatternId() {
[Obsolete]
public virtual void SetPreviousElementTextMove(float[] previousElementTextMove) {
- this.previousElementTextMove = previousElementTextMove;
}
+ // Do nothing.
[Obsolete]
public virtual float[] GetPreviousElementTextMove() {
- return previousElementTextMove;
+ return new float[] { 0.0f, 0.0f };
}
///
@@ -382,5 +379,27 @@ public virtual SvgTextProperties GetSvgTextProperties() {
public virtual void SetSvgTextProperties(SvgTextProperties textProperties) {
this.textProperties = textProperties;
}
+
+ ///
+ /// Retrieves relative position for the current text SVG element relative to the last origin
+ /// identified by absolute position.
+ ///
+ /// relative position for the current text SVG element
+ public virtual float[] GetRelativePosition() {
+ return relativePosition;
+ }
+
+ /// Adds move to the current relative position for the text SVG element.
+ /// x-axis movement
+ /// y-axis movement
+ public virtual void MoveRelativePosition(float dx, float dy) {
+ relativePosition[0] += dx;
+ relativePosition[1] += dy;
+ }
+
+ /// Resets current relative position for the text SVG element.
+ public virtual void ResetRelativePosition() {
+ relativePosition = new float[] { 0.0f, 0.0f };
+ }
}
}
diff --git a/itext/itext.svg/itext/svg/renderers/impl/AbstractBranchSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/AbstractBranchSvgNodeRenderer.cs
index 8ffd323d9c..64fc988481 100644
--- a/itext/itext.svg/itext/svg/renderers/impl/AbstractBranchSvgNodeRenderer.cs
+++ b/itext/itext.svg/itext/svg/renderers/impl/AbstractBranchSvgNodeRenderer.cs
@@ -91,7 +91,6 @@ protected internal override void DoDraw(SvgDrawContext context) {
if (!(this is MarkerSvgNodeRenderer) || !overflowVisible) {
ApplyViewportClip(context);
}
- ApplyViewportTranslationCorrection(context);
foreach (ISvgNodeRenderer child in GetChildren()) {
if (!(child is MarkerSvgNodeRenderer)) {
newCanvas.SaveState();
@@ -173,18 +172,6 @@ private void ApplyViewportClip(SvgDrawContext context) {
currentCanvas.EndPath();
}
- private void ApplyViewportTranslationCorrection(SvgDrawContext context) {
- PdfCanvas currentCanvas = context.GetCurrentCanvas();
- AffineTransform tf = this.CalculateViewPortTranslation(context);
- // TODO: DEVSIX-3923 remove normalization (.toLowerCase)
- bool preserveAspectRationNone = SvgConstants.Values.NONE.Equals(GetAttribute(SvgConstants.Attributes.PRESERVE_ASPECT_RATIO
- )) || SvgConstants.Values.NONE.Equals(GetAttribute(SvgConstants.Attributes.PRESERVE_ASPECT_RATIO.ToLowerInvariant
- ()));
- if (!tf.IsIdentity() && preserveAspectRationNone) {
- currentCanvas.ConcatMatrix(tf);
- }
- }
-
/// Cleans up the SvgDrawContext by removing the current viewport and by popping the current canvas.
/// context to clean
private void CleanUp(SvgDrawContext context) {
diff --git a/itext/itext.svg/itext/svg/renderers/impl/TextLeafSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/TextLeafSvgNodeRenderer.cs
index a8fe9ad2a0..1f8257de7e 100644
--- a/itext/itext.svg/itext/svg/renderers/impl/TextLeafSvgNodeRenderer.cs
+++ b/itext/itext.svg/itext/svg/renderers/impl/TextLeafSvgNodeRenderer.cs
@@ -57,10 +57,12 @@ public virtual float GetTextContentLength(float parentFontSize, PdfFont font) {
return contentLength;
}
+ [Obsolete]
public virtual float[] GetRelativeTranslation() {
return new float[] { 0.0f, 0.0f };
}
+ [Obsolete]
public virtual bool ContainsRelativeMove() {
return false;
}
@@ -103,15 +105,11 @@ protected internal override void DoDraw(SvgDrawContext context) {
if (this.attributesAndStyles != null && this.attributesAndStyles.ContainsKey(SvgConstants.Attributes.TEXT_CONTENT
)) {
text.SetText(this.attributesAndStyles.Get(SvgConstants.Attributes.TEXT_CONTENT));
- float parentFontSize = ((AbstractSvgNodeRenderer)GetParent()).GetCurrentFontSize();
- PdfFont parentFont = ((TextSvgBranchRenderer)GetParent()).GetFont();
- float[] fontAscenderDescenderFromMetrics = TextRenderer.CalculateAscenderDescender(parentFont, RenderingMode
- .HTML_MODE);
- float yLineOffset = FontProgram.ConvertTextSpaceToGlyphSpace(fontAscenderDescenderFromMetrics[0]) * parentFontSize;
+ ((TextSvgBranchRenderer)GetParent()).ApplyFontProperties(text, context);
+ ((TextSvgBranchRenderer)GetParent()).ApplyTextRenderingMode(text);
ApplyTransform(context);
ApplyGraphicsState(context);
- ((TextSvgBranchRenderer)GetParent()).AddTextChild(text, context, yLineOffset, GetTextContentLength(parentFontSize
- , parentFont));
+ ((TextSvgBranchRenderer)GetParent()).AddTextChild(text, context);
}
}
@@ -119,22 +117,8 @@ protected internal override bool CanElementFill() {
return false;
}
- ///
- /// Retrieves
- ///
- /// element which will be drawn using layout.
- ///
- ///
- /// corresponding
- ///
- /// element
- ///
- protected internal virtual Text GetText() {
- return text;
- }
-
private void ApplyTransform(SvgDrawContext context) {
- AffineTransform transform = context.GetLastTextTransform();
+ AffineTransform transform = context.GetRootTransform();
text.SetHorizontalScaling((float)transform.GetScaleX());
text.SetProperty(Property.VERTICAL_SCALING, transform.GetScaleY());
text.SetProperty(Property.SKEW, new float[] { (float)transform.GetShearX(), (float)transform.GetShearY() }
diff --git a/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs
index 8489d7f487..08287839a6 100644
--- a/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs
+++ b/itext/itext.svg/itext/svg/renderers/impl/TextSvgBranchRenderer.cs
@@ -49,16 +49,13 @@ public class TextSvgBranchRenderer : AbstractSvgNodeRenderer, ISvgTextNodeRender
private readonly IList children = new List();
+ [Obsolete]
protected internal bool performRootTransformations;
private PdfFont font;
private Paragraph paragraph;
- private float xLineOffset;
-
- private float yLineOffset;
-
private bool moveResolved;
private float xMove;
@@ -109,6 +106,7 @@ public virtual float GetTextContentLength(float parentFontSize, PdfFont font) {
}
// Branch renderers do not contain any text themselves and do not contribute to the text length
+ [Obsolete]
public virtual float[] GetRelativeTranslation() {
return GetRelativeTranslation(new SvgDrawContext(null, null));
}
@@ -120,6 +118,7 @@ public virtual float[] GetRelativeTranslation(SvgDrawContext context) {
return new float[] { xMove, yMove };
}
+ [Obsolete]
public virtual bool ContainsRelativeMove() {
return ContainsRelativeMove(new SvgDrawContext(null, null));
}
@@ -172,6 +171,7 @@ public virtual TextRectangle GetTextRectangle(SvgDrawContext context, Point base
y = basePoint.GetY();
}
}
+ bool isRoot = basePoint == null;
basePoint = new Point(x, y);
basePoint.Move(GetRelativeTranslation(context)[0], GetRelativeTranslation(context)[1]);
Rectangle commonRect = null;
@@ -183,8 +183,8 @@ public virtual TextRectangle GetTextRectangle(SvgDrawContext context, Point base
}
}
if (commonRect != null) {
- return new TextRectangle(commonRect.GetX(), commonRect.GetY(), commonRect.GetWidth(), commonRect.GetHeight
- (), (float)basePoint.GetY());
+ return new TextRectangle(isRoot ? (float)x : commonRect.GetX(), commonRect.GetY(), commonRect.GetWidth(),
+ commonRect.GetHeight(), (float)basePoint.GetY());
}
}
return null;
@@ -206,70 +206,118 @@ protected internal override void DoDraw(SvgDrawContext context) {
if (GetChildren().IsEmpty() || this.attributesAndStyles == null) {
return;
}
- context.ResetTextMove();
- context.SetLastTextTransform(null);
- PerformRootTransformations(context);
- this.paragraph = new Paragraph();
- this.paragraph.SetProperty(Property.FORCED_PLACEMENT, true);
- this.paragraph.SetMargin(0);
- this.xLineOffset = 0;
- this.yLineOffset = 0;
- ApplyTextRenderingMode(paragraph);
// Handle white-spaces
if (!whiteSpaceProcessed) {
SvgTextUtil.ProcessWhiteSpace(this, true);
}
- ResolveFont(context);
+ this.paragraph = new Paragraph();
+ this.paragraph.SetProperty(Property.FORCED_PLACEMENT, true);
+ this.paragraph.SetProperty(Property.RENDERING_MODE, RenderingMode.SVG_MODE);
+ this.paragraph.SetMargin(0);
+ ApplyTextRenderingMode(paragraph);
ApplyFontProperties(paragraph, context);
- foreach (ISvgTextNodeRenderer child in children) {
- // Apply relative move
- if (this.ContainsRelativeMove(context)) {
- float[] rootMove = this.GetRelativeTranslation(context);
- //-y to account for the text-matrix transform we do in the text root to account for the coordinates
- context.AddTextMove(rootMove[0], -rootMove[1]);
+ StartNewTextChunk(context, TEXTFLIP);
+ PerformDrawing(context);
+ DrawLastTextChunk(context);
+ }
+
+//\cond DO_NOT_DOCUMENT
+ internal virtual void ApplyFontProperties(IElement element, SvgDrawContext context) {
+ element.SetProperty(Property.FONT_SIZE, UnitValue.CreatePointValue(GetCurrentFontSize(context)));
+ FontProvider provider = context.GetFontProvider();
+ element.SetProperty(Property.FONT_PROVIDER, provider);
+ FontSet tempFonts = context.GetTempFonts();
+ element.SetProperty(Property.FONT_SET, tempFonts);
+ String fontFamily = this.attributesAndStyles.Get(SvgConstants.Attributes.FONT_FAMILY);
+ String fontWeight = this.attributesAndStyles.Get(SvgConstants.Attributes.FONT_WEIGHT);
+ String fontStyle = this.attributesAndStyles.Get(SvgConstants.Attributes.FONT_STYLE);
+ element.SetProperty(Property.FONT, new String[] { fontFamily == null ? "" : fontFamily.Trim() });
+ element.SetProperty(Property.FONT_WEIGHT, fontWeight);
+ element.SetProperty(Property.FONT_STYLE, fontStyle);
+ }
+//\endcond
+
+//\cond DO_NOT_DOCUMENT
+ internal virtual void ApplyTextRenderingMode(IElement element) {
+ // Fill only is the default for text operation in PDF
+ if (doStroke && doFill) {
+ // Default for SVG
+ element.SetProperty(Property.TEXT_RENDERING_MODE, PdfCanvasConstants.TextRenderingMode.FILL_STROKE);
+ }
+ else {
+ if (doStroke) {
+ element.SetProperty(Property.TEXT_RENDERING_MODE, PdfCanvasConstants.TextRenderingMode.STROKE);
+ }
+ else {
+ element.SetProperty(Property.TEXT_RENDERING_MODE, PdfCanvasConstants.TextRenderingMode.FILL);
}
- ProcessChild(context, child);
}
- PdfCanvas currentCanvas = context.GetCurrentCanvas();
- using (iText.Layout.Canvas canvas = new iText.Layout.Canvas(currentCanvas, new Rectangle(0, 0, 1e6f, 0))) {
- ApplyYLineOffset();
- canvas.Add(paragraph);
+ }
+//\endcond
+
+//\cond DO_NOT_DOCUMENT
+ internal virtual void AddTextChild(Text text, SvgDrawContext drawContext) {
+ if (GetParent() is iText.Svg.Renderers.Impl.TextSvgBranchRenderer) {
+ ((iText.Svg.Renderers.Impl.TextSvgBranchRenderer)GetParent()).AddTextChild(text, drawContext);
+ return;
}
+ text.SetProperty(Property.POSITION, LayoutPosition.RELATIVE);
+ text.SetProperty(Property.LEFT, drawContext.GetRelativePosition()[0]);
+ text.SetProperty(Property.BOTTOM, drawContext.GetRelativePosition()[1]);
+ paragraph.Add(text);
}
+//\endcond
//\cond DO_NOT_DOCUMENT
- internal virtual void ProcessChild(SvgDrawContext context, ISvgTextNodeRenderer c) {
- if (c.ContainsAbsolutePositionChange()) {
+ internal virtual void PerformDrawing(SvgDrawContext context) {
+ ResolveFont(context);
+ if (this.ContainsAbsolutePositionChange()) {
+ DrawLastTextChunk(context);
// TODO: DEVSIX-2507 support rotate and other attributes
- float[][] absolutePositions = c.GetAbsolutePositionChanges();
+ float[][] absolutePositions = this.GetAbsolutePositionChanges();
AffineTransform newTransform = GetTextTransform(absolutePositions, context);
- // Overwrite the last and root transformations stored in the context
- context.SetLastTextTransform(newTransform);
- context.SetRootTransform(newTransform);
- // Absolute position changes requires resetting the current text move in the context
- context.ResetTextMove();
+ StartNewTextChunk(context, newTransform);
}
- else {
- if (!(c is TextLeafSvgNodeRenderer) || context.GetLastTextTransform().IsIdentity()) {
- // If we don't update the matrix, we should set root matrix as the last text matrix
- context.SetLastTextTransform(context.GetRootTransform());
- }
+ if (this.ContainsRelativeMove(context)) {
+ float[] rootMove = this.GetRelativeTranslation(context);
+ context.AddTextMove(rootMove[0], rootMove[1]);
+ context.MoveRelativePosition(rootMove[0], rootMove[1]);
+ }
+ foreach (ISvgTextNodeRenderer child in children) {
+ ProcessChild(context, child);
+ }
+ }
+//\endcond
+
+ private static void StartNewTextChunk(SvgDrawContext context, AffineTransform newTransform) {
+ context.SetRootTransform(newTransform);
+ context.ResetTextMove();
+ context.ResetRelativePosition();
+ }
+
+ private void DrawLastTextChunk(SvgDrawContext context) {
+ if (GetParent() is iText.Svg.Renderers.Impl.TextSvgBranchRenderer) {
+ ((iText.Svg.Renderers.Impl.TextSvgBranchRenderer)GetParent()).DrawLastTextChunk(context);
+ return;
}
- float childLength = c.GetTextContentLength(GetCurrentFontSize(), GetFont());
+ if (paragraph.GetChildren().IsEmpty()) {
+ return;
+ }
+ PdfCanvas currentCanvas = context.GetCurrentCanvas();
+ using (iText.Layout.Canvas canvas = new iText.Layout.Canvas(currentCanvas, new Rectangle((float)context.GetRootTransform
+ ().GetTranslateX(), (float)context.GetRootTransform().GetTranslateY(), 1e6f, 0))) {
+ canvas.Add(paragraph);
+ }
+ paragraph.GetChildren().Clear();
+ }
+
+ private void ProcessChild(SvgDrawContext context, ISvgTextNodeRenderer c) {
+ float childLength = c.GetTextContentLength(GetCurrentFontSize(context), GetFont());
// Handle Text-Anchor declarations
float textAnchorCorrection = GetTextAnchorAlignmentCorrection(childLength);
if (!CssUtils.CompareFloats(0f, textAnchorCorrection)) {
context.AddTextMove(textAnchorCorrection, 0);
- }
- // Move needs to happen before the saving of the state in order for it to cascade beyond
- bool containsRelativeMove = c is iText.Svg.Renderers.Impl.TextSvgBranchRenderer ? ((iText.Svg.Renderers.Impl.TextSvgBranchRenderer
- )c).ContainsRelativeMove(context) : c.ContainsRelativeMove();
- if (containsRelativeMove) {
- float[] childMove = c is iText.Svg.Renderers.Impl.TextSvgBranchRenderer ? ((iText.Svg.Renderers.Impl.TextSvgBranchRenderer
- )c).GetRelativeTranslation(context) : c.GetRelativeTranslation();
- //-y to account for the text-matrix transform we do
- // in the text root to account for the coordinates
- context.AddTextMove(childMove[0], -childMove[1]);
+ context.MoveRelativePosition(textAnchorCorrection, 0);
}
SvgTextProperties textProperties = new SvgTextProperties(context.GetSvgTextProperties());
c.SetParent(this);
@@ -277,7 +325,6 @@ internal virtual void ProcessChild(SvgDrawContext context, ISvgTextNodeRenderer
context.SetSvgTextProperties(textProperties);
context.AddTextMove(childLength, 0);
}
-//\endcond
//\cond DO_NOT_DOCUMENT
internal override void ApplyFillAndStrokeProperties(AbstractSvgNodeRenderer.FillProperties fillProperties,
@@ -306,8 +353,7 @@ internal override void ApplyFillAndStrokeProperties(AbstractSvgNodeRenderer.Fill
}
//\endcond
-//\cond DO_NOT_DOCUMENT
- internal virtual void ResolveFont(SvgDrawContext context) {
+ private void ResolveFont(SvgDrawContext context) {
FontProvider provider = context.GetFontProvider();
FontSet tempFonts = context.GetTempFonts();
font = null;
@@ -330,46 +376,6 @@ internal virtual void ResolveFont(SvgDrawContext context) {
}
}
}
-//\endcond
-
-//\cond DO_NOT_DOCUMENT
- internal virtual void ApplyFontProperties(IElement element, SvgDrawContext context) {
- element.SetProperty(Property.FONT_SIZE, UnitValue.CreatePointValue(GetCurrentFontSize()));
- FontProvider provider = context.GetFontProvider();
- element.SetProperty(Property.FONT_PROVIDER, provider);
- FontSet tempFonts = context.GetTempFonts();
- element.SetProperty(Property.FONT_SET, tempFonts);
- String fontFamily = this.attributesAndStyles.Get(SvgConstants.Attributes.FONT_FAMILY);
- if (fontFamily != null) {
- element.SetProperty(Property.FONT, new String[] { fontFamily });
- }
- else {
- element.SetProperty(Property.FONT, font);
- }
- String fontWeight = this.attributesAndStyles.Get(SvgConstants.Attributes.FONT_WEIGHT);
- String fontStyle = this.attributesAndStyles.Get(SvgConstants.Attributes.FONT_STYLE);
- element.SetProperty(Property.FONT_WEIGHT, fontWeight);
- element.SetProperty(Property.FONT_STYLE, fontStyle);
- }
-//\endcond
-
-//\cond DO_NOT_DOCUMENT
- internal virtual void ApplyTextRenderingMode(IElement element) {
- // Fill only is the default for text operation in PDF
- if (doStroke && doFill) {
- // Default for SVG
- element.SetProperty(Property.TEXT_RENDERING_MODE, PdfCanvasConstants.TextRenderingMode.FILL_STROKE);
- }
- else {
- if (doStroke) {
- element.SetProperty(Property.TEXT_RENDERING_MODE, PdfCanvasConstants.TextRenderingMode.STROKE);
- }
- else {
- element.SetProperty(Property.TEXT_RENDERING_MODE, PdfCanvasConstants.TextRenderingMode.FILL);
- }
- }
- }
-//\endcond
//\cond DO_NOT_DOCUMENT
/// Return the font used in this text element.
@@ -384,52 +390,6 @@ internal virtual PdfFont GetFont() {
}
//\endcond
-//\cond DO_NOT_DOCUMENT
- internal virtual void AddTextChild(Text text, SvgDrawContext drawContext, float childYLineOffset, float childXOffset
- ) {
- if (GetParent() is iText.Svg.Renderers.Impl.TextSvgBranchRenderer) {
- ((iText.Svg.Renderers.Impl.TextSvgBranchRenderer)GetParent()).AddTextChild(text, drawContext, childYLineOffset
- , childXOffset);
- return;
- }
- ApplyPosition(text, drawContext);
- xLineOffset += childXOffset;
- yLineOffset = Math.Max(yLineOffset, childYLineOffset);
- paragraph.Add(text);
- }
-//\endcond
-
- private void ApplyPosition(Text text, SvgDrawContext context) {
- // TODO DEVSIX-2507: Support for glyph by glyph handling of x, y and rotate
- AffineTransform translate = AffineTransform.GetTranslateInstance(context.GetTextMove()[0], context.GetTextMove
- ()[1]);
- AffineTransform transform = new AffineTransform(context.GetLastTextTransform());
- transform.Concatenate(translate);
- float[] position = new float[] { (float)transform.GetTranslateX(), (float)transform.GetTranslateY() };
- text.SetProperty(Property.POSITION, LayoutPosition.RELATIVE);
- text.SetProperty(Property.LEFT, position[0] - xLineOffset);
- text.SetProperty(Property.BOTTOM, position[1]);
- }
-
- private void ApplyYLineOffset() {
- foreach (IElement child in paragraph.GetChildren()) {
- float bottom = (float)child.GetProperty(Property.BOTTOM);
- child.SetProperty(Property.BOTTOM, bottom + yLineOffset);
- }
- }
-
- private void PerformRootTransformations(SvgDrawContext context) {
- // Current transformation matrix results in the character glyphs being mirrored, correct with inverse tf
- AffineTransform rootTf;
- if (this.ContainsAbsolutePositionChange()) {
- rootTf = GetTextTransform(this.GetAbsolutePositionChanges(), context);
- }
- else {
- rootTf = new AffineTransform(TEXTFLIP);
- }
- context.SetRootTransform(rootTf);
- }
-
private void ResolveTextMove(SvgDrawContext context) {
if (this.attributesAndStyles != null) {
String xRawValue = this.attributesAndStyles.Get(SvgConstants.Attributes.DX);
@@ -474,12 +434,13 @@ private static AffineTransform GetTextTransform(float[][] absolutePositions, Svg
AffineTransform tf = new AffineTransform();
// If x is not specified, but y is, we need to correct for preceding text.
if (absolutePositions[0] == null && absolutePositions[1] != null) {
- absolutePositions[0] = new float[] { context.GetTextMove()[0] + (float)context.GetLastTextTransform().GetTranslateX
- () };
+ absolutePositions[0] = new float[] { (float)context.GetRootTransform().GetTranslateX() + context.GetTextMove
+ ()[0] };
}
// If y is not present, we should take the last text y
if (absolutePositions[1] == null) {
- absolutePositions[1] = new float[] { (float)context.GetLastTextTransform().GetTranslateY() };
+ absolutePositions[1] = new float[] { (float)context.GetRootTransform().GetTranslateY() + context.GetTextMove
+ ()[1] };
}
tf.Concatenate(TEXTFLIP);
tf.Concatenate(AffineTransform.GetTranslateInstance(absolutePositions[0][0], -absolutePositions[1][0]));
diff --git a/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs
index e19634e1bb..ba57fddd97 100644
--- a/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs
+++ b/itext/itext.svg/itext/svg/renderers/impl/TextSvgTSpanBranchRenderer.cs
@@ -21,7 +21,6 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
using iText.Kernel.Geom;
-using iText.Layout.Element;
using iText.Svg.Renderers;
namespace iText.Svg.Renderers.Impl {
@@ -44,15 +43,7 @@ protected internal override void DoDraw(SvgDrawContext context) {
if (GetChildren().IsEmpty() || this.attributesAndStyles == null) {
return;
}
- foreach (ISvgTextNodeRenderer child in GetChildren()) {
- ResolveFont(context);
- if (child is TextLeafSvgNodeRenderer) {
- Text text = ((TextLeafSvgNodeRenderer)child).GetText();
- ApplyFontProperties(text, context);
- ApplyTextRenderingMode(text);
- }
- ProcessChild(context, child);
- }
+ PerformDrawing(context);
}
}
}
diff --git a/itext/itext.svg/itext/svg/utils/TemplateResolveUtils.cs b/itext/itext.svg/itext/svg/utils/TemplateResolveUtils.cs
index b78950463f..63c6d48fb1 100644
--- a/itext/itext.svg/itext/svg/utils/TemplateResolveUtils.cs
+++ b/itext/itext.svg/itext/svg/utils/TemplateResolveUtils.cs
@@ -27,7 +27,7 @@ You should have received a copy of the GNU Affero General Public License
namespace iText.Svg.Utils {
/// Utility class which contains methods related to href resolving
- public class TemplateResolveUtils {
+ public sealed class TemplateResolveUtils {
private TemplateResolveUtils() {
}
diff --git a/port-hash b/port-hash
index 3e1a985ced..557d64e7b2 100644
--- a/port-hash
+++ b/port-hash
@@ -1 +1 @@
-b4a3252c406806f44bdea914d26384d54ac55095
+ac38ed196978d1f68d38ccdfc1c58c4dbee26302