From 4c44447882a6ad3a1114d7b60a75e67d6dec1b0c Mon Sep 17 00:00:00 2001 From: Dmitry Chubrick Date: Wed, 18 Dec 2024 09:58:34 +0000 Subject: [PATCH 1/3] Improve relative values support in SVG * Fix svg for fontWeightTest DEVSIX-8775 Autoported commit. Original commit hash: [46420ea90] --- .../svg/css/AttributesRelativeUnitTest.cs | 137 ++++++++++++++++ .../css/SvgStyleResolverIntegrationTest.cs | 1 - .../svg/renderers/RelativePositionsTest.cs | 1 - .../svg/renderers/SvgImageRendererTest.cs | 6 +- .../itext/svg/renderers/SvgIntegrationTest.cs | 19 ++- ...pleSvgTagSvgNodeRendererIntegrationTest.cs | 15 +- .../impl/SvgTagSvgNodeRendererUnitTest.cs | 3 + .../itext/svg/renderers/impl/SymbolTest.cs | 25 +-- .../cmp_diffViewBoxAndPortPercent1Test.pdf | Bin 0 -> 1649 bytes .../cmp_diffViewBoxAndPortPercent2Test.pdf | Bin 0 -> 1643 bytes .../cmp_imageAttributesEmUnits.pdf | Bin 5555 -> 5611 bytes .../cmp_imageAttributesExUnits.pdf | Bin 5552 -> 5608 bytes .../cmp_imageAttributesPercentUnits.pdf | Bin 5556 -> 5612 bytes .../cmp_linePercentTest.pdf | Bin 0 -> 1855 bytes .../cmp_nestedSvgAllPercentTest.pdf | Bin 0 -> 1945 bytes .../cmp_nestedSvgHeightPercentTest.pdf | Bin 0 -> 1872 bytes .../cmp_nestedSvgWidthEmTest.pdf | Bin 0 -> 2061 bytes .../cmp_nestedSvgWidthPercentTest.pdf | Bin 0 -> 2061 bytes .../cmp_nestedSvgXPercentTest.pdf | Bin 0 -> 1802 bytes .../cmp_nestedSvgYPercentTest.pdf | Bin 0 -> 1802 bytes .../cmp_noViewBoxAndViewPortPercentTest.pdf | Bin 0 -> 1421 bytes .../cmp_noViewBoxPercentTest.pdf | Bin 0 -> 1415 bytes .../cmp_rectangleAttributesEmUnits.pdf | Bin 1386 -> 1447 bytes .../cmp_rectangleAttributesExUnits.pdf | Bin 1385 -> 1446 bytes .../cmp_rectangleAttributesPercentUnits.pdf | Bin 1391 -> 1451 bytes .../cmp_svgHeightPercentTest.pdf | Bin 0 -> 1616 bytes .../cmp_svgViewboxWidthPercentTest.pdf | Bin 0 -> 1678 bytes .../cmp_svgWidthAndHeightEmAndRemTest.pdf | Bin 0 -> 1605 bytes .../cmp_svgWidthPercentTest.pdf | Bin 0 -> 1621 bytes .../cmp_symbolWidthAndHeightEmAndRemTest.pdf | Bin 0 -> 1786 bytes .../cmp_symbolWidthAndHeightPercentTest.pdf | Bin 0 -> 1786 bytes .../cmp_symbolXAndYEmAndRemTest.pdf | Bin 0 -> 1816 bytes .../cmp_symbolXPercentTest.pdf | Bin 0 -> 1809 bytes .../cmp_symbolYPercentTest.pdf | Bin 0 -> 1809 bytes .../cmp_useWidthPercentTest.pdf | Bin 0 -> 1793 bytes .../cmp_useXAndYEmAndRemTest.pdf | Bin 0 -> 1891 bytes .../cmp_useXPercentTest.pdf | Bin 0 -> 1891 bytes .../cmp_useYPercentTest.pdf | Bin 0 -> 1888 bytes ...mp_viewportFromConverterPropertiesTest.pdf | Bin 0 -> 1663 bytes .../diffViewBoxAndPortPercent1Test.svg | 12 ++ .../diffViewBoxAndPortPercent2Test.svg | 12 ++ .../linePercentTest.svg | 7 + .../nestedSvgAllPercentTest.svg | 11 ++ .../nestedSvgHeightPercentTest.svg | 7 + .../nestedSvgWidthEmTest.svg | 8 + .../nestedSvgWidthPercentTest.svg | 8 + .../nestedSvgXPercentTest.svg | 6 + .../nestedSvgYPercentTest.svg | 6 + .../noViewBoxAndViewPortPercentTest.svg | 4 + .../noViewBoxPercentTest.svg | 4 + .../svgHeightPercentTest.svg | 5 + .../svgViewboxWidthPercentTest.svg | 5 + .../svgWidthAndHeightEmAndRemTest.svg | 5 + .../svgWidthPercentTest.svg | 5 + .../symbolWidthAndHeightEmAndRemTest.svg | 10 ++ .../symbolWidthAndHeightPercentTest.svg | 10 ++ .../symbolXAndYEmAndRemTest.svg | 10 ++ .../symbolXPercentTest.svg | 10 ++ .../symbolYPercentTest.svg | 10 ++ .../useWidthPercentTest.svg | 10 ++ .../useXAndYEmAndRemTest.svg | 10 ++ .../useXPercentTest.svg | 10 ++ .../useYPercentTest.svg | 10 ++ .../viewportFromConverterPropertiesTest.svg | 5 + ..._markerFontSizeInheritanceFromDifsTest.pdf | Bin 2480 -> 2484 bytes .../svg/css/MediaTest/cmp_mediaQueryColor.pdf | Bin 1487 -> 1544 bytes .../MediaTest/cmp_mediaQueryColorGamut.pdf | Bin 1487 -> 1544 bytes .../cmp_mediaQueryDisplayBrowser.pdf | Bin 1481 -> 1539 bytes .../css/MediaTest/cmp_mediaQueryHeight.pdf | Bin 1487 -> 1544 bytes .../css/MediaTest/cmp_mediaQueryMaxHeight.pdf | Bin 1487 -> 1544 bytes .../css/MediaTest/cmp_mediaQueryMaxWidth.pdf | Bin 1487 -> 1545 bytes .../css/MediaTest/cmp_mediaQueryMinColor.pdf | Bin 1487 -> 1544 bytes .../css/MediaTest/cmp_mediaQueryMinHeight.pdf | Bin 1487 -> 1544 bytes .../css/MediaTest/cmp_mediaQueryMinWidth.pdf | Bin 1487 -> 1545 bytes .../css/MediaTest/cmp_mediaQueryMinWidth2.pdf | Bin 1487 -> 1545 bytes .../svg/css/MediaTest/cmp_mediaQueryNot.pdf | Bin 1487 -> 1544 bytes .../svg/css/MediaTest/cmp_mediaQueryOnly.pdf | Bin 1481 -> 1539 bytes .../css/MediaTest/cmp_mediaQueryOnlyAnd.pdf | Bin 1481 -> 1539 bytes .../cmp_mediaQueryOrientationLandscape.pdf | Bin 1487 -> 1545 bytes .../cmp_mediaQueryOrientationPortrait.pdf | Bin 1487 -> 1545 bytes .../svg/css/MediaTest/cmp_mediaQueryPrint.pdf | Bin 1481 -> 1539 bytes .../svg/css/MediaTest/cmp_mediaQueryRatio.pdf | Bin 1487 -> 1544 bytes .../cmp_mediaQueryRatioSingleVal.pdf | Bin 1487 -> 1547 bytes .../MediaTest/cmp_mediaQueryResolution.pdf | Bin 1487 -> 1544 bytes .../css/MediaTest/cmp_mediaQueryScreen.pdf | Bin 1481 -> 1539 bytes .../svg/css/MediaTest/cmp_mediaQueryWidth.pdf | Bin 1487 -> 1544 bytes .../SvgStyleResolver/cmp_fontWeightTest.pdf | Bin 11900 -> 22231 bytes .../css/SvgStyleResolver/fontWeightTest.svg | 6 + .../impl/DeviceCmykTest/cmp_svgFillColor.pdf | Bin 1410 -> 1670 bytes .../DeviceCmykTest/cmp_svgFillStrokeColor.pdf | Bin 1454 -> 1714 bytes .../cmp_svgSimpleShapesColor.pdf | Bin 2139 -> 2206 bytes .../DeviceCmykTest/cmp_svgStrokeColor.pdf | Bin 1440 -> 1700 bytes .../impl/DeviceCmykTest/svgFillColor.svg | 2 +- .../cmp_hrefBasicReference.pdf | Bin 2250 -> 2302 bytes .../cmp_transitiveHrefBasicReference.pdf | Bin 2372 -> 2424 bytes .../impl/LinkTest/cmp_circleLink.pdf | Bin 1114 -> 1117 bytes .../LinkTest/cmp_combinedElementsLink.pdf | Bin 1121 -> 1117 bytes .../renderers/impl/LinkTest/cmp_groupLink.pdf | Bin 1115 -> 1117 bytes .../renderers/impl/LinkTest/cmp_lineLink.pdf | Bin 1115 -> 1117 bytes .../impl/LinkTest/cmp_nestedSvgLink.pdf | Bin 1117 -> 1117 bytes .../renderers/impl/LinkTest/cmp_pathLink.pdf | Bin 1114 -> 1117 bytes .../impl/LinkTest/cmp_polygonLink.pdf | Bin 1115 -> 1117 bytes .../renderers/impl/LinkTest/cmp_textLink.pdf | Bin 1114 -> 1117 bytes .../cmp_fontRelativeValueInRefX.pdf | Bin 4328 -> 4340 bytes .../cmp_textpath.pdf | Bin 1560 -> 1616 bytes .../PatternTest/cmp_coordSystemTransform.pdf | Bin 1827 -> 2072 bytes .../cmp_coordSystemTransformMixed1.pdf | Bin 1827 -> 2072 bytes .../cmp_coordSystemTransformMixed2.pdf | Bin 1810 -> 2055 bytes ...cmp_coordSystemTransformObjBoundingBox.pdf | Bin 1830 -> 2075 bytes ...cmp_coordSystemTransformUserSpaceOnUse.pdf | Bin 1775 -> 2020 bytes .../cmp_cycledPatternsUserSpaceOnUse.pdf | Bin 1826 -> 2075 bytes .../cmp_hrefAndXlinkHrefPriority.pdf | Bin 2250 -> 2302 bytes .../impl/PatternTest/cmp_hrefAttribute.pdf | Bin 3734 -> 3980 bytes .../PatternTest/cmp_hrefBasicReference.pdf | Bin 2254 -> 2306 bytes .../cmp_incorrectViewBoxNegativeHeight.pdf | Bin 1447 -> 1692 bytes .../cmp_incorrectViewBoxNegativeWidth.pdf | Bin 1447 -> 1692 bytes .../cmp_incorrectViewBoxValuesNumber.pdf | Bin 1447 -> 1692 bytes .../cmp_linearGradientInsidePattern.pdf | Bin 3311 -> 3560 bytes .../impl/PatternTest/cmp_nestedPatterns.pdf | Bin 2025 -> 2274 bytes .../cmp_nestedPatternsLinkedToEachOther.pdf | Bin 1808 -> 2057 bytes ...estedPatternsWithComplexElementsInside.pdf | Bin 5200 -> 5449 bytes .../cmp_objBoundingBoxUserSpaceOnUse.pdf | Bin 1508 -> 1754 bytes .../cmp_objBoundingBoxWithMargins.pdf | Bin 1514 -> 1760 bytes .../PatternTest/cmp_objectBoundingBoxNone.pdf | Bin 1610 -> 1863 bytes .../cmp_objectBoundingBoxXMaxYMaxMeet.pdf | Bin 1617 -> 1870 bytes ..._objectBoundingBoxXMaxYMaxMeetVertical.pdf | Bin 1616 -> 1869 bytes .../cmp_objectBoundingBoxXMaxYMidMeet.pdf | Bin 1617 -> 1870 bytes .../cmp_objectBoundingBoxXMaxYMinMeet.pdf | Bin 1617 -> 1870 bytes ..._objectBoundingBoxXMaxYMinMeetVertical.pdf | Bin 1612 -> 1865 bytes .../cmp_objectBoundingBoxXMidYMaxMeet.pdf | Bin 1623 -> 1876 bytes .../cmp_objectBoundingBoxXMidYMidMeet.pdf | Bin 1620 -> 1873 bytes ..._objectBoundingBoxXMidYMidMeetVertical.pdf | Bin 1635 -> 1888 bytes .../cmp_objectBoundingBoxXMidYMinMeet.pdf | Bin 1619 -> 1872 bytes .../cmp_objectBoundingBoxXMinYMaxMeet.pdf | Bin 1615 -> 1868 bytes ..._objectBoundingBoxXMinYMaxMeetVertical.pdf | Bin 1616 -> 1869 bytes .../cmp_objectBoundingBoxXMinYMidMeet.pdf | Bin 1615 -> 1862 bytes .../cmp_objectBoundingBoxXMinYMinMeet.pdf | Bin 1613 -> 1866 bytes ..._objectBoundingBoxXMinYMinMeetVertical.pdf | Bin 1612 -> 1865 bytes .../cmp_patternContentUnitsObjBoundBox.pdf | Bin 3157 -> 3210 bytes ...rnContentUnitsObjBoundBoxAbsoluteCoord.pdf | Bin 8912 -> 8965 bytes ...p_patternContentUnitsObjectBoundingBox.pdf | Bin 1599 -> 1844 bytes .../cmp_patternContentUnitsUserSpaceOnUse.pdf | Bin 3601 -> 3654 bytes .../PatternTest/cmp_patternDefaultHeight.pdf | Bin 1167 -> 1412 bytes .../PatternTest/cmp_patternDefaultWidth.pdf | Bin 1167 -> 1412 bytes .../PatternTest/cmp_patternNegativeWidth.pdf | Bin 1167 -> 1412 bytes .../cmp_patternTransformElementTransform.pdf | Bin 1565 -> 1817 bytes .../cmp_patternTransformMixed1.pdf | Bin 1832 -> 2078 bytes .../cmp_patternTransformMixed2.pdf | Bin 1861 -> 2107 bytes .../cmp_patternTransformObjBoundingBox.pdf | Bin 1851 -> 2097 bytes .../cmp_patternTransformSimple.pdf | Bin 1936 -> 2182 bytes .../cmp_patternTransformTranslate.pdf | Bin 1550 -> 1796 bytes ...patternTransformUnitsObjectBoundingBox.pdf | Bin 3798 -> 3851 bytes ...mp_patternTransformUnitsUserSpaceOnUse.pdf | Bin 1944 -> 2190 bytes .../cmp_patternTransformUserSpaceOnUse.pdf | Bin 1845 -> 2091 bytes ...cmp_patternTransformViewBoxObjBoundBox.pdf | Bin 1851 -> 2097 bytes ...p_patternTransformViewBoxUsrSpaceOnUse.pdf | Bin 1841 -> 2087 bytes .../cmp_patternUnitsObjectBoundingBox.pdf | Bin 3734 -> 3980 bytes .../cmp_patternUnitsUserSpaceOnUse.pdf | Bin 3680 -> 3926 bytes .../impl/PatternTest/cmp_patternUseItself.pdf | Bin 1596 -> 1845 bytes .../cmp_preserveAspectRatioObjBoundingBox.pdf | Bin 6932 -> 7179 bytes .../cmp_preserveAspectRatioUserSpaceOnUse.pdf | Bin 6905 -> 7152 bytes .../cmp_preserveAspectRatioXMaxYMidMeet.pdf | Bin 3390 -> 3604 bytes .../cmp_preserveAspectRatioXMaxYMidSlice.pdf | Bin 3386 -> 3600 bytes .../cmp_preserveAspectRatioXMidYMaxMeet.pdf | Bin 3381 -> 3595 bytes .../cmp_preserveAspectRatioXMidYMaxSlice.pdf | Bin 3390 -> 3604 bytes .../cmp_relativeUnitsResolveFromDefs.pdf | Bin 2224 -> 2277 bytes .../cmp_relativeUnitsResolveFromPattern.pdf | Bin 2232 -> 2285 bytes ...mp_severalComplexElementsInsidePattern.pdf | Bin 5394 -> 5450 bytes .../cmp_simplePatternInheritStylesTest.pdf | Bin 1438 -> 1683 bytes ...simplePatternNestedFillInheritanceTest.pdf | Bin 2172 -> 2417 bytes .../cmp_simplePatternNestedTest.pdf | Bin 2172 -> 2417 bytes .../cmp_simplePatternStrokeTest.pdf | Bin 1882 -> 2127 bytes .../PatternTest/cmp_simplePatternTest.pdf | Bin 1581 -> 1826 bytes .../cmp_transitiveHrefBasicReference.pdf | Bin 2254 -> 2306 bytes .../cmp_userSpaceOnUseObjBoundingBox.pdf | Bin 1492 -> 1738 bytes .../cmp_viewBoxAndAbsoluteCoordinates.pdf | Bin 8694 -> 8747 bytes .../impl/PatternTest/cmp_viewBoxClipped.pdf | Bin 1522 -> 1772 bytes .../impl/PatternTest/cmp_viewBoxPatternXY.pdf | Bin 1604 -> 1854 bytes .../PatternTest/cmp_viewBoxZeroHeight.pdf | Bin 1167 -> 1412 bytes .../impl/PatternTest/cmp_viewBoxZeroWidth.pdf | Bin 1167 -> 1412 bytes ..._widthHeightXYInCmUnitDiffPatternUnits.pdf | Bin 3172 -> 3418 bytes ..._widthHeightXYInEmUnitDiffPatternUnits.pdf | Bin 3172 -> 3418 bytes ..._widthHeightXYInExUnitDiffPatternUnits.pdf | Bin 3160 -> 3406 bytes ...idthHeightXYInInchUnitDiffPatternUnits.pdf | Bin 3160 -> 3406 bytes ..._widthHeightXYInMmUnitDiffPatternUnits.pdf | Bin 3165 -> 3411 bytes ...idthHeightXYInPercentsDiffPatternUnits.pdf | Bin 2642 -> 2888 bytes ..._widthHeightXYInPtUnitDiffPatternUnits.pdf | Bin 3153 -> 3399 bytes ..._widthHeightXYInPxUnitDiffPatternUnits.pdf | Bin 3165 -> 3411 bytes .../cmp_widthHeightXYNoMeasureUnit.pdf | Bin 3165 -> 3411 bytes .../MultipleViewBoxes.svg | 2 +- .../OuterZeroCoordinatesViewBox.svg | 2 +- .../cmp_InnerZeroCoordinatesViewBox.pdf | Bin 1766 -> 1775 bytes .../cmp_MultipleViewBoxes.pdf | Bin 2239 -> 2248 bytes .../cmp_OuterZeroCoordinatesViewBox.pdf | Bin 1573 -> 1780 bytes .../cmp_relativePositionsBasic2.pdf | Bin 1785 -> 1797 bytes .../cmp_relativePositionsListValuesNoY.pdf | Bin 1727 -> 1727 bytes .../svg/cmp_absentHeight.pdf | Bin 1400 -> 1585 bytes .../svg/cmp_absentWHViewboxPresent.pdf | Bin 1400 -> 1639 bytes .../svg/cmp_absentWidth.pdf | Bin 1394 -> 1587 bytes .../svg/cmp_absentWidthAndHeight.pdf | Bin 1394 -> 1579 bytes .../svg/cmp_invalidX.pdf | Bin 0 -> 1123 bytes .../svg/cmp_invalidY.pdf | Bin 0 -> 1123 bytes .../impl/SymbolTest/cmp_bothStyleAttrTest.pdf | Bin 2270 -> 2336 bytes .../impl/SymbolTest/cmp_classAttrTest.pdf | Bin 2246 -> 2312 bytes .../cmp_displayAttrWithNoUseTagTest.pdf | Bin 924 -> 1117 bytes .../SymbolTest/cmp_displayNoneAttrTest.pdf | Bin 2726 -> 2792 bytes .../impl/SymbolTest/cmp_heightEmTest.pdf | Bin 0 -> 1665 bytes .../SymbolTest/cmp_heightPercentsAttrTest.pdf | Bin 1473 -> 1688 bytes .../impl/SymbolTest/cmp_heightPxAttrTest.pdf | Bin 1477 -> 1730 bytes .../impl/SymbolTest/cmp_opacityAttrTest.pdf | Bin 2726 -> 2792 bytes .../cmp_preserveAspectRatioViewBoxTest.pdf | Bin 3171 -> 3224 bytes .../impl/SymbolTest/cmp_simpleSymbolTest.pdf | Bin 1359 -> 1605 bytes .../SymbolTest/cmp_styleAttrInUseTest.pdf | Bin 1750 -> 1816 bytes .../impl/SymbolTest/cmp_styleAttrTest.pdf | Bin 2258 -> 2324 bytes .../cmp_useSymbolCoordinatesContrudiction.pdf | Bin 2099 -> 2292 bytes .../cmp_useSymbolHeightWidthAllUnitsTest.pdf | Bin 1495 -> 1687 bytes ...p_useSymbolXYContrudictionAllUnitsTest.pdf | Bin 1589 -> 1782 bytes .../cmp_useTagFirstSymbolAfterTest.pdf | Bin 1359 -> 1605 bytes .../SymbolTest/cmp_visibilityAttrTest.pdf | Bin 2726 -> 2792 bytes .../cmp_widthHeightAttrPercentsPxTest.pdf | Bin 1845 -> 2098 bytes .../SymbolTest/cmp_widthPercentsAttrTest.pdf | Bin 1473 -> 1724 bytes .../impl/SymbolTest/cmp_widthPxAttrTest.pdf | Bin 1477 -> 1730 bytes .../impl/SymbolTest/heightEmTest.svg | 8 + .../SymbolTest/heightPercentsAttrTest.svg | 6 +- itext/itext.svg/itext/svg/SvgConstants.cs | 34 ++-- .../itext/svg/converter/SvgConverter.cs | 69 ++------- .../itext.svg/itext/svg/css/SvgCssContext.cs | 5 +- .../itext/svg/css/impl/SvgStyleResolver.cs | 9 +- .../itext/svg/logs/SvgLogMessageConstant.cs | 4 + .../processors/impl/SvgConverterProperties.cs | 26 ++++ .../itext/svg/renderers/SvgDrawContext.cs | 24 +++ .../itext/svg/renderers/SvgImageRenderer.cs | 4 - .../impl/AbstractContainerSvgNodeRenderer.cs | 52 ++++--- .../renderers/impl/AbstractSvgNodeRenderer.cs | 51 +++++- .../impl/LinearGradientSvgNodeRenderer.cs | 2 +- .../renderers/impl/PatternSvgNodeRenderer.cs | 2 +- .../svg/renderers/impl/UseSvgNodeRenderer.cs | 9 +- .../renderers/path/impl/AbstractPathShape.cs | 6 +- .../itext/svg/utils/SvgCoordinateUtils.cs | 22 --- .../itext.svg/itext/svg/utils/SvgCssUtils.cs | 146 +++++++++++++----- port-hash | 2 +- 241 files changed, 674 insertions(+), 226 deletions(-) create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_diffViewBoxAndPortPercent1Test.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_diffViewBoxAndPortPercent2Test.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_linePercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgAllPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgHeightPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgWidthEmTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgWidthPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgXPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgYPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_noViewBoxAndViewPortPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_noViewBoxPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_svgHeightPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_svgViewboxWidthPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_svgWidthAndHeightEmAndRemTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_svgWidthPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolWidthAndHeightEmAndRemTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolWidthAndHeightPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolXAndYEmAndRemTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolXPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolYPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_useWidthPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_useXAndYEmAndRemTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_useXPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_useYPercentTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_viewportFromConverterPropertiesTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/diffViewBoxAndPortPercent1Test.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/diffViewBoxAndPortPercent2Test.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/linePercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgAllPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgHeightPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthEmTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgXPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgYPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxAndViewPortPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgHeightPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgViewboxWidthPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthAndHeightEmAndRemTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightEmAndRemTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXAndYEmAndRemTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolYPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useWidthPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXAndYEmAndRemTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useYPercentTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/viewportFromConverterPropertiesTest.svg create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_invalidX.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_invalidY.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_heightEmTest.pdf create mode 100644 itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightEmTest.svg diff --git a/itext.tests/itext.svg.tests/itext/svg/css/AttributesRelativeUnitTest.cs b/itext.tests/itext.svg.tests/itext/svg/css/AttributesRelativeUnitTest.cs index 22a8bb17d9..0b8e35711d 100644 --- a/itext.tests/itext.svg.tests/itext/svg/css/AttributesRelativeUnitTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/css/AttributesRelativeUnitTest.cs @@ -21,6 +21,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ using System; +using iText.Kernel.Geom; +using iText.Svg.Processors.Impl; using iText.Svg.Renderers; using iText.Test; @@ -66,5 +68,140 @@ public virtual void ImageAttributesExUnitsTest() { public virtual void ImageAttributesPercentUnitsTest() { ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "imageAttributesPercentUnits"); } + + //-------------- Nested svg + [NUnit.Framework.Test] + public virtual void NestedSvgWidthPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedSvgWidthPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void NestedSvgXPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedSvgXPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void NestedSvgHeightPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedSvgHeightPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void NestedSvgYPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedSvgYPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void NestedSvgWidthEmTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedSvgWidthEmTest"); + } + + [NUnit.Framework.Test] + public virtual void NestedSvgAllPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nestedSvgAllPercentTest"); + } + + //-------------- Top level svg + [NUnit.Framework.Test] + public virtual void SvgWidthPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "svgWidthPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void SvgViewboxWidthPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "svgViewboxWidthPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void SvgHeightPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "svgHeightPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void SvgWidthAndHeightEmAndRemTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "svgWidthAndHeightEmAndRemTest"); + } + + //-------------- use + [NUnit.Framework.Test] + public virtual void UseXPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "useXPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void UseYPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "useYPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void UseXAndYEmAndRemTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "useXAndYEmAndRemTest"); + } + + [NUnit.Framework.Test] + public virtual void UseWidthPercentTest() { + // TODO DEVSIX-4566 Processing of width&height attributes in use tag are not currently supported + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "useWidthPercentTest"); + } + + //-------------- symbol + [NUnit.Framework.Test] + public virtual void SymbolXPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "symbolXPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void SymbolYPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "symbolYPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void SymbolXAndYEmAndRemTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "symbolXAndYEmAndRemTest"); + } + + [NUnit.Framework.Test] + public virtual void SymbolWidthAndHeightPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "symbolWidthAndHeightPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void SymbolWidthAndHeightEmAndRemTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "symbolWidthAndHeightEmAndRemTest"); + } + + //-------------- misc + [NUnit.Framework.Test] + public virtual void LinePercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "linePercentTest"); + } + + [NUnit.Framework.Test] + public virtual void DiffViewBoxAndPortPercent1Test() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "diffViewBoxAndPortPercent1Test"); + } + + [NUnit.Framework.Test] + public virtual void DiffViewBoxAndPortPercent2Test() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "diffViewBoxAndPortPercent2Test"); + } + + [NUnit.Framework.Test] + public virtual void NoViewBoxAndViewPortPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "noViewBoxAndViewPortPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void NoViewBoxPercentTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "noViewBoxPercentTest"); + } + + [NUnit.Framework.Test] + public virtual void ViewportFromConverterPropertiesTest() { + SvgConverterProperties properties = new SvgConverterProperties(); + properties.SetCustomViewport(new Rectangle(500, 500)); + // It is expected that the result is different with browser. In + // browsers the result should be bigger but with the same proportions + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "viewportFromConverterPropertiesTest", properties); + } } } 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 0b77ae8895..a4bcd9b9ae 100644 --- a/itext.tests/itext.svg.tests/itext/svg/css/SvgStyleResolverIntegrationTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/css/SvgStyleResolverIntegrationTest.cs @@ -132,7 +132,6 @@ public virtual void ValidLocalFontTest() { [NUnit.Framework.Test] public virtual void FontWeightTest() { - //TODO DEVSIX-2079: change compare file after fix ConvertAndCompare(sourceFolder, destinationFolder, "fontWeightTest"); } diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs index c3fe8dad8e..7ef0da018b 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/RelativePositionsTest.cs @@ -43,7 +43,6 @@ 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"); diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/SvgImageRendererTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/SvgImageRendererTest.cs index bf13351754..357417f446 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/SvgImageRendererTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/SvgImageRendererTest.cs @@ -59,7 +59,7 @@ public virtual void SvgWithSvgTest() { INode parsedSvg = SvgConverter.Parse(FileUtil.GetInputStreamForFile(svgFileName)); ISvgProcessorResult result = new DefaultSvgProcessor().Process(parsedSvg, null); ISvgNodeRenderer topSvgRenderer = result.GetRootRenderer(); - Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, 0.0F, 0.0F); + Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, 0.0F, new SvgDrawContext(null, null)); SvgImageXObject svgImageXObject = new SvgImageXObject(wh, result, new ResourceResolver(SOURCE_FOLDER)); SvgImage svgImage = new SvgImage(svgImageXObject); document.Add(svgImage); @@ -80,7 +80,7 @@ public virtual void CustomSvgImageTest() { ISvgProcessorResult result = new DefaultSvgProcessor().Process(parsedSvg, new SvgConverterProperties().SetBaseUri (svgFileName)); ISvgNodeRenderer topSvgRenderer = result.GetRootRenderer(); - Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, 0.0F, 0.0F); + Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, 0.0F, new SvgDrawContext(null, null)); SvgImageXObject svgImageXObject = new SvgImageXObject(wh, result, new ResourceResolver(SOURCE_FOLDER)); SvgImage svgImage = new SvgImage(svgImageXObject); document.Add(svgImage); @@ -101,7 +101,7 @@ public virtual void NoSpecifiedWidthHeightImageTest() { ISvgProcessorResult result = new DefaultSvgProcessor().Process(parsedSvg, new SvgConverterProperties().SetBaseUri (svgFileName)); ISvgNodeRenderer topSvgRenderer = result.GetRootRenderer(); - Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, 0.0F, 0.0F); + Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, 0.0F, new SvgDrawContext(null, null)); document.Add(new SvgImage(new SvgImageXObject(wh, result, new ResourceResolver(SOURCE_FOLDER)))); } NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, DESTINATION_FOLDER diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/SvgIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/SvgIntegrationTest.cs index 2214b3e76b..726ee74da1 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/SvgIntegrationTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/SvgIntegrationTest.cs @@ -43,14 +43,14 @@ public virtual void Convert(Stream svg, Stream pdfOutputStream) { } public virtual void Convert(String svg, String output) { - Convert(svg, output, PageSize.DEFAULT); + Convert(svg, output, PageSize.DEFAULT, new SvgConverterProperties()); } - public virtual void Convert(String svg, String output, PageSize size) { + public virtual void Convert(String svg, String output, PageSize size, SvgConverterProperties properties) { using (PdfDocument doc = new PdfDocument(new PdfWriter(output, new WriterProperties().SetCompressionLevel( 0)))) { doc.AddNewPage(size); - ISvgConverterProperties properties = new SvgConverterProperties().SetBaseUri(svg); + properties.SetBaseUri(svg); SvgConverter.DrawOnDocument(FileUtil.GetInputStreamForFile(svg), doc, 1, properties); } } @@ -99,8 +99,19 @@ public virtual void ConvertAndCompare(String src, String dest, String fileName) ConvertAndCompare(src, dest, fileName, PageSize.DEFAULT); } + public virtual void ConvertAndCompare(String src, String dest, String fileName, SvgConverterProperties properties + ) { + ConvertAndCompare(src, dest, fileName, PageSize.DEFAULT, properties); + } + public virtual void ConvertAndCompare(String src, String dest, String fileName, PageSize size) { - Convert(src + fileName + ".svg", dest + fileName + ".pdf", size); + Convert(src + fileName + ".svg", dest + fileName + ".pdf", size, new SvgConverterProperties()); + Compare(fileName, src, dest); + } + + public virtual void ConvertAndCompare(String src, String dest, String fileName, PageSize size, SvgConverterProperties + properties) { + Convert(src + fileName + ".svg", dest + fileName + ".pdf", size, properties); Compare(fileName, src, dest); } diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SimpleSvgTagSvgNodeRendererIntegrationTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SimpleSvgTagSvgNodeRendererIntegrationTest.cs index e42b88a064..7c0e2b8ef2 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SimpleSvgTagSvgNodeRendererIntegrationTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SimpleSvgTagSvgNodeRendererIntegrationTest.cs @@ -23,10 +23,8 @@ You should have received a copy of the GNU Affero General Public License using System; using iText.Commons.Utils; using iText.StyledXmlParser.Exceptions; -using iText.Svg.Logs; using iText.Svg.Renderers; using iText.Test; -using iText.Test.Attributes; namespace iText.Svg.Renderers.Impl { [NUnit.Framework.Category("IntegrationTest")] @@ -48,23 +46,16 @@ public virtual void EverythingPresentAndValidTest() { } [NUnit.Framework.Test] - //TODO: change cmp file after DEVSIX-3123 fixed - [LogMessage(SvgLogMessageConstant.MISSING_HEIGHT)] public virtual void AbsentHeight() { ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "absentHeight"); } [NUnit.Framework.Test] - //TODO: change cmp file after DEVSIX-3123 fixed - [LogMessage(SvgLogMessageConstant.MISSING_WIDTH)] public virtual void AbsentWidth() { ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "absentWidth"); } [NUnit.Framework.Test] - //TODO: change cmp file after DEVSIX-3123 fixed - [LogMessage(SvgLogMessageConstant.MISSING_WIDTH)] - [LogMessage(SvgLogMessageConstant.MISSING_HEIGHT)] public virtual void AbsentWidthAndHeight() { ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "absentWidthAndHeight"); } @@ -100,14 +91,12 @@ public virtual void InvalidWidth() { [NUnit.Framework.Test] public virtual void InvalidX() { - NUnit.Framework.Assert.Catch(typeof(StyledXMLParserException), () => ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER - , "invalidX")); + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "invalidX"); } [NUnit.Framework.Test] public virtual void InvalidY() { - NUnit.Framework.Assert.Catch(typeof(StyledXMLParserException), () => ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER - , "invalidY")); + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "invalidY"); } [NUnit.Framework.Test] diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs index 0d6fe8a7a6..66954bd0fa 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SvgTagSvgNodeRendererUnitTest.cs @@ -20,6 +20,8 @@ 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 System.Collections.Generic; using System.IO; using iText.Kernel.Geom; using iText.Kernel.Pdf; @@ -43,6 +45,7 @@ public virtual void CalculateNestedViewportSameAsParentTest() { context.PushCanvas(canvas); context.AddViewPort(expected); SvgTagSvgNodeRenderer parent = new SvgTagSvgNodeRenderer(); + parent.SetAttributesAndStyles(new Dictionary()); SvgTagSvgNodeRenderer renderer = new SvgTagSvgNodeRenderer(); renderer.SetParent(parent); Rectangle actual = renderer.CalculateViewPort(context); diff --git a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolTest.cs b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolTest.cs index d0c4af3a05..7f0a1a38fb 100644 --- a/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolTest.cs +++ b/itext.tests/itext.svg.tests/itext/svg/renderers/impl/SymbolTest.cs @@ -25,7 +25,6 @@ You should have received a copy of the GNU Affero General Public License 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")] @@ -64,23 +63,22 @@ public virtual void HeightPxAttrTest() { } [NUnit.Framework.Test] - [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED - )] public virtual void HeightPercentsAttrTest() { - // TODO DEVSIX-4388 The handling of width and height attributes with percentages is not currently supported ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "heightPercentsAttrTest"); } + [NUnit.Framework.Test] + public virtual void HeightEmTest() { + ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "heightEmTest"); + } + [NUnit.Framework.Test] public virtual void WidthPxAttrTest() { ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "widthPxAttrTest"); } [NUnit.Framework.Test] - [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED - )] public virtual void WidthPercentsAttrTest() { - // TODO DEVSIX-4388 The handling of width and height attributes with percentages is not currently supported ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "widthPercentsAttrTest"); } @@ -90,15 +88,13 @@ public virtual void WidthHeightAttrPxTest() { } [NUnit.Framework.Test] - [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED - , Count = 2)] public virtual void WidthHeightAttrPercentsPxTest() { - // TODO DEVSIX-4388 The handling of width and height attributes with percentages is not currently supported ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "widthHeightAttrPercentsPxTest"); } [NUnit.Framework.Test] public virtual void PreserveAspectRatioViewBoxTest() { + // TODO DEVSIX-3537 Processing of preserveAspectRatio attribute with offsets x and y is not currently supported ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "preserveAspectRatioViewBoxTest"); } @@ -169,29 +165,20 @@ public virtual void UseHeightWidthAllUnitsTest() { } [NUnit.Framework.Test] - [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED - )] public virtual void UseSymbolHeightWidthAllUnitsTest() { - // TODO DEVSIX-4388 The handling of width and height attributes with percentages is not currently supported // TODO DEVSIX-4566 Processing of width&height attributes in use tag are not currently supported ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "useSymbolHeightWidthAllUnitsTest", properties ); } [NUnit.Framework.Test] - [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED - , Count = 2)] public virtual void UseSymbolXYContrudictionAllUnitsTest() { - // TODO DEVSIX-4388 The handling of x and y attributes with percentages is not currently supported ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "useSymbolXYContrudictionAllUnitsTest", properties ); } [NUnit.Framework.Test] - [LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED - , Count = 4)] public virtual void UseSymbolCoordinatesContrudictionTest() { - // TODO DEVSIX-2654 Percent values are not correctly processed ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "useSymbolCoordinatesContrudiction", properties ); } diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_diffViewBoxAndPortPercent1Test.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_diffViewBoxAndPortPercent1Test.pdf new file mode 100644 index 0000000000000000000000000000000000000000..de788ea81780ea24fc469a6a7bbeaa1e84d071b5 GIT binary patch literal 1649 zcmc&!+iuf95PjdT*q5lSQ0%>W*QkorCZtsK5|Rjz+CKQQ4nc|CuAS2IN4)SWJn#qb zBh0$arHv@OVI}f-cIM2S*_mk#di^%_6l(qa_5BBunBXG*g!cFS6O&J>kC?Jfr>v}r z=I93b{W-)O0kX*FDop<2z$96j3LK)v*8-SXaPRFI>5~1MHaBv4@6QZ{4 zMpZN`CTnB9Htqt+YFgyIs4}~~my9q$86`B3itrbN?+~)H=bsko^9BQ3q>IGZ-Raoe zRo`&8um*=7^+Z7#R6(a{WsIJyl|BtUiqt1lxr7Py~gEmSvyV$hX2*_hQq-BbNQ9SuFF4K z#FZ;{zp(R%Sj|PP`ok5T;I@0Y7|9&9aCtkywkWFlRtR=yntGbK)B5dPRstw*HY{t5 z=X%a%_n2N=NDMayZM!DOsn}!)t@L*;z+;I7Xx5ka(bWma}PYKpnVm;4T|+w&6gqoh&hh2ZK@@2LWab!U1;nJT?nGwgi8W zH_$yvXjo6vc2ZmcJ|qQHYw@4lv`dPBTP*;q2e0kTaA!>h%r$}@Zyp>-$tBM4QpYH? zhI??n(g~)wbW8$;Cw4@^1U%JI$nA+vsBlZC2u#(|uCmc|W~|$O$31+p&%!{YX~>x* zkq`lmk|c{`86^RgQZa25BZ{Y*iG(C+#uF`*NM>owgjPC@G);{PBFa=qc$z>Ts(@#) zmOSQC(^zOD63&zoBoT&l7BHPkrJ^86htxwhMK?Z;aVl~rV``tm7d0<~JN&im*$CvoVsOutid&C>4Q$#IDnz`M9>x7D&9%hjJa*QbNgT(i?Ttt8~#D zv=`}6mOqWrw7UuxG=6;Z=EETy{cf+xT8cD&{QUNvNT85MH{|fpIn&vs{0NM<+eK+~ zI45_+>CG8*bMlrDoh3DlmUR&u*G`_5Ix7pXas%gFC)4maf4HLfR|XP%!N*QNG{^y7 zQ3krm7beyP2L5mv-RQVP%SQ9;dK({SWTx{SmC@s^MyZKzw{1!`5r!Uh4R)cZLsZO8 zScbEFvLU-0atDhnr+L;5OTFKH$tf3%Gs-;a3-yA!dz9`SIOlotJfUy$WD#q#KOO0Z z@+)+5qakRq7HtkMj{3vbmm|2|KRW53!M!#G2E0CiFPu`^v?1Z>);ty(PE5YIg^PCw zn_O+H>cTqt0(-}tH`AoJvYj7{opmdUjf?GG?Q*>8ol7a;J6`Q@;5mP8zp~m@`-h9D zw9W42X1*Rp8y4X~mHB z+|1eRw##b@J8_KT>&bP2F7>x7#8LWtEwz#-tr8eb-jfUuz_P@_3Fa>06V_*NQi;t} zN&7?M5KqTl1u;M(Z6R!#vuUOgW*&NC?Xos!TMiV=WTnYl+{Q+-OF;zqMeX!?ZO^Nf z(b&>$Ny>ui9POs#^C}(8v9kWj%T?$@F;r#P{w&>g?}P`VQ>@u1INkLFo|LYH6jm5# z*i`#Kw#EeacQ7uogeN?zaQ2^K43m3;2^H*MisBfqc%=!aGi~g>ciM%k!yw>M6et}i zmr1QPSEr=KUnZrgl>h($ literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_imageAttributesEmUnits.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_imageAttributesEmUnits.pdf index 04c96ea56b845b57e8b5ef31606d70f941e421c3..42cd3612e89eb79c6cde4c14f6b43ea3c4c2421c 100644 GIT binary patch delta 524 zcmb_X%Sr=55G3*BUL=BeQ8JehHMp7Xo~H)!5QPQB4-gNtJ2Q!35{Qe}e8m2RCn0CQ z$e(aGhv-$X8=9iJnyOw8z6KxN))@i^EfwN`Q=jwx>F|Ex$F2+~;|t^{U@NGy*89G+ zk{N+d!@Dq_lv8F^_1QkGj@p;DrdcsddhGRW!j_9gnE>N;HxrOj*=#Abdc$r(F{`HS z>*I5R6o`SW#ioH<3jkAlWSw6M1WZw{_jbCSmFCEJQ*6$X4dC2L^~04*_xuu;$!Ijp z#_VyV(P0o;AbAqe3CVLs#uX|EFLdOw@FvuM0-++L7$WGx2xS8)Ze#R8QErtaXN}h@ z=RF}17Z{wyptA+Alp?c>Gf_NZj)~i CWrOJe delta 447 zcmc(ZJxT*n6otuXlj$OcfCzcb5Os>&`+n!Ch(%Ne6jxwz=l#US4Cr7d*@7^YTd)$c zEO8G`QUqLq2M!!K-+}X;ukx>P?*vhU7F=KsVgfKZp5E1dMol=HopRt3w?JF=KKD=o z>-;di4U2j6$dqn>l2Ln@oDJ5MdrC9*@;YbFb=|b@$>nf^|Ct~{w<-JEW_7bO9*nf+ z4Ax=`mTm%o1!&*)50({1J62jw>F3$h+!fyA0+K*w` MM@X~m>i#RLrGREp9V2$tKYv9;&dQ_yMAjWRq5~E!4$pKVtvFQ^B+U z<7c?rL-i^+1HV`rc_m35e0_KMia?}paY=>6iNvmg)g{vfd`5TgU=*dTi+Ok5WEA2IxCD@ zDvU0u!YFdmT8E)P@=-%ZfJR$qjgL|Zp>*MG0o=RG|BN8(41bSMJ?-b)871BB_5Drq E4YoyxssI20 delta 447 zcmc(bu}T9$5QfQV<8={3Kmu-aM7<(2yF0VHDq<0pfZ`Ka?Cssg#vEv{u*oX~4txl! zfG=g^J9tSE@Ch6k82JC6`S`!{RlYjvoFX!?l8SRsLxADQ=)Nw;eqJ4q&m>5VTSGJH zeC{KGX!mh+SIwsLCqdl&B>iTPoOjn!cuq6%`Zg6Wbv`p50hbs5iLl!; QK=aXSJ2PpPT|eBUza)Zlz5oCK diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_imageAttributesPercentUnits.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_imageAttributesPercentUnits.pdf index 337233ee475d430bf932fb0b91e26b3408387248..9c16791b0641fbf013b9fd3a113d48a9e027a3ab 100644 GIT binary patch delta 509 zcmcIe%Sr=55G3o#y@)ToD9$Cs5Zp}nY|lf3c!**^@dL!e%+5?Am;~bDH6O8`;YHA^ zf8Riu+>H2ph%+Zana$t)9v5P{m_=-Xn2AgbNCTdSFM*V zGQ@O__x8m09<#-KUZ%i!z0Cy_88uTHMsKryW* z$@#&tfD8l!s>Qm2s|Wy7XN)#~DG)G2^|rCbHWS4w*x6oEZQBf+v9w&+hsUr;2ZR1- z$nFM~qZd9(1kib5a*tM0bXqDGps)~#Oh8mNpp(K1;W+osIw~lHT2pANgvuk-E})~y zW0Znxfqjjm$cKhP?GW`Ob Ci-aZs delta 446 zcmc(ZO-chn5QRx}li5WK0TJxY5JMK}s-Et2sfdgC6Hq*Xi|X#0xG@0@F3lB$*?9#w zf*won;3S~n2`qR}@V@tWpM#IV+g_s&;IuPXxPdl3t$Y39)jW-PA^YP4)L6g|P+c@$ zx4>#u>t=W2d476*mVE;UTX-!1 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_linePercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_linePercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e646bc7c17baa91f45bfdf8395c3f6e2b728cde GIT binary patch literal 1855 zcmc&!&2G~`5WeqI>?NWViaopjSsPW6NtK}FW$i%A8*$-PIPeDW zBFs1@X%i^iSSjAg{LeSD(;JVD`odAH_x;D$Z!F-ztMnZ^IB=hta@M@%LJkIXV@tFkd=Q*&}RaZijcl84pRIpE(Q4tV6t3wNAY)ZwyK znV7m-+RW4#`1NV}&SVWz6fGqA0FQfSi^YzYv+GNPu4ZO1pp+;Pffij2B&fR(t>!Rk zl6f`TD0>^_Ar{#bRXIu;vp0GmLHa@p5Xu*xx)0txfP4GyNu}>r7~4uOGh_FPGjr8^ z;ls)r9y`K;{`C3bc>4JCjKA4CJRU#eAB?Rr;G2E^SpqwsJyM=$cOdA6GsIrSy ztgcb(`5@qd_vyk8^K8L-y#6rbwyK)8E5J!6q~`=A6;2$rCTjwj?{8=VY27t*l-=#} z`k{2B;vN9^TJmB&$lhIbQX>CaC)T)$;!EENd~OYU#Y)VcAV62g3>+2kj|joMC=Ejz z_<}Ae13qU{d_$X3TPY#3vhJ?C(fHjPq$+OX0bC*2_*>&3J-FF#d{}?)ETz@?xlyST zfQWIzwr)GaqRo6>T-I1OM)wE_tR2a~iR9|D77&r)EQC=T0yhNdVEf1_Lp)ni`{|fC z7OYbu`%{);CC4mBNK zu6e%1PHgdHfKYAmK;hfn<_R2?EuOF99i9S2X-hA@>94U#F*lZW`I8YpKadfaEJ~s{ zO!HWRiqcRc5k*>Mxz;L?3Fe)KAanwmr*fI1AkTt8B#`(JWHtiejWnX0v z`v$u&vNM!oCr*>@Z3S4Ohu{2tGaL@4larzJ3>*CY&!2xW%>}O)pV-ln{~D@g`;kjE z8a1tjbj?09|70!sq-MV|236jRaYZWOPIX*YEmUp8$=u9;19_P~tFJEv{?&=*ai}i+ zX=)L}m4nQnsW&!*1|7dYTYQ47#T9vrXn%x{e{Re5JuBzmt^iFfVKkzUC=iJneGatI z^e!B7oVMwzUhcrb4m`#r+p?}EX$uFFUzAXxR8mNzBN;yx!4n~#9QtqS{Bgk4*7+s_ zdr+Rkb^8Y&*A{r4O#K*_sV_^JU3xUAL|(g43Q10i_emY3T`j)Opht;I2HC~Sdo2MXp(y}BQW8+ zx>BfHv9vZVS77Oucsb!0N1@CT73L~R^FSshkwv0IC1RPYB+3>+0XhIJWfsO75@nJi z$?}CMat#Zq!$Rb7263U%SOMgjRx*u?M3`I`agnE?3IZskDdeIsSYk*6Fp)@8$V9S` zA&mb22rm7XRZ(-gPGsGk;!w$LWs)dEl;tA>9VUySD*r+SInLA!H~78w{SG Hov?oa@E`OV literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgHeightPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgHeightPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0645307a1632cb9b1bb13becaa86ebb86b3f774e GIT binary patch literal 1872 zcmc&#&2G~`5WeqI>?NWVioLt`+Fn#eDhVx!{)D6gq|$?b*1;&T+qDBNZ^VUH;lLZf zi!ifwoiv5OjXl`o+4=qE$G!3BpwFF<^nU#O_MJ$|Xq9{*dwcGYE@#bq%Ee$%H%7+` zaz)&O1*fBmydp%GS<40rRs5Ceuqqo}HZ?_a6ZcqWMf|k7K4B(dVI_xg z6VI#JO4wTo4sLD~?=$+9M!GzBRXFQaFkdK-7h_Oez?s1iE7Z{r=Tc+CV6leOn z`AUbC(NsCyVg2dJ{&@QQ^o+jS**_c~(U02H;PBlp{UR7+eRN6pFU?J@>7l8Xm-OWI z?kZM9TMh*l70dR=0&N2 z?S+u_g4oEAoRcZc(H|AK#~p$5132B1sClP!3pJ;m6aa<7Fkkk$9mwB}F9NU*WnToh z{yh&9frwW~MtmJf7|p-;MrSTyXlo5GM>4LUPdDCX2GHsGytu42K@A(m!jjU71htRu z0*MqlDu}FkzyW0dbqqcQ`0bT_v`lC&(h8w+r`l@dzg=?IM(1Em5g6C@&_GI0(wyG$ z1c&P2p=HPO1>n2E6B4rC;IR;fd6UPXrW-szR1bI|gM{zPapu8-yW=$`F6P?ca(^+R z=X+_MXkUxK4^kHKR0x);Fi=WInTp~piXxRnO3EnCx#UVDz6jDR=LyR^m1nu13YjV; zB9;0~C2`^h0hBV&SS-U>@l2+isWg%-@i`YvGA~k|4B`+d5qpFGAHjwDqRcCbe}RcR rfjwn6)Wn?@pJ8dk9_`sJ-p3{0zrVyu-NdG`4Z%GDKhWN@(*yDg&=2KmVM|#_-e&toz4TRj z=o_>z(iuvT9H&its}9s?IP=ZVHzFs?#pM*7fKC4R^S9rb=7Lwr2X=PmzA@#d{gH#5 z&6>70@s53D?&S{nqGI1NX3DHrqeL#==sK^;)|73-32x=SHCYi~R1dcTKXs&e=*c^G z8P{mTr8QZZrrOu3X)y2)*U1NywkT0FpY~_?xHomNdxmoJ`Q9MZ#>{4v5+wrY(bqs5 zO&`Kq&f_-TR-4gSjmC22(b(QT? zQ=b$!=Ar$S&#T(-$N@)8*YD1k>#whG`1_OdtK}R1$tgjp4f8>b7ko-DWSFNrHsQ^u4X>-JwX6tEdmxpgX&0O*v@U~y%8v(@ zf~;PeIm+&7c~f6HGT=%GuB>?XILOLVFVsni{MS0M#xaT~Jx6=IHtc&=V)oPmgt}tF z2{iu+Td*xk!~6hi7JSzUQfj_sYy6MU!O;RDB%d)#)&=Bi2zTcV;$hwAL+axdZr5mo^DU= z0K$V@+Bz<_rlyPvk zBhm~&21%lHBJvFK)DMDK2M{WiC?7-!K6+}MhEW=aex7)Vm*%LBL?mPyLy(wEM6sIv z{~6r5ugkpRbcLc;%B^Z@DiBVD`-kL(DdmI#F{p)TRRY-!Do}nSJ#*9 EFWQ_4g8%>k literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgWidthPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgWidthPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4c846f9a0796243755a59874d06327fa703fc6e7 GIT binary patch literal 2061 zcmc&#&2r;J5Wde-%*C}yQI_UcKUB(9iA};5yBlMtfU0Z``WYE**-~~SFInD*3$Ma~ zH-HzRd!$H?1A!Ylj9NY2-*ora>X|GTms9SAWb((Kzx_@$WwcH|kh3%Yjj1;6kCcnq ztZA)DcH|@RFL#_SYVs{1rpkLYNa&(Q*LhvFrfM6Ca4Y|<$;;%Tez;}usbfteCGPxX zV!?(AXR`8fJ9@<~&ytanM9{1RE{qB6Z{`&fczCSs?TE3y5jBVh+_owt1!5Ew3k@WoDer^oC zvi1I+zWeTUj1^1OCpNG5P&@8_Q|8SrR(^Ho52a{E7pz|Ia`CKoJ;QO}|8x06#CGLh z@6#5GeOcRGcUDi-&>vWMMyL1!hH17V6WV;*P+QlnV}()N<3f5Gcexiw&Sell`SHM# zq18)0htWMvZyE?sgj6y{r4#QS8(Av(LY^4Nf6Wte98Xa~d0J6x$oHgz=&=LCq%Y_JCS> zETrA)j&hq$%7|cIEUEiIm(B_$XOs~XJDYADwou5(Xzw5n(0cz1mq*9GBbW5ZcKOWQ6Pek&)*U`oWq4 z`ZFdlYx;)AxxrU9f!6*(y1_hrVANNx2JZT zM+dRAHYvBp;?4AWL2u78!Q+$_Do_QB;zH_(X`_o+a1}(nh_oz%LKIx9Fv^0WP-&j1 zJWOROh1N=$Sn)JX^B@V5P%#lGQwW*xFwjLBOU?2;PlG&Fg=7Mzv(#ZISsDb2rIAU} z+5aEGo&UNjYKm9b%3r~db>nsAugjm|#(_&<;;x`6-ayl*HxOys#I~*>xaI+wOuo9l GB!2-Nb_Qnv literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgXPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgXPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..52a4599cb50f34f543ccad2f3f6794e223114e6d GIT binary patch literal 1802 zcmc&#&2HO95WeqI%teTeLgfB%xnyAoaHQG|n#8JPGyxnR$mLRHAd$|JN}aw@FMX9B z`UdTbWQJxWTTb2HNIE`;R}F1`bXBo}HY8FI~Oreg+{Y zleY6N+prHTJlhDEHS9;mTwM%e+>uGNH=QRyxuVLRH@83o7ucfI3 z9YXY))2z$Z&1$c#_R3QP*;P$F%Q|;7`&M!p2`RWRkx=nBTs`Cb*>U))DV|oC`=;1h z=Z~sOcia6A)5beU0}=4?^7ZL_`TfNuygNEQpTC5U&bJuw-7)+oIp<>v38y#yQ|sW| zH`^O{{nPP2SE6bFHf^@Zod|!ZiuQ__UtEVfD%!mXu{W4Jf5hET;WQ5anSMjQd-|8# zyd$#D8o#-VH56*sA4EKdF)dhOup2gl_TvhC({z1RIMA7pD$sN)f;8z(b{iCaxTncU z>#3fj>>k1!$1;!x6z8D&?e(sa)l)brk^hPlG47*8G75AA-my2V#_Wj#bal>nU^M)K z6s)V-G2C<5&?2RVHCy5x+C%M6iIF?&VR@R3uiZgH@sJM=2Fb?Xo(E&@*BdX^zgL#h z8vNWt8fY$3?68B?uMo6budACDabt8vOdxjL>L8JKuiXJ{EcQa2^dWFUkPeoQtSs`` zAN8+6h;6|JB{JTb4i@EC$J4EMB|1wPUbNwXSZk%BgfB8Fus`X6dMAq{l6oMM8c`p} zxWQ|9C=*!q16gF!M>4|^@PS@>-(TmmYVACY+nTgHbC=x5iW4T^s{9VE~{U0+~Ncr_49X3<9GaU V{Ia&oeAhRGkQzUIqwg-x*k_(7)r0^5 literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgYPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_nestedSvgYPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e478f6795fb6c84bf43a3a7fe8ae0a80efb5abe0 GIT binary patch literal 1802 zcmc&#&2rl|5WeFnaM8q`jz|Cm2%_WBj4jo!r%9|xo+dMn4Lss| zL*Jlzk?b;zB+H4@TQL%`Tw+*OPA56Z=8 z)U@8EEAoznrz=h;HF-sdtMZ-=6spLr>bS02SG5gAbF=V;%ggknzQ1Dds*IwE6xZQ2 z^&mqVj)%XMd2@xx&#uD_6wOuz(d$)C9%0v4*u>%Y;n!%pgMYrx zS_J#F_NyzD<)I0K;R1iHv0H)3e3$&tt z0tCyla=?bS6%j%qu_SZ2L%XR06A}5M-EU8$@vS?ESvel!5Z0mIdIt zqwdi&p)E)+gvuM$UZeQtc)Itl0Aq&0Me7%hm5LNC=vSWL(4V+ywc$wtpziU6f~@y= zOv5$Y=W!T-dpxPlBc5iE@SdF6wb%NzTsn_q`FujJj<}OaF5)7VnYBC;Ea5J-Hcp(* ztcePp#Y)GK$c(gwQp)N)a#74g1V0_?g6ENqjkPRGolJpFd6uY@xy%@u*wm&*XIU<} zWRk^76e>xr;zmX?NsJl&{}Eh==T%WtoZqu>1{0>6EwgZ5{srR}Cg7l(ze60q!-wOS UG;QkJt|7Qk@aY@;a&byN17HHw!~g&Q literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_noViewBoxAndViewPortPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_noViewBoxAndViewPortPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e058420eb33695cb8070171ca450705cbe2c4464 GIT binary patch literal 1421 zcmc&!&2AGh5Wf2<<`T6PO4jzS_Xkyx+Juyf{)8j~q_zj|?j$T~*2TLiEpNnySK+`L zz>6?WwoPe7d&Gxi_L~{c`19v!4f}((=tQjb>-UeJOaTXzeqy`3-Vv6w`XdP0?N+r# zJ!hYpH<%0P8}^nlEb|5?%cTVC)SfA8Eb9u~b|dc?^Fr^Nn=?+IDp3#z^1>TxOEDmq zAtS8J!e&@e;SZsoS+2+C;A;2c#`Vj0=f zwZ1g7b+EqZocC)-wy@PIzyMygGBtk1o7>DynsgW3Nfs-{7vfVHJA+ray9fFXuIh7b3zynL0{m&%HB5*h{7$X5(W2UoMO)<~2SmrztDois!#V}3CnTL6#ra>Oc zI88M7m7fMtDB@IP6v0tsQ;{O(JW2wc_yKAM=uCv6uc9c|LCAfPh^Zfh-T&Xgg?Cs^ w4Y(OH@>4qu~i$D_gmSmwWJyVvO6qB^+GY+e*QaHOnhFd$+g2 z>Zw{EtY?;vI}*Gp^6J7fKbi*jR8*T3&)z!a@Q%BPLx}P8?t-}p{>^^mOE>I~muc;} z9vHh=wOZfPy*xbc7~1~j>O;0bEvT+%V2!Drc2@4y)A^o~lJEKqYC`!#*iI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-E9Yl0TU40H2d0QgoJGT>lF90weg3KUi@3FQY0`SIKu6sf^(PCl&*9R!@iqE^R>=%f(JT> zBR^Yy;NyUA>lpTBOXvCF1Dz0fX;yxfjk@k{Goc>W?`YV0t zAGANx8H&2ZZj#4PfH<5vb33y;z47S0FM^o${`vQ>znK9JRrZmcoP@7kxoAFskb^

pYX~Tt4C3;zT7$twQz$0l|+RI^yqpZL*1ol zk;Ak}m(^kqR(tRen{0}z9Hosr8a+w)0a4HXUI<}8= zvA`?0#Wg-Hmd?{^d^v*alev^Cl95m*NoFRCbYd;f<1|ywYN7R9XIka+B%eo-O-yRJ z*15`EoLDL6E;cU7X4b}5%(O~!Ayk@bZL<`S$_SD1#0jb6M7fxYoD1hn=3L6PltS@r z@bfFU3161;3TTH;!UnuKD*ylh literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_svgWidthAndHeightEmAndRemTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_svgWidthAndHeightEmAndRemTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5df804c8b036e9e4f4e233952784be32ffd1a33b GIT binary patch literal 1605 zcmc&!&2rN)5Wedv_L6BkOkzp4ESu?MrcFp;fHou@V5an7OL8!i*gKX%OoE;1s4Qwz)D<{)Gw-?4d2(D{T~PcLv4AMxm)-`RbmR^Xs)iR|_*7x|CcZ3@y4E+(FfaXpp0% zPL}0j2ljX15f)kJWid`_vp;^wDGwN@ArqYY(F5x5QMz~FJumg&0aIJ*jWTvWKQ~wP z7Z{b+Ks;ar+Mk~uP3Mo#&f(4e(aH1~d@#1cfNu`qGpCgHT}U`u+w01}i7hv4IDL7r z%hgfU6*ek2$Q|>Z=DNCY%+D^pEfv+y#Ie_z9N%zZ_?Uv zJt^&~4b}B&J06aA3VrvH9Mp>Rp!%=?Tb4DBPJ7z!c=oqRazX!*w9js3jnnb({9JZz z?O+XgMGDNy>9E2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;OV{t+@Zz62b^_9?=W;R}OzaSx}GfPa%Z?f;iL z9JO!P`caa$pnG5!i{h@ftc8eBm)%MF0~sOofsU|8fVjg~%KAtvZUs$WeUf&H?U86> z?I|2+30u|9oUA*4*j>bDtF#H5vi#9y_26udHHsOI-THx0DPKVj8<`YX4|<^7$^y)O zUnUh!*`6NPIF$P`1hOv+bbKHSHTL_SZ5-qLY-Eiy#lkvT($B|meWG$6`nk}7(TN}N zkV|F#lqY@?D4PaZkXfn2NW`hmlnA5H&(bh8Dl=KCl{Plgev->D$)d!@I^sN1ahlr1 z7a}!68&r*bqk;%;wa5}dlJ3aQWgs e?6uptPs_Of^)hC4V_efVgpgXWUhkL7bM^(u;@S!T literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolXPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_symbolXPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6411025c8ad2a789ca830406cac04753df2670d4 GIT binary patch literal 1809 zcmc&!+iu%N5PjdTm=_^73W>AJ%aVm5z>#7%$i=E;GzA<#kjtgQKqBoWl{opMzVui6 z&_8H@q%+hlkyATwAtdbX?A*?o+38KjXMH))qW90gfBh{&K&Z3#;^f48X{&kr4x}0m zo7UNMDQ<;#wv;fg#jirxD&L4{$0otvbW~TZt=b0I-PC(!^D=!}-(4Xc!z6?_P}klh zb)*BTQ<>VPUO8hM3jF&;_THM7b{s9@`yqYar7M^Byj*^|vE*uQheJ+@6Om-G!N3>I zCPb$>O51c%&-cpyUU@_y+p@04X={(hKPyy$RG7#pkbd$L`cDv_9DA?o{9%QOtMiqy z?x?)9ckQ1rs-1;oAP3l=y*{1Hez~}Ww@0Vvlb7(px`qP2J%&FNBKA2XoZh%kjfHbp zuWsP=Z^!#wnW_!2QN1GWr1zrCn=591dhP9~X!a(|-p1tVmOCF2=zqPfu$JEc)34cg zNB?YEObD@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ttributesRelativeUnitTest/cmp_useWidthPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2a7b67bbf2bff20c4c480936f7bcdce0772a6ba3 GIT binary patch literal 1793 zcmc&!OK#gR5Z&_>voVsOutid$C>4Q$#ID<*`8c-G7D&9%hjJa*Rzk@^(i?Ttt8~#D zv=`}+{wQ%0r@IQaOb_SH%zGS8t=sO@SwoWA?>|3(5djqP_=@cBJI87^D!&5b&1O+* z6-~(vaXM25?VOwwqGsvRj4K22DrhU8m1DT)eW)LTLhSK7Ih0)B_96PC<*S$=6^TlxF* zxHMvSay?z-S{~H8KaB7c>gLDfNT#F)#q9`mo|nWFPwi3Iof~^h6c!kC-PT&Bh)otu zAXro^Sh$TwfD!(chN*KI9ke2!$qYN+7%AuxE*B*~Q~3EqzZ$5?WPDvH;!^MgOwF%w z8$1AR-@eHL_)du5kld_R4i=DLPIs|mwh@i)_)f?Ik4y8h9=O013CW(lnTGtU@_GKl zF2L*d`gv~`>X86gx)oqi`kKIs(TW5%h}Fh&H3C%pt*K&f$**7-<|XcTT4fj~BzV7; z5BNg30y0?HIK#s<56sp!56@}S#syxd4L>UJ_HEj*o=ux4!zVUhVqaWDCT#SAG<;YDoL^|Vm=q4q+ycE&`ndCWWJ0N&yRc; zfzW&q|9=HT=V+GY wV8(XO>EU3p6Qt+#$KPg8*#&{aKRhE zi*SycwycbeJ0dkb{m%b)?9h0pnF!XfwmPJf889sQF< z(jeJ~m7OnhwS!up4?nQ0uo`JJif(#bxcXKvI_`@_Qnp%Qs{N7~UySsuv0r6>F6sfD$x- zIc58HFn}pp1_2S>R{qW>zw?44hYwAGhyL$VfLr_UvAL7)HGvxz1QN`V2PX-~1ed)q zLSk3^k}gaL7EFj>7ty7m6Tv$rPICROO_%OS$}%1tR7~cKR%ugmH!U~TfH9_O#Oy6Ru?m4 zao-;g>DgW$C%Lbr(kfy)$%RPsDA9olvs@*9k}$(kX0lu)Dw8^5#sqOBqa;h?RAzaY zDnE>Mq=b&OZ$u#Sgl9U{K`bH_bD<+p>Lf4;7qKrhsp2p-No=&AnT)6X|6jqmcUacGTFL6rW*_!)oog#oooe-o3roN!@7MxC6ocK#@-8>B%Aa1ysuG&;S4c literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_useXPercentTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_useXPercentTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2e83fb9c27ea558185b27a7760ecfa96650f6a80 GIT binary patch literal 1891 zcmc&#&2HO95WeqI>_v!;LgM}}Sr`Hwsdj@Vu_7610mlcDTB-~r(q2-j(>LlRuaZOG zpm~wZtSBi~T)Vdt&~h~Y^Ucn%HyNMx`M{FiKVLroO*Cb+&fb%gljxTrJ#ih$&$r94xvTP|$QC zg61e~(`CKbE6cs|2#RdWx*DggI~xBem{44>gd1VF`hm%3j6FM!Ue)u*6(+u(uXE>* z%1d|Gexjq=JDLpmfc0muPbagVFD~i3qto-rOZvh21_Hi2rhf^>SRX^u(;NS>arE5R z>l^y|?eRWWgsLlSRIdR$9{p0zn=3?qdL8YcX!a(EUT5-ri=AYQ!tZ+9Vaua`hu@;_ z0RL>AwFvfE?N^&vU88pQ1A%9>k1vdouSkzJ9~RWtbxSaL7FrP`x1mjpZfrpHv8#ni z99F?K80&o%!iY!8h{3~uEd%rHyi@PUucU&TzsYlYPT0U|`Uh0DEGtJ6R9@kWb1~3# zNoFt{w*=XY`o*qFV?ipPD*c{mkGkcuylFxd2pYn~av);5IUy>r;mnCK11pd;tP=tO zLXZG22)i?|ftizy6ClxSYaeWi2L~K6e5woF%5S>>Q~UI_c@Xa%fO`}K0?ZMIK#70^ z*8>|Puv>gdA36jJ#v-$i+>K%&!8#{_3ia+(H|7Y+#vfc%3>K8OVRP~@EO*`&(C>u6 z1a}WLT1!m}y5$KD_Xi(Z?RX0Mc*qkP2KGRYS(xub9u#uOQ#SdIXDp1)eOu1VH@w!T z<csMd8J!-e2d8PePHXZjA-2kUF{}_0?V*#pYHigv6wS?pS2iz`r}frKE$w)WAz>gK5Pc4~ z(ey67<|Jv8RlVFRhkNA-B-xgAHBDN3H2qmH5plr`S0ZNmCl)?o?8$NPs?Hx*n7KON zWY!&(m-epxlTK=9sTuJR8!ld-&KAF1T+(+(r{}Ym^rLkRIDB_Z{}7C^A-bfeH|}#| z>A9;nH}v(J<9)11RiD_T-T-$zcv0rf6*51+4t7*DdkC`EL!NHA3mK#Ezus0@^WgjR zYqag@Uu@DA$v&&yy7Sc+YS$k~JflN=ppR@#2DJIOq^_=8g26Li3cqvf%fx7h0oBJ^ z3xhb!f=d9)eHKERN79JF!hcNzPqy_C_ z=r+L@U|R%|t8(OIcbZQbt*tm?DZyq4T&X z#{Yi=*TM6us40FG=D{51mLE{_U{U@KLmcMnz)$rd4)x*vp-!4MajkC%9!4P<44z$_ FkuOAZ=XwAD literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_viewportFromConverterPropertiesTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/cmp_viewportFromConverterPropertiesTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c255769b3aca3b6d2c4c3ab1457077e20a71a1d0 GIT binary patch literal 1663 zcmc&!&2HO95WeqI%teTeLgN0C%fb*~OSKy`iB-vH3phSdi z2JMS&pn&@A7vv$NXT-!q1F(Ywj=Df*B)Y3dH^t_5Fi9=*n*$}XCRTTZ_wHDI;8i)NW4 z49EbPW7}+9jx9C*>3aDN^NuXvE%xy-J<*M;HqWZue7r|0wZie(kK_jtl+knWfwpfE zkdv&-*3IewRtNBeNOo0IPqPkBre8}gwU9yxtCg@{arJ`p7pKwdruZ^o=9*%gqdTc? z@S*!1CXGW#M`FZ>i#O-9#kbct@b={VYW4~~plhk&+f(>Wa?XdoC7j>8k1fKLYqt0B z=7-b6tX`^~*reH#b|U(&D%xAG{QNH3OVJ)uyn21g#iMr8&?<0#w_jl{qtEM~_~JqT z#dg_wwJ#gD*){7|YQI6e@*IZ#Lk%F`umQ9mR^XbZ3(La6$AnEr#z*YX?H5Y{Uy>Y#+?%Te7 zUoebf^oS?0dk04d1}kThk5UEU$Iq}sc`JZ&=FJ^u_uhxRk+TCnlsKx^=U@EmJ@MeM zB>60(9p66?8>0-A@aUss2O$Ra-lwH~=97l>@y`*CCv+a3`UI`Y6Q54fXTF3V`8t7GDTu* + + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/diffViewBoxAndPortPercent2Test.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/diffViewBoxAndPortPercent2Test.svg new file mode 100644 index 0000000000..31c69793c3 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/diffViewBoxAndPortPercent2Test.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/linePercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/linePercentTest.svg new file mode 100644 index 0000000000..0bfd9583c3 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/linePercentTest.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgAllPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgAllPercentTest.svg new file mode 100644 index 0000000000..01523b19a9 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgAllPercentTest.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgHeightPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgHeightPercentTest.svg new file mode 100644 index 0000000000..700b75413d --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgHeightPercentTest.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthEmTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthEmTest.svg new file mode 100644 index 0000000000..431c3d1815 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthEmTest.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthPercentTest.svg new file mode 100644 index 0000000000..47de0c3a5f --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgWidthPercentTest.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgXPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgXPercentTest.svg new file mode 100644 index 0000000000..82ab30e45a --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgXPercentTest.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgYPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgYPercentTest.svg new file mode 100644 index 0000000000..3d1b3270b7 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/nestedSvgYPercentTest.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxAndViewPortPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxAndViewPortPercentTest.svg new file mode 100644 index 0000000000..378eb0275a --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxAndViewPortPercentTest.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxPercentTest.svg new file mode 100644 index 0000000000..200900d23e --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/noViewBoxPercentTest.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgHeightPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgHeightPercentTest.svg new file mode 100644 index 0000000000..50fe9ed7a0 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgHeightPercentTest.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgViewboxWidthPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgViewboxWidthPercentTest.svg new file mode 100644 index 0000000000..6ed8ca1468 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgViewboxWidthPercentTest.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthAndHeightEmAndRemTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthAndHeightEmAndRemTest.svg new file mode 100644 index 0000000000..2a31507eaf --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthAndHeightEmAndRemTest.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthPercentTest.svg new file mode 100644 index 0000000000..7a23366afd --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/svgWidthPercentTest.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightEmAndRemTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightEmAndRemTest.svg new file mode 100644 index 0000000000..2d64137d8e --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightEmAndRemTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightPercentTest.svg new file mode 100644 index 0000000000..c4079b4274 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolWidthAndHeightPercentTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXAndYEmAndRemTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXAndYEmAndRemTest.svg new file mode 100644 index 0000000000..df0550da30 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXAndYEmAndRemTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXPercentTest.svg new file mode 100644 index 0000000000..ccad59fbe4 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolXPercentTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolYPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolYPercentTest.svg new file mode 100644 index 0000000000..9096463e85 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/symbolYPercentTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useWidthPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useWidthPercentTest.svg new file mode 100644 index 0000000000..fd87741228 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useWidthPercentTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXAndYEmAndRemTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXAndYEmAndRemTest.svg new file mode 100644 index 0000000000..9139e9c039 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXAndYEmAndRemTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXPercentTest.svg new file mode 100644 index 0000000000..2f3fb6ca4b --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useXPercentTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useYPercentTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useYPercentTest.svg new file mode 100644 index 0000000000..32d629241c --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/useYPercentTest.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/viewportFromConverterPropertiesTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/viewportFromConverterPropertiesTest.svg new file mode 100644 index 0000000000..6ed8ca1468 --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/AttributesRelativeUnitTest/viewportFromConverterPropertiesTest.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/FontRelativeUnitTest/cmp_markerFontSizeInheritanceFromDifsTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/FontRelativeUnitTest/cmp_markerFontSizeInheritanceFromDifsTest.pdf index 1bcf284af99d2e99346ad1abebdddafabe0ccf6e..d418785977dec123c07f6706dfe88e860e83d984 100644 GIT binary patch delta 370 zcmc)EJx)SF6o%n|kRUBqR<|KYOyqoL{_YrKVuB_{iEe;m&deFDw4rAacLBNt65N`- zShxo3=Plmdz#8PROMSiP5J+UVKxl8G(&FWBGrzK>487p{S$_2N2CZ3gy&;i delta 392 zcmcJ}J4ypl6o6rp5YQ=2X>*$pLy9@)+_wx?V<4!w0I@jtrGiEX1D09DY$Onu;ZCgW zjfJh9fBhHV`(!uSiNPE+C^BFdAZGxxd42PmTJG{$drm+K>37(#24ABS4FWaX*VlRd z&^-!tzW*Ga_Ag`Vm!rl0WBfMUN-y9iu@+Ug;iu=kshXxY6eMSCE;gw}Sc?!vyu9~z-+qXQMHGvOg|)@*-fq&wfCf8BYkxn&RA|A;9o(biJs@ewhx&Cj_LB@Hfy*IC}jU{f>mYc{j12G!a(D@yQ@e(5|~`;h}OD{Az-ag*T_jbmy@!F zway*`OOVWpbPTFy@IC|=kOE~FI3}4anq+ehk|G=Bv(ph$(kURbkuEAgt)2I^Q|!^Q cwt7{co&M*9t#(86ynWR}Kvxb17dMyXH$v=tf&c&j delta 422 zcmc(ZJxT;Y6oi@CHE=XBFfti~VHJaYuV26Z5fOt`3|0(`4SM=#O>{s9(@hP9jy!>> zAfCgMcn60K6i;AK6jXf_^|bl9@wQtW05U6v!6yKd{pm#)X0DHWvqJ$wqQGAu&x_YB zG*Az^p3dXlqQ9v*kISo7>Tj#2et2Be_g&ZL=kjEGMgF1Da{el5{ik`yQ7THM^2>N< z$)=6$k%F=itVtxa$B+nuZ%s7P#)vMu7?oxRM3kfrP8p?j8$|Lz&IcL6Y3me85ivQ3 xqLl)r62k<`6u`&UNhU#lpvkaHTB8TH%W!=3pBF~Mhy1a2URgy|)0|$ORo^S8a(n;) 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 index 1a7348601f38dc1af1c4dc8abdcd4df94011cd75..db6081c6091a2938fe41ec49a707c6c01f53fa69 100644 GIT binary patch delta 480 zcmc(aze)o^5XQ-IHW!=JBCJJ-61>dL?%eE35R0fy#KPKQZ~r7s3}~=4t^GZOtzhjl z_&j!A6ryh+1H;E}K4!l8=sxeh9(0B*2?1~jY5*`e8eJ{J#I54txE)eqeYzi8&!+5WNO zQdL445beEIZnq<-<~>urzYfwREt~5JoQCcN& z^GBlk8(W6jMJcU|=ov!_M9~KoJUhc4La2#6V)V(7)f@t?RT4b*~ zXrLN$Jza#mWq(sqD)OuK>Tb)rdU#w`_g&Yg=lo=MZT_*5DShQ~>xaDKM$B@p(@U|p z!d5Bo0|-aPaU-;KE@}wUJFO#oVdQ{Wl6K^Y2!jGkKqQTi4M=KQgHfPE!^}Y`9T6b} x;D)(nlm@jR6}?iei2~S2Ysj(?G6t(w_IUQ67mDG7O&^=*C2LvM_37nV`3+UGZfO7j 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 index b81b1d01eee6fe2cc05d4dbdbcb69cae7438db7e..9ca5ce762cc0df7a29fc3a6ea84bab547f6c5993 100644 GIT binary patch delta 483 zcmc&vJxc>Y5G7~QoHkkt!diqV!OQII%=!6vxAFVlmMOl|*FFcli#zp}g5h6dH#w0D=$s-TnIl7oWCj-*zWDwaXA z=TQ2Zl;?=-Lal=~l>$!TqIcv1R*{tj$5kw;t|j`&tWxx}#gS1v&n{949z7vhuQ2JO hkETSfO`x#EljHxi&`ut(dG1_nN|2OyyJuJD`8RR8d;tIe delta 446 zcmcJJy-EW?6opA7g{zH%{iFy{EOO`G`ISX1q9Q~DTM?X@y%PmZATG8kd;-~ruvL5t zU&d!}Z4@l*Jk5b~zT$gae_wm)cXmM`Naz!Lmm_NxJlT-7 z^4hS&N;(QzB}69B0eq6l*eDS_xS%;KjSkLcN$swcBj=Ne$;PCaZ3X-PtwipZ!&yI>u!ufY0 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 index 2d6f0713f98370e3195b3d278cdd1ffc1a18ea8b..e1dde4db92c0b4350d7a391002aa15b9252b69db 100644 GIT binary patch delta 479 zcmc&uyGlbr5GB{x+}Na7Sc?!vyqU*tc2-0zqBao=Ym3e9-lT~E4VI?0zaL>MSo;lr zkDVKY=pV?y%;B7wGv~AOvh%jzI);XncEj#mQI;+F2(dMwvJVoU=pp9EC(2Vw5^* z&mL2Zs5zw+$)h(yX=1c!K{k*_9VSE=l17`fB{oFaAQ8Y&GfP%%7}n8RfqamHIF{Af Ysr+Yzt(>8G-oEM}peuX5i<`^x8}(dwlK=n! delta 422 zcmc(Zu}TCn7=+oqvv9Ssu(Mc;P#{GAL4OmGv5waFQ_+u>nQi7zd025Dk-O x;e}R-e6-%PGBG$SwPWxSq>2hrCZ`kd^7zR7=Y`SmA%Co$S60iaX-+TCs&Dd0aMu6; 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 index 3bbaa8c50c9612f577a12ccfe1a830aeed69a6a9..4dec44173249698dcf3324bc7cd5208caf4c6836 100644 GIT binary patch delta 480 zcmc&wy-EW?5GF@#E;gw}Sc?!Pc$uI56%mW5O~k_5Vt4O0X<|TwrD^T&A#4R}pTXy` zbAu3l1DRnMzWHY6oB8a$?7kgzMg|oDzzBEN} zSV?!|X>&hY&4p{b#jVSTh>LO{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30E<#E+kL<(z;thR(Z;#!((e3_fEekQ&@YPDEi_Q0 zlGn3Ex?6TPwN(A2yxJU49d4_pet2Bg_ifwt&*jPXp#IU(%KobqYd_CBjdC$kiu#xF z&WbU3wv-)8mu1XWXqQq@Mx(-%qR^NrIz!-HM9qe!b|g%cfgrHXK7$K{3|>>jq&$-d y3Y25VAd(6Yg0T)kM)n@TsAzR&V|^OdDjgsFXTo@BNd3p;ys}DEO>=sAR(%5uuW}Rs 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 index 25d03e4ae2d12ddbfe5a5d83664f47f6a67aca26..1c98606504616ea0966e6b65bff5b759aeceefa7 100644 GIT binary patch delta 505 zcmcIeJxc>Y6eI^}E;iZ=YZ0QTm$z@<-tI~ei>L?@!B#Bx_9GEY0`agkwe|f7Tfy4j z;P0_>gAh{L`38nz-Z0Ep=XL9ywT`&rk{f9bLG%E62mR~0AKE(X4^I$~IBo=*QR{6- z8p$-_eSZ{Y<9fo3YTDWDNwS!m=3VymJZ6jeyv{j;gcWnr1)9}c6yn!j3pZ^h+1c(f zQK3u5H82E|?Cx^NMB|MKlI&Wnl3J`3RG6k^G7^=j=DHIw)>4J13I8}PDv?7-Z u^imp~KKHyWR7fi~I-ld4k>m delta 426 zcmc(ZJxat-6h=vArZCzl*jS|rqbSV1_ucm=A{L`IBZ9rf`yCq%Xt15yQc}7ATfxF* zxD(f4DiJqe_i?^coTrV?^|!h>0E<#E+kL<(z;thR(Z;#!((e3_fEekQ&@YPDEi_Q0 zlGn3Ex?6TPwN(A2yxJU49d4_pet2Bg_ifwt&*jPXp#IU(%KobqYd_CBjdC$kiu#xF z&WbU3wv-)8mu1XWXqQq@Mx(-%qR^NrIz!-HM9qe!b|g%cfgrHXK7$K{3|>>jq&$-d y3Y25VAd(6Yg0T)kM)n@TsAzR&V|^OdDjgsFXTo@BNd3p;ys}DEO>=sAR(%5uuW}Rs 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 index 17e1c5564ab335afbbdc204a2e637167e5ffc3fe..785010522ee2966f4a2c359d1e02980c82d93ab5 100644 GIT binary patch delta 480 zcmc&uJxc>Y5G6-!E;gw}Sc?!Pc$wMRPZ6<*+C(g@E%x?yk|rK#ur#gx{RmsZ+TY;s zvGWcg`VVA=;qm6ZnfEz(*?l|cO)P2&XeK~ofbr4vx~^tnoepOw5~M=wjTv&_!-kI5Ef z1UeAyzZPzqv2nLR)v-CUm5o@3r*Ich*>6zj4w)U^u9CtKM_u1uV4 zG~RM>HW{l)IgEf*l`M@dZ3?UvB+v|HXXQkQr4LSfi4+t|GF1f;N=`v1$4u-3VJqZ~ aJ3IZ)2>mvLYo2$m1_+vkz&D)!ryFq!iTASNySU)_@>-)u`?Vih%ofY|qM$g?>NgF@UJFexTG^TqQ z>@K4i;sidBW~7F-&(<_i=crgR8w19(u#pseRN_blh*r=grvPkroH#^Fnb~Vmh(;yC xK;k56ok9|k1|USqMAY7`dnU^J8c@GS3&$ES&Sn9mnE3TSH8QM*F=)mRnkM_vQZ>S=bm zccgXUtUw1sf^TqrADagsncDvAFuEZ5{*~ReHV9OG)81XWP#SBil5Ij~lO+$pDkxTw zZIoQbpse%Efi+_Uj7kR3&Ka*9Cu0*;RHaassgfo8;2~)yMrDXYBq)Qk%ES~%+h&KT iL20d&mYniSIywH&2<;{V)z6)aO$5|=w|jPVo__-*I(``d delta 446 zcmcJJy-LJD6opA-3!{yK{cI6dvB><~JDHIn7Euva1X~fD%-mT8-M|`bx9|xh4`HkL z6uyklU~CjD?7Yo^dp-`|Ds!r#Njx?K;}7_av7fr1$~)Y4W@& z3}-^)Wih4sth;8Y`%!wnF}#?+%W`)AFk_3h?fR$mU~52s;lkMdBUP*4&6`}gN|stn z#=nluS=KGw%`Gjmswz%uc2PO!LHX#B$Hr-bvhiA~rm+S};S4Glg9NnEX-+yCDobZL zCkalHCn;<|(-3)2P6Qx`%6b3{L2KItu3$-4A%qZJ0Ivsh81Ye&h^q7`_WxU9JUINV R(7%q3GmB-G=Z9xU*(dM(dz%0N 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 index 51acf4452ffcb001f535753886e57dc403930294..9e317c3b7a7409cb6cde1da22bf793ebf0fbbdbc 100644 GIT binary patch delta 483 zcmc&vyGlbr5GB{7x!Pzc2x}3d1aD?`XJ0|YB5D&6tQFk5kEDqK4PuwVPq-gpD_Hvh zev+LVgyAPZm>Vb<-)XhnZr2R(9Fr(}X?D=Zg{<6 zBC3pHXn=9B8Ls^?2YeJ_`>#S$rTP0;ao5_=Aex)@?lLMZ3=f8oNIS4ephvER2&iII z4$&mk5?xKw$7F*Q&L$)oYa#>;2DKLyyoMTrl<1`wwzdkiHOMKsuXH h4pc3q5_0KIj{mblJ9lu+bLV0+|3YQAdv5i@)5R* zU*XUA4Q3k!3p;Of;oei6r_GOz*KxEDD5a7(^aNnCmz_1fvK{SK2OM~g9Djg*7QJkv z28K#rWiwjLyBj7|KZ-B5hKafRBxMhebJjLZ*FVRHI|KR)M{WAgSge0P?|kh#S}MgE ztil#7=~{bxM{QD;*=fZt%N!6aIwv4kC`_R=7%e0i&;S%13GM2h!UHF5 zQHIqagLfRr8;6EO%|-A5fvh)1daI>f7D5RqbnYz%p(r<|CPJlv3vw|1Z-w#T@V7$$ QHaba+ERr-mIzLXn0F(H38vpe%J8K3Pf+^Ld?f2B}xbr76&^Xip#ysRk^5?qW)!V zcZI>TrR-3;EMvApyOe@58WpA#g~m+L83OMjYBnsjBVnQp1c7z-8C)P_@R}kf<(WiK xpd32}kyL;XjCBYyviAr^MXNI#>(j8(>iCHNGocz9`j63hZI!6Uy{RmsZ+HdfC z?A#!PRCdn5a5!_$aOSJ^y7kT)M_hA>z{Md@2cUD%yPk)EtK$CP1OWxd4M9C@yzNLU znGty38^+nVnlP*DW^sFxDdwkTn>{^`*fFaln*Y^>q{w!#FQz1oHr9^<0y_j^|ZcGq`F83@{I zV}wHGlQxPZd2XXlJ{h3}ry$W`kScOzle0ihkCJmd{~mRKEC3NuY3r2(r_t(=tzM&! uHY^>|C=o}QEynvu(UL`Hk$4!<>3>Jq%NhQTP`@-UTO1I|cKiJ1qWl3raDo~D delta 426 zcmc(ZJxat-6h=vArZCzl*jS|rqbSV1_ucm=A{L`IBZ9rf`yCq%Xt15yQc}7ATfxF* zxD(f4DiJqe_i?^coTrV?^|!h>0E<#E+kL<(z;thR(Z;#!((e3_fEekQ&@YPDEi_Q0 zlGn3Ex?6TPwN(A2yxJU49d4_pet2Bg_ifwt&*jPXp#IU(%KobqYd_CBjdC$kiu#xF z&WbU3wv-)8mu1XWXqQq@Mx(-%qR^NrIz!-HM9qe!b|g%cfgrHXK7$K{3|>>jq&$-d y3Y25VAd(6Yg0T)kM)n@TsAzR&V|^OdDjgsFXTo@BNd3p;ys}DEO>=sAR(%5uuW}Rs 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 index 25ae974cbfda776591dd61062aeb7ed19cc339de..adc5004a64cfdaa3a825fd36e4e7c331a4e7d5ec 100644 GIT binary patch delta 483 zcmc&wyGjF56eMfXtTtK-!nFudf}8WWuMBaaKVd(@Rf&f$RI&1bigC{nuf1=IH$^xod4W;QFS$y97_6D%cyb5pyS6Y=ODAfH5aA zF|cOqqUK7(2f<2!Bb7eSAtDE+f^5aXcy^)mj+|6l$}-r1R;(ptEF!s*Y_LwEbubf*blT?|`J}>K(Np&iQ?;1S>*lF_u$9qYI9k_yw9D1+<&9RZT1yd9 z@D(*vMZNGhw`oxfhl7)mx)@Hi1tDx6%$sDZPc17G(Z+C5<6E`z)6CY7yv@d z(Z+y|AQSzs1UB?96J&=6pFJi1-RiCd+k$$6m##~njE?Y#G;mCOiy z7){gTY&B=L?N;};Ff1(U0egO#v8Uy7RdWXAHlHIka-&j1f9w{7MLVx956?(9q!>5A zN?(E7bOdU@D(de#q-ZpL{#3bBX=q*dU~Q9)$!18x*p!ko##0VDg_OOO-UpBD0s7g<%Tf@cp XKPPm{254XRZh9QJtp|gvyX*QF-Isi_ delta 424 zcmc(ZJxT;Y5QUj>4IE7jj7%mOR#Dil>VH|pVAW*Bz}TRwr+ZCwKnK%J4TX+8fvF&P z4Nu}795xU=fx+X!dtdN9ZGCRO)y1LkU{E0(2p9`7-k)4_?Tq@kH#M`t 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 index 6d988d2aacb17561563f7483aa8af803acf00360..fcd380df9877f24fe4f039fdb97ceced4d9c1eb5 100644 GIT binary patch delta 507 zcmcIfJxc>Y5G4m`E>`{kS&I-wz0A(;&hCaF7Euu*f~{EW*Cm2UAO=hG11#@H*b3JE z27iy8cZib8&KVdUZys;nd~}|-URmpqYpxK04nXt(di(v$MI5o7qg$z9MU3Z8@r;`qNK?A96nj!-?d&pR9t^KSR_>MZ{P)dhk7 delta 426 zcmc(Zu}TCn6h)cY-NMmE!Nw}hu!_RIBrh+Ch*+%JtO)iNZzjpw=ztEk`vF#x+S*pI z@+1KH@oP~DmjJSnd>2PE3tsumBAOL5p%cO0c+M5OY| zcxUCnD;)!&j{##~!`1@mWXbp@wMYYSDFL8C#Sv6+Hh5;`0-`3C5Qk)&5+XTkV$#w% y)i#4cjR&xf*-51>GbgPYon#BHi4btGXfXL>a$b4TRb8K6o>kwz0B`F6 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 index a622d6e329549f066efc2f90d99009f2209bf59e..5dab54c6512bdc2719965cc937333f538a2512f3 100644 GIT binary patch delta 480 zcmc(Zu}T9$5QfPSn~P0q5!NC^30`()c5Y`y#3E`Fv9Pw-+uci=7|>v8TKjtlTfy3A z@OkXKAVl9l28N%1zM1(ydoR0h2c3}x2FEheG}L-{G`?QOiC?9|$q8ySfba`6)6Q$3 z9V;<-H=d^Z*=nv_)6H&O>!`5E2kP-@rXH5dRSrtGwdsIV@McN{{kU5Z7R@|6-#;c> zP^mz)YX7xzdmS}39~t%k5^M^K?_XKn$*gXCcW-S4jE@O8piWh3J$vJ7!8!>`@Xpi~ zR23(%Qq@T09Yjk;M`tV061}k^qK&h46{WN>*nsTo; dk&)MUcKV+Yx@`t*o_DT#puy#X!NtvG{tb;~do2I} delta 423 zcmc(ay-LJD6opBQh0(^s$|e@eDi(WxW^OXFh{dYSiiNes%w)1Q8qi?7t)(!PPhcwu zzJ^cYJ2-5i_yiV*3+H?n&UxDU+14gs|m4e5>n#s`y&zMa`2?9Yw}NFm`b5a-$J zHa1WtT~FrWZZX_cIu`lW%JsM9sCsx@RQG*9#OM5EXGQ*@(dhV<^Tto|j%!_(i^P{= zcZteqhAt>l2E^5($)h97jZ+Yy6PHXApw>=w0Nr8B0v=ncy|(C$h&JfcAfg7m04In$ xD~OG=-WcVCxV9k#s}wsTPo1aq!%CQ!_IUcA6^his#*g*$(g>HM(dp$``3)urZ65#t 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 index fdf6cd95446129d48dd628ac04fe62e2ec43b110..79709bb45d99e187bf30d9a954928b919d4363c0 100644 GIT binary patch delta 483 zcmc&wyGlbr5GB{7x!Pzc2x}3d1aD^cy+OnxY7-Hx6}&sUn=~AsvJujq?Cm$$&f`}hbThgUMJ&{mqanSj4`5?-unCoMFw;dGJ+v144E1n gP!J+$r2-;t$YHvgb`S zAdu;@n8ew%xfaB2zjwaTO~T*hLvjBw6^r@2X`gxrTOIlfM`PQMUb*`HyvdcTY{@JI zd_~Me-YneBZCvD4Rh*2)MHSeWo}zU?S~A8uIb#9`30Nb^vQ`v0X$`@~R0r=pB+ID5 zFo2I%1u9YM0~#z%YkwcYR%VD2+=o?f#Ktv!_4{Yz3jdnbVe360oW19A;9oxe7%elziJLACj_LB@Hfy-JFk81 zv|vSd<7sn0Tg`=QyTz@`il`UmKs-Lp#KUsADp5e5%|?=y-ng=oKk63hMLRFf_m8Em zq!Gv<^1qDR>jbj>C}jU{LaWNs`&W@Vg@x94_tv0IjlO}P0ul#l0(;HICl|bmHW{aC zwzX`GHZf`$!59-VS+bzOL?(>3wuw-u;1Wp{6>COTUNS>e8lW*g08>;Zki?*THbZcM b(;ClC|Fc3jcfj^}=cPO;MH$Tv_TuwNezXHT!E<| zxD8k09&9F1T!F#m!nr57Pg|dxZ+pcdAdw;%dJHf=m|S#W#(mtM9SIOE3j7uFym;M4 z1I>`@$voaI`kRJwRbH*AzpY2j!{eg4@47xemnS|@>eN0ewKG!OGT+veyMhs zM#aPe*r02@RYVSxQzinVkj6OCikP&wAsDtX`QRy`l~%SbseubCDL5A+wA!;pV>F1Q xg&^SuZrLm2R8&r@K$<~ojFEvkB=3=z=6L#_7pmcd$sgTf@^a>oDw diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_fontWeightTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_fontWeightTest.pdf index 5da5b1420939a4f0aefffe2ab061294423e7fbcb..ca5ae8cccfe83a03359f1d35a19c8ec712486aed 100644 GIT binary patch delta 7975 zcmc&(d3+Psoqul*T|RVJhb7sv?!&UAkw(|}k`O**Fkrwor;Jb8fQ=0X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!#d!W;kY5JQB%dZaV*o-^veV{t!bO zk3Hh<#Q?ycJSjTR6f(yEHE*uF@@K-)lJ^7=VsevSKN*aNbN;GDo*)ayKf-0+V1|t@ zxPoyu1gA{GbyHg;_i&YmhqvF-9_6ARX^X{zx3+OijJu_c;b5Kkk+w+i*0vxQ7fzgn zEBe8NxHtzVvcmO#8=T<+u(!5xVK!IjGw?As))!;4S@?*}_AuGLp1y2PKQoXGh5ADw zE*_5!WP@yPDA+rY?PszBSvCTD5>(l-Je=-6; zZai@o+9%KLn~!xH6Ji@^0Wum8YM7_3$)#G|e9+jsL`OQo-wiAdedw?eSOXEe4|`%% zMQTE8%VqOjZYI$BT2>~z5)2Dl>q<(_+oCizX`MlKQ$DRaCPH6hJWg0|{Y>^$PzxvD zl)P*YLSEiSs-FV&}G;@7k}I zeg@@eQgG0e!>|UO~fA$fs-}E!?V8-3_j7#lYKi-|xBKrB; z#S1*~xVT?jR51X-ZU81#NmqaZ7A~)X3J~S;3Mmd`D9bX42s_JUPz{zX8>N+0gWAC8 z)Cbe5C`Prgc1{%5O|OkXco4q&G?tB&uT#WRpUb7G=@1Sr{cso*FGa6L3%B4eAXNSq z$AmvX6hu$FGwHh2C>{Eack=RaoRQDSFH0ztUH-2q{D;X z-mR;Fm_1x&K%GhLtD(($+gCt?RVNm(8=NDi#5-6dJ~`Ur?g&b~{;kim@jZMRy1EFf z>6jtvRzK4^HpKJ^oo^$Ho$h!q=!kvl-p=IC%3`L+hy0F*y)DIAiOG-`(3rd?V8UJ` z7mJ7*Y+7G;OxO7ol^!*#D&qm7gdOdh$Aq=h3)Gq*S~i}Lqt4GhjBN6QFF)jN-WCj% zCNn$`?5PeOUki diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/fontWeightTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/fontWeightTest.svg index 1d6950e4e6..d365a22531 100644 --- a/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/fontWeightTest.svg +++ b/itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/fontWeightTest.svg @@ -7,6 +7,12 @@ font-style: normal; src: url('web-fonts/droid-serif-regular.ttf') format('truetype'); } + @font-face { + font-family: 'Droid Serif'; + font-weight: 700; + font-style: bold; + src: url('web-fonts/droid-serif-bold.ttf') format('truetype'); + } diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgFillColor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgFillColor.pdf index 60cd77341ee81b8d6ed01f2129c9975dfa144652..4cae1a7620519045114298c30aabe922d1ab4e8b 100644 GIT binary patch delta 586 zcmb`EO=}xL42D?~L)g%h&kl32NlKfwG#@*&!IT8t&_El9xHr?o%>Bew+e5 z^bhPIeNl$~Dip+KeH~^N6vX>}tPgX05aCiA2l{vI2mad?TOl2;Tf|$MkY zrB;sXV1!j=!KoAk;7Ad^`M(GvGW;t-1MRH0efG)Z>il~0Zu~J_*S4y^Re@4OsnUM` I?f4@71E%(x%K!iX delta 338 zcmZqUZQ|Y_%cx^yU}0bi#0Ewd+6Knz1_tVy`o8%oE{P?n8ZK5w21ZB6uKvQ;;A~NFh0wOI4w` zEM1`}KOd-=$w91QVo^y&QED2Op@F$Mm#V6(zZ(|- DoM2RD diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgFillStrokeColor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgFillStrokeColor.pdf index d7ad7daa4235f5afe855de1968628d881602712d..4d5c530e21f203fec6ea04a9e7f7b6f9f6988070 100644 GIT binary patch delta 547 zcmc&xJxc>Y5amJ+^u#J?Aw;$?L{Tp@`@JF(Aqs*LuvLq_-Mv^CBS{df@)HEFu(7ij z(b7L==_QEdA2uxjQz&ktjRj5)?}iVfP&`K$HDLtNoL;p~!)<@j<|l(Afx*p84d>H z1PPQqomA13im42#lx2*WGLK!q=vCVFU5=P)BnE(JIfZ|Bm@K|3yf*JZs#q%V^SkmI zMY?#Yc2^96X^~r!%m9Ewc#791%%NxKg##fq%cRZ>)yC$zVx9);fO#Kut~lq`QU|hR zbI!eXrIlxy3>1wig!WxFnXOYPeV#85kicnC!_Y$7-%; zq-QcYhf#&yNFg&MwW4J548~|7O9KN16H|j&eV^34^pXq(Q?tozOhJM`A%)~zE>(r% zvUG)_{CuEdCI=A%1$5=crjx%inQ+1-Hrp^SW@I#<{D8&3-a^3u1QhZVxWEhp12Z#2 zgjh*YVrEWi5togPzNd>qv`vzUWtx#ms;QY-lDUaVvbiM?q*_{%@me>W}w D1Uy%e diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgSimpleShapesColor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgSimpleShapesColor.pdf index 831791d99e59b6a71d8e8d5473fdb0c63e4224f7..77c9b1623239f55a6514a80c2d2118236f2c7047 100644 GIT binary patch delta 489 zcmc(bze)o^5XQ+x#ayMN6U1vm{DYU7*`3{45lIn+fFjsi+}>@HCI&Rv<{_^40jvaD z-^6FIu(Wey5%LByFbwm3@cU*ycV2ei4jRXVhz6PY1XLHGd(^v`RfA$44hLrhq;X}a zhmF@ZJI+MYeeXIvjOUXKLDiedT|e%!a+-Fsr{{6@IGfE=%plgXlck(^DMM~drHf7U&RY$q#dJGUV)Q9B1|QhMewF5y@+Q6K7PVQ|40=D nC}IgANH7s*Au@p}7`HGN=l>aDBW5slYkSxdOgo*++pF{!jof^* delta 422 zcmc(ZyGjF56h+C5sF})$m5tL3@loX5bI*NA5Q``TB7(ieea1!ybg<1w+{P*&U?uoD zeuag-Q>E|+Z1-C1z1O3!y^o{8DMQ5&QJ6E}V}S9=wBes0??zZI7UQ2*66<)4Cv8}KE~ z(qt4kj{UAe4#9%r!7>}YMeajDXF#VALr*d3WIS1^LL!KyExCYN?lC<^TJmDLFL8ne8{M3nycIE>KCJ?aH#+Q diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgStrokeColor.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/cmp_svgStrokeColor.pdf index a7625bfe54f76a2280f08538f6af068f0a71bf3b..8783849a075c7be77a8f27870b6b44cca8f6e624 100644 GIT binary patch delta 569 zcmb`Ey-EX75QW*0fUZ~t>>{@?L{T?0bAMNYM2Lc*25f`H-n)0B5RD{3unN9_%_6oI zK7e59i&?q}Drp60U^vV$ru^;!nJk7Mam^ULBobs$qjs@Otni62i58gR)RH$^#u_9ju-vH3nS?7RoGny} ng1}hEWvZ+sz-<425qQDySA_hm5`91Wp|ZBDWmvBtc8|g@YJ`s# delta 338 zcmZ3&yMTLxETfK*frWu75F417Xd4)-8yKi->ig!WxFnXOYPeV#85kicnC!_Y$7-%; zq-QcYhf#&yNFg&MwW4J548~|7O9KN16H|j&eV^34^pXq(Q?tozOhJM`A%)~zE>(r% zvUG)_{CuEdCI=A%1$5=cCX>H1nQ+1-Hrp^yWn?s;e2K-s-a^3u1QhZVxWEhp12Z#2 zgjh*YVrEWi5togPzNd>qv`tEyg+)@Ld8&D`p=p|lWlD;9qKSoxsgX&dNt%gql8GH* z6|wrBd1?6y#tH@sLHd&u*c4R2p4JWaa|{Uf@DJfCE=epZsVGWK<1#cfFy~TLb@g}S F0s#8`SA_ro diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/svgFillColor.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/svgFillColor.svg index 38f825ad88..e601f08a4d 100644 --- a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/svgFillColor.svg +++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/DeviceCmykTest/svgFillColor.svg @@ -1,4 +1,4 @@ - + + diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/OuterZeroCoordinatesViewBox.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/OuterZeroCoordinatesViewBox.svg index 1a9ebf97f7..65179b4d3b 100644 --- a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/OuterZeroCoordinatesViewBox.svg +++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/OuterZeroCoordinatesViewBox.svg @@ -1,4 +1,4 @@ - + diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/cmp_InnerZeroCoordinatesViewBox.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/cmp_InnerZeroCoordinatesViewBox.pdf index 34da723c2c228758462cc98a41d88963f10fd46c..a84c3c8b979617d2c54c30d0cc765f6cb5470829 100644 GIT binary patch delta 446 zcmb`BF-k*06h+Aw1V7l=i5Am@7)0~t&6}Aw60D*SP+Wjmy!kVuf<_4G)474~Dy#&T zV{aw61%HGrK=9t?a=Bd2=l1vZo9Yd<)=oRHhhPQ(gW>4%DNSUN4<;uFNE+9JcG`R0 zvB4@Pycu2O+3n&^1#Z8py|!QZjjnE`+T9PVjtI4C9&3GUjDpVV@cvwVR7($}U?nwE z^=|+Oy4$V0#a!+m^1L38N7ISA9%G6uLN+p`%qao}vMwNbXaY+tft_zmw3%F40cRh5 zAnk&8pphgeD3myPl!D9B;T0o=vFYwaAezYROfJX~u|#%ET#9y$0E^4^^gj`7$MAQA Q_GNRrWuWf&&#unvAE2dlo&W#< delta 415 zcmc&uyGlbr6eL$8cp;?-R@+=+l*Dt+?%9WkRTNT);2-SMN&^~fgI{2AYa2@|!OyX` z^%q?lZ=yUWY1`}XVq@_CqIR+R{jxLsI?pJw#eoR0L=`YYP2Cx0g#!h2Z zKWwfJw8R;Uc++;`{^45OEtjhn1yrJ#63J>#CGyPh`&0AL>}tmXejsi|`zrt(VE;JW zTSo~jH8~ERQw||YkJ{!0Rxv6GMVnN-%f%N?s)lTcsW>h^xSWm3KI&wHOp?hu;((Er x&W;Ki>q-u+>ZXn!FrhPGvbPqXkmA~QYdk&q&kLLN1NP5bi*3TT>&`CE+ix-wZdd>S diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/cmp_MultipleViewBoxes.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/PreserveAspectRatioSvgNodeRendererIntegrationTest/cmp_MultipleViewBoxes.pdf index fa26a4125b9e202e17ef76490136995eb49be2a8..38b3e1f66e122d8e19db5fd937b5c34272f84822 100644 GIT binary patch delta 471 zcmc(Zy-EW?6otteP`67uO*2i1K{WT?nVq>;M4Komiq?X~{H+!moAh}G*|)F~EG%t( z7<*e+(L!IqbDG1);c#Ahuf0dr86%=a3$zJ(1TY#;PVdsx&-2D~hky*yPoX*LJoGE6 z6dSsnoaEWn{8|Y&Z^fV)7H+A)OOD zIcTCP0%wzRcBm7H@s6x!mnt$bXoLt(B1woC&|9aCjR`q;PDxius*FM+TrbSt?tfnB TwjWG$vvRy@u^bK$&JN2DC-`>h delta 481 zcmcJJK}thG42Ef`pl{cOOK~=(R%x4LGV@+aaaDy1;sM0P%$pezs)bs0*+aZrxDdeu zxb;3>z*j*;+_*6z5WYWw@2&mXepZbh7+|tm4nTJSy1n7)JWSj&?oCDn#7JKU)wJPFQk(skI^Xa>2d8XLPWPt93tWyL61 zm%35e=K>&9fBj^L$iJ8-{mqsOcQuQPY&;%LC+d6*xnL>_E=(!}1EUoWF_tL>V>mj` zG1#~Y;>43rB9Xy3?Id}2$iZ9oB|8s5F}MY5Qe#^po=#4>VgST)XVJd?U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U3wTB}b`)-o Rv7A0Od%uMT$LrdcjHRP3e_MVKYsn)if==tTtNf%#=xnYfD6Ga7vDk q{_Ea+z0;ikeSdh>yB?kmZsSRz^WrskJ|=(=w^}EI)A$cNT7PB$ delta 317 zcmdnU^Mh-HETfL0p@E@=p^=HHsgbsUvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL6@6fiV2(ld?K_esr5FUe3awV2G#6vPS^oE*axCWtC+ zWN9$@Ad@vje)E5(ct%F^$?+`y^%e>SAfS+^zy)R)7?_!vBg9II5;JpBi@0oT^gUe^ zqHWAAjm#_)EiKY45-pMpQWH&05{)d3(o8K=OiT^U(+ungtBBS2%uCBxFjg>72-2VY pmQ_Io>_6RLKgWPz5C0IZ;*!Lol8U0#G%iB}GjlFgRabvEE&$_fQH}rr diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_absentWHViewboxPresent.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_absentWHViewboxPresent.pdf index 48495e958312af55b2f49afe920d7c7e0be6a635..30c1d0c94b27d4708eba5389d412a4502de9b3c6 100644 GIT binary patch delta 559 zcmc&y%}N|W5N0-OkinDSMM%;I*Hw&dRdx4tw}?bA5+TWodJ7@+^v`;5UD+KZIqgIA zA+I6$4mtQDd4(LE-Gd}gkSZvOs`|eApz2Tgd*%LB@m3-sVucmh9T0th{`TIdaX5BO z+&bPTpuYz4Y4Li=a^#S&i;ZQ;j&3JErZN94zN{*%n342#?_<0fHdoB*yxck8Z%fRN z${w5E4cTNoZc1d(`aF^*PHNs(ob00focK{5b>6+%Rmi1bh{P2`&|Hh>4P;gR)e)=z z&M3?2;pK~OMPYL44%S-Uxv?8oE)oC@B0qN5XHF#-Vi0vo#u^PuJDJD@X(XcdK1Jnq z&@osc0niwd5nb&)fT)EfUlFKKLC}d>POF4NQ(;KT8c};v-ntf2z zdPaJNlXDnV*bNmjLsBbBCeL7u7Be(7(lb>sHPbUPjn(%_%}X!IP%yQa%*qrb3>H*K z&gD{7C@xD^D9X<-nLLrnLDE10nIR0Q{C=NS2kmt$?h|{4U8$Je!8-7 zcZ*cee!n*vW%IspF^|ba2`T|{Exkxlhvd*pu6&F}#H52aMp$Wu%(dsiSm}e535?M; zV2;USRL%v2mDSdO)>@fh(K-|cOztH{lo6d}QrFiEM<0CxA#w1(2zkx$SA;5Sc3az5 dpU$p^*R%2ThAvB2lut!M3QTd@Zl6yt=r=e~eWCyW delta 247 zcmdnY^NDMNETfL0p@E@=p^=HHsiC%kvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7uW->CG{FQMhh}yv90i-tnVoGCVG@qQv;?HO?c_WK( ztf_(l2q@$!aFrA#X6B?8aoO1Dd%7q@+oU8VnWY+-nWk768yhBCBwC~xn;BRb7$%vT zTPB$sTi6j)G5H~@o(kAyy1{;q0l^;rAzZ~JiA5z9MX70Ah6ZMaT&k+B{%%|VZ^c1| diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_absentWidthAndHeight.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_absentWidthAndHeight.pdf index 0fac911e7bc4bff7136f01d1c411d1106141a2cc..30ab89307c1e549f1a2865fc6934fb669e51cd03 100644 GIT binary patch delta 501 zcmb`EK}rKb5Jj29s0^-jt;`}Jikeh)Pxn+y5CTyQs0qeh2-@lCRv|>0%tBW=L@zvq z8}SGp$rCt=ptuvP+I)T${0ILnd|G*44|ZZ?h$xGNZQyl)`d0JgHtp!#Zg%zD!j1k2K1RVFBC_0!nPEoiLKP{gV%8Qh37NS=4wlO?nV8bC0%x?eq}`Y) zp#=lYUCK2IZVW++ZvTG~c){>j1Rqrz)z4mb2dC}+;HY;V&T^gQ_nCDef{4Rf?VxuU Fz5~pQf+hd} delta 294 zcmZ3@^NDMNETfL0p@E@=p^=HHiKVuIvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7u7BMn1RWLL((ld?K_esr5FUe3awV2Gx6vPS^oE*gz zAd0EP$iiasUM5pcxXk9CO!172=942?{6#Gk3_w63Pk{@}FfcGPGo8GbMasz}H7U_N z%^<}h+0w$o+|1AJ_Hzsf_V5qkDlSPZ WDyb++P2(~&Ff-&*Rdw}u;{pI^7fUbz diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_invalidX.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_invalidX.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c35086e0aae0b9d119f5889d8eed8559132182b4 GIT binary patch literal 1123 zcmc&zOK#gR5Z&_>voVsOuticLDHVZ%#IDmIKi4*j0*MzCMY#%MF{S7r>5aPSRl4X6 z+KZHQv~K%E~yzkNpxFqr%r?e9mYx?Z@CKxn_;IIHCn zeL~S_NnmKuJA`yyv~GV2kYo!TnA+*uH4xHGqBC7o^3dF0V*kl925Ca)(O6m^19TlS z(T!PIr5j)P!$p3rmGh@ijfeZbw`gXo<%=w{hg-r0-JO!4o4u{Fg?X}ep^^u7BE z17kI0J<`M7>G{EU`u1W5SGxyC<5RfPw($k8_TUS}7uoD7_6W3&6Z;l{k8&6_H>oIK<&ub z*}E7GRBWe-X&N)g{6pkRP=*;Ecr#O4#@)@%e&5{p3q% z`oc$vL9CH`)fl9}nSjKh6nP7<0-P;Up!Z(5#GA8J8)M zl9ifgI-!{GoCr}8##v5NN+nZ*QmR-S7kSD>R!WZ}B+fYT&{*e5&KXr2#|0ORCrTDd zX+?CwRGcv^Q<(~$CH?>3!8|&yO9SE0m_!r5O9(rjMAPcC2H~~USu496gx&p9*r;*R Qy7i(t$xx^B=3<0?0pMRTe*gdg literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_invalidY.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/RootSvgNodeRendererTest/svg/cmp_invalidY.pdf new file mode 100644 index 0000000000000000000000000000000000000000..627a2442b4ee421d11e22484eaa652642146c26e GIT binary patch literal 1123 zcmc&z%Wl&^6y5tP?j~w0lz7JTu#KunZ9<@;kB~$Nsm)?Mz7DP$PZ>|DmOo;{udv_` z;76EA(*|0^mbpv7)aKT z3AScsHMYL+hqK}mwezP?O@{lvw|Hjj<+CiayKD5R7TE8HmO>-cM{H&Y7wx9R8aYr- zU75ue%(mcxAJWyP87han!Y{dttnR;?QT88TlW

A`sV=4=KRy9ckw$8dwT^#w2X;7dXX>4uVUaBc5egxA)ruHp3k-nQ33 z)n>4PS$Xbg{I)LJ^T7OM9zRmiZbJfln~=i??r4_w1gxL)hb=Q2|F!~8_HMOKC@JB;9-%pv=xzYq>B`B+u61vPelcY#E zDYzgRV;m*dsA(Yyk(JJJ#EcXv&vH>|rVEK#!4fTa!DKEaOHigdQ$-Q-R+Yjm*Oj6| zO0AXBnP##qka-X%{r}&=JU(hF1L4n@#1p?u2s@s{)A}<)>b2EbE4v$n-ThP8QR|d- P>qSeNN1e{Avr+U5Pp~!T literal 0 HcmV?d00001 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_bothStyleAttrTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_bothStyleAttrTest.pdf index 1ec8f58c566e92d32f8c06300123d1dbdca4a38e..5a0b6e7211ce7a81f37ccd4341cf51d63564e15f 100644 GIT binary patch delta 532 zcmc&vyGlbr5G4;#Z|AjAK^7#$5KLzFJt9_7P!tObD~r9mo7k8O8f^0cR&v4G+DfqY zSNs2)c{Azd_r<2(=LlD(_bF*SiLut?aP1a#|_Y-zoma_~Qq^>8D8CYA>Fd#y07R(o} zE?e7=Hm{zV`PMEH4U}XWfN5F7A1}^z^18@>OKg&WeOqt!+kJz{tu8iY*#ZE96@PXz z-6@wg=87An5Yvm^ATJ6!g~V}3h($ delta 469 zcmc&vyGlbr6eJJS+%6Yv#A2HeLyF9veFw3Mf}#joipAc&dt+k)8f^0ovOkd8O7S1; z`~^S5+N+?2et^@Q!^}C%%qoBDKC;FD3X-(M5TXzC2cwgDIq{3QGZ_;|a{4|;H=J;*));^KE3 diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_classAttrTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_classAttrTest.pdf index 1d64aa6464b3d54d0d94f51ee7cc6a28d83f14bb..5cab2b1108dd5e0344be82e0ed79e578763a2d97 100644 GIT binary patch delta 554 zcmb_YJxc>Y6eQ6?uJclfAPW*=5R>=z-hN52io$_nVPPQ_d%Js4&;*iTo7Pqi{1H}y zwXMI)z2Fy?;@ih#m>HO1-`4NbXV&Nk z5=Jmh{IY)>#-sTaL&&Pv=4Qp3%0!;I+oa8AcOy2POy&tPh_AkAR8Q+#hMqAf)l&Ju z)%nWygHEf*X1cY9#`FX+3BV-P@GFZW#jLaRr$t8#=$DO^*6KoGOsj{DS+WFxpkn$j zjzE8N^QpbQ3DaaS=;uRrG4NTbN))9xUV0Z45n%@03$TPXYC4m$%m6%kS30AxB<KN4*`2*eu!_QgB4`;b_HK8hpb5moHmz;AKVWSo zh<_nJ$=Xv;L_2Y+;k`GHZ|;*-=Sj4Bpg|!k*aPYUbbI}inH$;4?~e8nP)Ym@)OqVM zVE~~tT=b9qbW&Xk&GmY8)@dYB-o&Z6y_<;nY*y6|?VV+o)T=1j2J!Q%>8xL)^UW{k zdEDMwTQH-5_YqSOe=HyY^e>Inw_G*1SJ!?X4~PAHB*sI{I+(&JOAgs;GA<~qbY=`| z$IQ0*)_e9qDg@SugA5c^5v`ATspF1k*pPu8BL#7 zlAV~4w38^_BU5TIp|GdG5V18bFiRUKQU`1)gxEJecE)7TF^MBisY8Mk43aUe*c3r~ nM+tLA(vSgj%Dj}5lvh651QZqUIrVr8BHeV^NZ0BcOYm) delta 200 zcmcc1F^7GFETfL0p@E@=p^=HHsin4ovAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7uW;Zi1P%tqynEZ>;of$;CFhw((PhP;}&uB6E1Cx}K zSz@wDVxnoPS(=ftp^;^(d6Kzha#Bj7v883IfuWJ1oed!slX+P5pqAUSh;bNksj9mA HyKw;k4RSKC diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_displayNoneAttrTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_displayNoneAttrTest.pdf index 0a39a812a6f3905e1a5386c31daf46c198bf808f..1a1dc9f7bb7d2625ba3657ce2f763a0cb6988cea 100644 GIT binary patch delta 578 zcmcIgF-k*05G4sB{4$bCku3}{h{??Uot<3?R#6Bj7M2oWcmE~|Y9Izna|Zd~5iG0( zYYXq-Av}gZ!HAH?#u*qMZ{F}8^Hlq+y@*m15j9e3cOY#5G@9+>QPy>nxZT~8AQj4m zAn%o)*T|AEO7`1F@n$%=5D01hR$k9VnQg&~aGlh}?cGp}N25uC0*anZwA?agwuY9q zsCmBm#`$|?Bfqb#KA39$SgvmFqO~njLIVh`X7I-^1up!~tG^|tkbrsJs(h?W84Jf* zi5rp30U$ChafD`xGrCB+xSfpM;t-_vUMha+rJprFxKo delta 511 zcmcJKKT1PE5Qj;Eg4-ELXR%F)!6Nf!|GXUuR#6Bjf~`b&yE_{NO&~sOa|U^M1q*Ei z@8AhMgeS1}DX5^0jZ+Q3`DXa$rE}YPkc~bV&}cPmf$9PD`h$ac92F&Rjpl9a@A|| zWbJG6m|D*(OKVZWd&!v;9}Q#~(63CJ-&{`Sn=2Q^**P!7a5xx`>0; pKG&Ez4Iy&C+}q@B!GX!ToxdndYKQ+*sBXkqWQs($yL-4N-T(>(hUWkP diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_heightEmTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_heightEmTest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..44956e445661dd7d085902bae5cdb2da3b12d7f0 GIT binary patch literal 1665 zcmc&!-EP`26u$RU_y)Dr1o2NCCsT#g!q}?yhXL9qwOlxf!>Ax`olv!VquuOPcCk0u zUS!81l#VjCyG0@~pU=get{sz?Ixh?C!VSDLole!UxxXavS40AbJ{x;|Wx)os z%4DDmv#^OSAo0hG_*y3=tX#Ih?YH6aMs_-X7G?BsqaoBpx7&`ABSOKW*5EdZIz?sK zQKg!h$=aB&jXNN+oSM9=O1Pe=N` z{E9oqY8rb~&BZtO#$@oQ@qH~9Sh z!J4ZpRV}Pz7En9ty`84TrK|j4>^+vESi89D)h@@Y+Hol`{Kl&jmfZVu`K60pm4CR1 zOIPfkvGZlF`k)^B!xf(3ru(=Y$s9FsaW}!%m=ZD93k266*t@L`ir}Re0K1yY(b&{M z1*U5iLheuzg8RR!a4f6P*lP3v)C92Q)mQ2WJ}<=TTt2x{MCDj1DYV-;(=2PvMUQxxg?;v+NoYkjDYpZ1{_w7 zE<=K{tyAIN>I@=92>QEza3BO1IKwN9QRo5p;QSHu85C~=V*=WF10xc;e-m?JHZWgC z&#+(%76wnalvYh=+PZ0Y(#4mDl4=#|EMp{zW0C|)q%BL+3W4;)ex+!k3vuz@efLGdCi?Oyc9r~x zyHM~?bX9QaPw7ADOI#RmC!JxK;mkSAS_1=%qjg5)DJd7r@&9?XAw|an?^t z|GdA=fGrWiPPE>zF~$&%qs>Qx_D+gl6Cci_{U=;YTGc`4lOGMsL#lbG)ppnBu=_!p zbnd$4iG%+Ayojhc|e*s{f5lxO^~}S_<=^BT5znfYNs{qs=X^ERv&RUyyFMv(u;h zT>}P%%OJHX&GRfx4Pz-N)XXX2g!eX=xdfpc7YS47ZNi<`UO1gh(~81SCWydot|eE% zHItTCTO~w>8jJ(4Rc3{?4kfc1GhDQE<|1z8SnF{{SMqnm_;m delta 365 zcmbQidyspBETfL0p@E@=p^=H1fw8uMvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7u7BDkVFf@(T_esr5FUe3aHJyB#NqVvZlevJQsX}rt zm#RW>S-L_|etyYhJ7$@Q7DAJkGl`&SGB*Qi@@4^( zQ6q%;hNk9|r!t#@)EWWRK4dhXyotqM(?Y=j1QhZVxWEhp12a=hF$+`6$y%&ZPKn6| zCT1q)mX?W@smTVZ#-?eOrlyJJ$;m0^hH2)OMs_xYR7`eb(^CP5hi$CRosq!xKB=&xaLR!J#Fp!;aPc(v<#KXA&&^zZ)qKk zug_318kH$QIPS-jfyl&E)|sYL{4|8MnUCSFQd@2^$YQR*2%^HD!xe;ImEMQ{vWh

g7vs_r| zB?#?_7nbHq2+XMC*xHE1fPl?;Zou*!ILL`{ICl|CM*#>^RB%di!E$H;?u^2S;D~$LY8FETfL0p@E@=p^=H1p^3JEvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7u7BDkVFf@(T_esr5FUe3aHJ$vLNqVvZlevJQsX}rt zm#RW>S-L_|etya1iA)Yc1`4R^&CP)7J=vkco1K|wFfy7?zQf{QZ=qlS0t$HwTwsQQ zfte|$n1!h&LS0EwVrEWi5togPzNd>qv`vbUp|OE+nxS!Ga-wBQnuUddxj|x*iFvYt zv9XC|s<|B=6>JbClMC4NRKOnB4fb;k2=?#~;VLdkEGnreN=@T31O^|Ms;aBM8y5g$ CSXW~J diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_opacityAttrTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_opacityAttrTest.pdf index af57b65e5d9a014f81eb95a567596e819df246d2..aa8d52d0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n?CzDx%4C1dRTHQ0IK10u1RC;mw z(A8OM>)xc*V>8{@MQeMKm;zvmYWda0kz&_r`ZHo;1kB4?YjbI?F}Br@jajk~fS_ah zFOQJEz1h@VU59Bh81%CtJ0BRGOXsWuRhkHDa$gpC$s>+)Msu$rKoCJ0i##_Z;|$tZ zCBW4^rEnFhk^(dVX3$;OQ&QY2hNIMoVQN;{l6k)k>P(3 Rs`+x3XsMHS`{3j-c?S^niQ51G delta 491 zcmb`Dy-EW?6opA5qT6M`PH>tf28-PJpOM8X3JZ#$Ww4mpI}-)XLR@U~46;6ewUyu# z*!TcGjJ0b(1?|LJUCuf8@Nw_b*Zw2v3_*fmO0XT^1AxJBbX4Kk)nR+Q%YX^WJ_AkB zc}Nui5faWuhha9Y&xuscYWJkyN~F9>GID)0CG)DPoBQ78tx21gZn^>F=T+O;yme34 zznrH@Z);_t6eI94WJZ$Z0u(_0(zr0+T0M6cmtmgd`KTC^NzS6zAu0h1t+Y;2fx>ed ztkniVYNfg6SfVkSb4rbm3Q;3sTv$&%MJB8>?Nj(N&PwOJXMwRmF*+|w7lo&hwf)G0 l^fV|_a^a|!!3M)&@2?0&%kV!4>B3C`*$p+dn=?-T^2Qfdv2n diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_useSymbolCoordinatesContrudiction.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_useSymbolCoordinatesContrudiction.pdf index 72422eebedf984cd69e0adde1833e57cb4622c37..263099d341408fbd997cbe67f6472b8aa28bdcf3 100644 GIT binary patch delta 669 zcmchVy=xRf7{*x=65SX-8VN#hhzS?*yq%ey+1b&LM-NMCC1$9-YN-1 z*5c60>e_3?5KzQJtWx?1Sa<|Mj1ohts3?et=p~KdS^HKGKYlzs#oOHf^}rL~Dieeu zM+gzuKL*_tgsG#>xlk8GY(@(wFvR~7CZbT^R3;jonKtwBV~`Ic19%2yVEvvoyo-SG z>(N5hG@n`ztYq#!vhTn>#cz$F)KY0Sz4d-;-6}MeSAXogdv+1y!%aK;9=jv!M{%j5P9vQpwIhsBYYxn?3en{`SBa4D;`r#z1khOv}PdQb|O_=-Tyg)mAArZLl0QAB+s zxsL-)3|AZl%-3zMs4$uv?o-ol;EEASA!gF`wJThu1A^L$qL@tv4^B$obiAu z22XWPNZK3z>x9crsS1*5;Ap@E@=p^=H1fr++(vAThQx~9Hweu_(CNvej6m63rFHU$Ai`6;Ez zsYM!@A*mH5>lB>xi&7QL^^EikC$}@Iup26X#W!zeT*_Eq+ULmC;K1SfecmBqAFD*? z-x>E;F}rM;wP@%6MgEGSB9Gkn&0l`#P*(W#nQl>;>WQ3cx6C4@v9={SJiDS9d^P=P z-eSh5-cM|%HWl^=xZGW>DD~)N?Z-!Fcjy29lCXNiNp6`*4}aU|y}iRMuv?FlD>W~r zxTGjGF&D(jPs-YSotc-J(PZ*dHh)`F1p^RJ$W!0~GYkyO4U93wEG;m^42=veCl|5{ z$C@EjmlP#t=A;&J+1TiNx+p~3B&8S|rkbW0ni*IcB_>%Wn;M&>BqydOrkYtMr5G8S u*%4GRc_D|s3OE#XgZ&%>f<630xQa^>i%KerQq#B$%?(VrR8?L5-M9ebvX6ZL diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_useSymbolHeightWidthAllUnitsTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_useSymbolHeightWidthAllUnitsTest.pdf index d0109e4bfbe5d2abb9ba2c2003a8d6e9b3d21717..276ebed8792678bcaf99f8de334bd8a284fb3590 100644 GIT binary patch delta 584 zcmcc4J)L)h1*5--p^<^5A&@Y&&^9nuH!x7w)c4I#aY-ym)o`&gGBCoXAfPBer8GIU zNFy^OwW4I5f^&XRs)D7Sp`O9yc19Hr69vbDqRQgb&6^lsGBTN%PM*sw$7nHm53^~# zA>Sbb0hZsjN6n^K-YmbNc7DMl#%aQetSk@z3vHBrJ?mm-+4YMTRaoP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ARIovmOkTpKrveT<-C#e*fM5^*5U%2q#G;alqSQ1lLnC7|E>%@m He>W}wjtP{Q diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_useTagFirstSymbolAfterTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_useTagFirstSymbolAfterTest.pdf index 0226362616288ea3a7ec502f2460937c0a9f9b3b..ca503ce979f2697093ff7335f633c3acda4bcda6 100644 GIT binary patch delta 565 zcmc&x%Sr=55M*NnT@)k-4?gE$h(TSuXQyXpLZzesT78-KuVXo{+WD(IK=dF){}Sr*6{=t3$cN*u1W^Pm?-qspZD>}~v69kMzg}!s-Ag43&Bg2z zdPaJNlXDnV*bNmjLsBbBCeL7uo;;ITaPmtgnaK)F=7J`s1`5f!T&fDiW$6k<`S~T2 zConlop3W@HXgT>6ljr1n%;K8^nRyu*%_qmR_}5z~7=VC6o&pz`VPIfpW{4qXVPcLD zD=A9M%tlaiC|@Tg#e rD4G13RZj)%H{D=A$ADlD{}8U?lEk8tilWpsE<>QBxKveL{oS|#M88xN diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_visibilityAttrTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_visibilityAttrTest.pdf index 595f29fcf3f29e7a5cd40e4d0b09f633b924450c..729c07c39bda1c011c92db9ca23e9860b52ad0e0 100644 GIT binary patch delta 578 zcmcJJy-Gtt5QRyC2)B%+Qe+E*ikQso&z)HbR#6Bj7M7xL_wH^K)IbcD`V4ZxN3gIG ztSx*8AHv6QBPv1~8)soSocWe>9$N3MCsA8R#2k&H4N$89tLxqUk?$9iu-4y_AT`Qw zpc>R37mPK6wLI?bh0EdOR3ND8rM_5+I@#ol@*-=CtLvc{k4BRW1*A9KXsN?IJwwM@ z%<1#;rK{J*QgzdqzvE_gUvDmNqO~2PMGhcxJ(WLs3Ml2BG=C$U5a8#P#@pO2V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+C$a?c%*w}r$ b`EK{sWG|gHu5Lcpp-K^RoA&!#lkM~my*!-g delta 348 zcmdnPdyspBETfL0p@E@=p^=H1p`o^cvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7u7BDkVFf@(T_esr5FUe3aHJ$vLNqVvZlevJQsX}rt zm#RW>S-L_|etya1iA)Yc1`4R^&CP)7J=vkclbx9}1r1RQG&D7zyocG8$8X0h@s=E5S GaRC5^;9Bbd diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_widthPxAttrTest.pdf b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/cmp_widthPxAttrTest.pdf index acf5deb765721131b7afa79e1745c8ca0df97647..b10b2b9ca68621f0355eaef98ec4da205d27445b 100644 GIT binary patch delta 591 zcmb_ZO=}cE5M?%r$cP9Y1*L^uqiANkyQ;doWDx@E$AY?Iyaf+EGu=^$*)Tf@ROZ|r-&59cvT&YT?{bG0##r9$MVHwhCv3r%6ghTy${4^Zw^=|~*G#I?3Oo`@Q zITFjGJ<%-|eW`@ZeLewAWmYm*tXK38kZ!HrOecfkwJpFZ-!)QTR_NDphv~~;cICJ1 zvQK@!uy$4yE`3~|AG46>B@RTn0#aHDe{rmHmY=@9^KbV|rb?Xpi@J72}4S3nOV=rCMmRqX5)yS-U8&zJh-jVeY2*DG1 zwCJO$Ytl*s0C|pN0GUh+@ZjGgJkA;ZM})N8sD`VLZ|ywaezEgp{;FK|zU$w2A(l!x LDo3M-^GD@(w2YLU delta 342 zcmX@adz5>FETfL0p@E@=p^=HHsj0SsvAThQx~9Hweu_(CNvej6m63rFl7h*ejB>2z zdPaJNlXDnV*bNmjLsBbBCeL7u7BDkVFf@(T_esr5FUe3aHJ$vLNqVvZlevJQsX}rt zm#RW>S-L_|etya1iA)Yc1`4R^&CP)7J=vkco1K|wFfy7?zQf{QZ=qlS0t$HwTwsQQ zfte|$n1!h&LS0EwVrEWi5togPzNd>qv`vzUxp7izim|1kMQTc-rBPyvsX>Z?kwKDi zvazM5xv3o<6>JbClMC4NRKOnB4fb;k2=?#~;VLdkEGnreN=@T31O^|Ms;aBM8y5hU CrB~Yk diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightEmTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightEmTest.svg new file mode 100644 index 0000000000..63d672f5cb --- /dev/null +++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightEmTest.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightPercentsAttrTest.svg b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightPercentsAttrTest.svg index 7595e9e81d..c393746363 100644 --- a/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightPercentsAttrTest.svg +++ b/itext.tests/itext.svg.tests/resources/itext/svg/renderers/impl/SymbolTest/heightPercentsAttrTest.svg @@ -1,8 +1,8 @@ - - + - + \ No newline at end of file diff --git a/itext/itext.svg/itext/svg/SvgConstants.cs b/itext/itext.svg/itext/svg/SvgConstants.cs index b28453db21..3f4ec00eab 100644 --- a/itext/itext.svg/itext/svg/SvgConstants.cs +++ b/itext/itext.svg/itext/svg/SvgConstants.cs @@ -612,6 +612,27 @@ public sealed class Values { ///

Value representing the default aspect ratio: xmidymid. public const String DEFAULT_ASPECT_RATIO = SvgConstants.Values.XMID_YMID; + /// Default svg view port width value. + /// + /// Default svg view port width value. + /// See SVG specification. + /// + public const String DEFAULT_VIEWPORT_WIDTH = "300px"; + + /// Default svg view port height value. + /// + /// Default svg view port height value. + /// See SVG specification. + /// + public const String DEFAULT_VIEWPORT_HEIGHT = "150px"; + + /// Default width and height value. + /// + /// Default width and height value. + /// See SVG specification. + /// + public const String DEFAULT_WIDTH_AND_HEIGHT_VALUE = "100%"; + /// Value representing how to preserve the aspect ratio when dealing with images. public const String DEFER = "defer"; @@ -658,6 +679,9 @@ public sealed class Values { /// Value representing the units relation "userSpaceOnUse". public const String USER_SPACE_ON_USE = "userSpaceOnUse"; + /// The number of viewBox values. + public const int VIEWBOX_VALUES_NUMBER = 4; + /// Value representing how to align when scaling. public const String XMIN_YMIN = "xminymin"; @@ -685,16 +709,8 @@ public sealed class Values { /// Value representing how to align when scaling. public const String XMAX_YMAX = "xmaxymax"; + [Obsolete] public const String VERSION1_1 = "1.1"; - - /// Default svg view box width value. - public const String DEFAULT_VIEWBOX_WIDTH = "300px"; - - /// Default svg view box height value. - public const String DEFAULT_VIEWBOX_HEIGHT = "150px"; - - /// The number of viewBox values. - public const int VIEWBOX_VALUES_NUMBER = 4; } } } diff --git a/itext/itext.svg/itext/svg/converter/SvgConverter.cs b/itext/itext.svg/itext/svg/converter/SvgConverter.cs index 1492c2d9e3..515dc1dabd 100644 --- a/itext/itext.svg/itext/svg/converter/SvgConverter.cs +++ b/itext/itext.svg/itext/svg/converter/SvgConverter.cs @@ -31,14 +31,10 @@ You should have received a copy of the GNU Affero General Public License using iText.Kernel.Pdf.Xobject; using iText.Layout.Element; using iText.StyledXmlParser; -using iText.StyledXmlParser.Css.Resolve; -using iText.StyledXmlParser.Css.Util; using iText.StyledXmlParser.Node; using iText.StyledXmlParser.Node.Impl.Jsoup; using iText.StyledXmlParser.Resolver.Resource; -using iText.Svg; using iText.Svg.Exceptions; -using iText.Svg.Logs; using iText.Svg.Processors; using iText.Svg.Processors.Impl; using iText.Svg.Renderers; @@ -340,6 +336,9 @@ public static void DrawOnPage(Stream stream, PdfPage page, ISvgConverterProperti public static void DrawOnPage(Stream stream, PdfPage page, float x, float y, ISvgConverterProperties props ) { CheckNull(page); + if (props is SvgConverterProperties && ((SvgConverterProperties)props).GetCustomViewport() == null) { + ((SvgConverterProperties)props).SetCustomViewport(page.GetMediaBox()); + } DrawOnCanvas(stream, new PdfCanvas(page), x, y, props); } @@ -693,9 +692,9 @@ public static void CreatePdf(Stream svgStream, Stream pdfDest, ISvgConverterProp // Extract topmost dimensions CheckNull(topSvgRenderer); CheckNull(pdfDocument); - //Since svg is a single object in the document, rem = em - Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, drawContext.GetCssContext().GetRootFontSize - (), drawContext.GetCssContext().GetRootFontSize()); + // Since svg is a single object in the document, em = rem + float em = drawContext.GetCssContext().GetRootFontSize(); + Rectangle wh = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, em, drawContext); // Adjust pagesize and create new page pdfDocument.SetDefaultPageSize(new PageSize(wh.GetWidth(), wh.GetHeight())); PdfPage page = pdfDocument.AddNewPage(); @@ -878,6 +877,9 @@ private static PdfFormXObject ConvertToXObject(ISvgProcessorResult processorResu if (processorResult is SvgProcessorResult) { drawContext.SetCssContext(((SvgProcessorResult)processorResult).GetContext().GetCssContext()); } + if (props is SvgConverterProperties) { + drawContext.SetCustomViewport(((SvgConverterProperties)props).GetCustomViewport()); + } drawContext.SetTempFonts(processorResult.GetTempFonts()); drawContext.AddNamedObjects(processorResult.GetNamedObjects()); return ConvertToXObject(processorResult.GetRootRenderer(), document, drawContext); @@ -1143,11 +1145,9 @@ private static PdfFormXObject ConvertToXObject(ISvgNodeRenderer topSvgRenderer, CheckNull(topSvgRenderer); CheckNull(document); CheckNull(context); - //Can't determine em value here, so passing default value - float defaultFontSize = CssDimensionParsingUtils.ParseAbsoluteFontSize(CssDefaults.GetDefaultValue(SvgConstants.Attributes - .FONT_SIZE)); - Rectangle bbox = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, defaultFontSize, context.GetCssContext( - ).GetRootFontSize()); + // Can't determine em value here, so em=rem + float em = context.GetCssContext().GetRootFontSize(); + Rectangle bbox = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, em, context); PdfFormXObject pdfForm = new PdfFormXObject(bbox); PdfCanvas canvas = new PdfCanvas(pdfForm, document); context.PushCanvas(canvas); @@ -1317,7 +1317,7 @@ public static INode Parse(Stream stream, ISvgConverterProperties props) { /// to browser default if viewbox is missing as well /// /// Deprecated in favour of - /// /// /// @@ -1329,45 +1329,10 @@ public static INode Parse(Stream stream, ISvgConverterProperties props) { /// float[2], width is in position 0, height in position 1 [Obsolete] public static float[] ExtractWidthAndHeight(ISvgNodeRenderer topSvgRenderer) { - float[] res = new float[2]; - float[] values = SvgCssUtils.ParseViewBox(topSvgRenderer); - float width; - float height; - String wString; - String hString; - wString = topSvgRenderer.GetAttribute(SvgConstants.Attributes.WIDTH); - if (wString == null) { - if (values != null) { - width = values[2]; - } - else { - //Log Warning - LOGGER.LogWarning(SvgLogMessageConstant.MISSING_WIDTH); - //Set to browser default - width = CssDimensionParsingUtils.ParseAbsoluteLength(SvgConstants.Values.DEFAULT_VIEWBOX_WIDTH); - } - } - else { - width = CssDimensionParsingUtils.ParseAbsoluteLength(wString); - } - hString = topSvgRenderer.GetAttribute(SvgConstants.Attributes.HEIGHT); - if (hString == null) { - if (values != null) { - height = values[3]; - } - else { - //Log Warning - LOGGER.LogWarning(SvgLogMessageConstant.MISSING_HEIGHT); - //Set to browser default - height = CssDimensionParsingUtils.ParseAbsoluteLength(SvgConstants.Values.DEFAULT_VIEWBOX_HEIGHT); - } - } - else { - height = CssDimensionParsingUtils.ParseAbsoluteLength(hString); - } - res[0] = width; - res[1] = height; - return res; + SvgDrawContext context = new SvgDrawContext(null, null); + float em = context.GetCssContext().GetRootFontSize(); + Rectangle rectangle = SvgCssUtils.ExtractWidthAndHeight(topSvgRenderer, em, context); + return new float[] { rectangle.GetX(), rectangle.GetY(), rectangle.GetWidth(), rectangle.GetHeight() }; } //\cond DO_NOT_DOCUMENT diff --git a/itext/itext.svg/itext/svg/css/SvgCssContext.cs b/itext/itext.svg/itext/svg/css/SvgCssContext.cs index 1e4c63eb4e..30f6f0cb03 100644 --- a/itext/itext.svg/itext/svg/css/SvgCssContext.cs +++ b/itext/itext.svg/itext/svg/css/SvgCssContext.cs @@ -23,7 +23,7 @@ You should have received a copy of the GNU Affero General Public License using System; using iText.StyledXmlParser.Css.Resolve; using iText.StyledXmlParser.Css.Util; -using iText.Svg; +using iText.Svg.Css.Impl; namespace iText.Svg.Css { /// @@ -32,8 +32,7 @@ namespace iText.Svg.Css { /// public class SvgCssContext : AbstractCssContext { /// The root font size value in pt. - private float rootFontSize = CssDimensionParsingUtils.ParseAbsoluteFontSize(CssDefaults.GetDefaultValue(SvgConstants.Attributes - .FONT_SIZE)); + private float rootFontSize = SvgStyleResolver.DEFAULT_FONT_SIZE; /// Gets the root font size. /// the root font size in pt diff --git a/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs b/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs index d8e996a5af..c31499d46f 100644 --- a/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs +++ b/itext/itext.svg/itext/svg/css/impl/SvgStyleResolver.cs @@ -49,14 +49,14 @@ public class SvgStyleResolver : ICssResolver { (new HashSet(JavaUtil.ArraysAsList((IStyleInheritance)new CssInheritance(), (IStyleInheritance )new SvgAttributeInheritance()))); + public static readonly float DEFAULT_FONT_SIZE = CssDimensionParsingUtils.ParseAbsoluteFontSize(CssDefaults + .GetDefaultValue(SvgConstants.Attributes.FONT_SIZE)); + // TODO: DEVSIX-3923 remove normalization (.toLowerCase) private static readonly String[] ELEMENTS_INHERITING_PARENT_STYLES = new String[] { SvgConstants.Tags.MARKER , SvgConstants.Tags.LINEAR_GRADIENT, SvgConstants.Tags.LINEAR_GRADIENT.ToLowerInvariant(), SvgConstants.Tags .PATTERN }; - private static readonly float DEFAULT_FONT_SIZE = CssDimensionParsingUtils.ParseAbsoluteFontSize(CssDefaults - .GetDefaultValue(SvgConstants.Attributes.FONT_SIZE)); - private static readonly ILogger LOGGER = ITextLogManager.GetLogger(typeof(iText.Svg.Css.Impl.SvgStyleResolver )); @@ -144,8 +144,7 @@ public static void ResolveFontSizeStyle(IDictionary styles, SvgC } else { if (parentFontSizeStr == null) { - baseFontSize = CssDimensionParsingUtils.ParseAbsoluteFontSize(CssDefaults.GetDefaultValue(SvgConstants.Attributes - .FONT_SIZE)); + baseFontSize = DEFAULT_FONT_SIZE; } else { baseFontSize = CssDimensionParsingUtils.ParseAbsoluteLength(parentFontSizeStr); diff --git a/itext/itext.svg/itext/svg/logs/SvgLogMessageConstant.cs b/itext/itext.svg/itext/svg/logs/SvgLogMessageConstant.cs index 500b6ec6a0..366e1eac06 100644 --- a/itext/itext.svg/itext/svg/logs/SvgLogMessageConstant.cs +++ b/itext/itext.svg/itext/svg/logs/SvgLogMessageConstant.cs @@ -49,9 +49,13 @@ public sealed class SvgLogMessageConstant { public const String PATTERN_WIDTH_OR_HEIGHT_IS_NEGATIVE = "Pattern width or height is negative value. This pattern will not be rendered."; + /// The constant not used anymore and will be removed in the next major release. + [Obsolete] public const String MISSING_WIDTH = "Top Svg tag has no defined width attribute and viewbox width is not present, so browser default of 300px " + "is used"; + /// The constant not used anymore and will be removed in the next major release. + [Obsolete] public const String MISSING_HEIGHT = "Top Svg tag has no defined height attribute and viewbox height is not present, so browser default of " + "150px is used"; diff --git a/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs b/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs index cab6724e0b..fb464250c1 100644 --- a/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.cs +++ b/itext/itext.svg/itext/svg/processors/impl/SvgConverterProperties.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.Kernel.Geom; using iText.Layout.Font; using iText.StyledXmlParser.Css; using iText.StyledXmlParser.Css.Media; @@ -54,6 +55,8 @@ public class SvgConverterProperties : ISvgConverterProperties { private CssStyleSheet cssStyleSheet = null; + private Rectangle customViewport = null; + /// /// Creates a new /// @@ -70,6 +73,29 @@ public SvgConverterProperties() { this.rendererFactory = new DefaultSvgNodeRendererFactory(); } + /// Gets the custom viewport of SVG. + /// + /// Gets the custom viewport of SVG. + /// + /// The custom viewport is used to resolve percent values of the top level svg. + /// + /// the custom viewport + public virtual Rectangle GetCustomViewport() { + // TODO DEVSIX-8808 add this getter to the interface ISvgConverterProperties and remove class casting where getCustomViewport is called + return customViewport; + } + + /// Sets the custom viewport of SVG. + /// + /// Sets the custom viewport of SVG. + /// + /// The custom viewport is used to resolve percent values of the top level svg. + /// + /// the custom viewport + public virtual void SetCustomViewport(Rectangle customViewport) { + this.customViewport = customViewport; + } + public virtual iText.Svg.Processors.Impl.SvgConverterProperties SetRendererFactory(ISvgNodeRendererFactory rendererFactory) { this.rendererFactory = rendererFactory; diff --git a/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs b/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs index 04c2779369..6f813ed135 100644 --- a/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs +++ b/itext/itext.svg/itext/svg/renderers/SvgDrawContext.cs @@ -66,6 +66,8 @@ public class SvgDrawContext { private float[] relativePosition; + private Rectangle customViewport; + /// Create an instance of the context that is used to store information when converting SVG. /// /// instance of @@ -87,6 +89,28 @@ public SvgDrawContext(ResourceResolver resourceResolver, FontProvider fontProvid cssContext = new SvgCssContext(); } + /// Gets the custom viewport of SVG. + /// + /// Gets the custom viewport of SVG. + /// + /// The custom viewport is used to resolve percent values of the top level svg. + /// + /// the custom viewport + public virtual Rectangle GetCustomViewport() { + return customViewport; + } + + /// Sets the custom viewport of SVG. + /// + /// Sets the custom viewport of SVG. + /// + /// The custom viewport is used to resolve percent values of the top level svg. + /// + /// the custom viewport + public virtual void SetCustomViewport(Rectangle customViewport) { + this.customViewport = customViewport; + } + /// Retrieves the current top of the stack, without modifying the stack. /// the current canvas that can be used for drawing operations. public virtual PdfCanvas GetCurrentCanvas() { diff --git a/itext/itext.svg/itext/svg/renderers/SvgImageRenderer.cs b/itext/itext.svg/itext/svg/renderers/SvgImageRenderer.cs index eec8b7a16e..8e0b0c2e2b 100644 --- a/itext/itext.svg/itext/svg/renderers/SvgImageRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/SvgImageRenderer.cs @@ -45,9 +45,5 @@ public override void Draw(DrawContext drawContext) { ((SvgImage)modelElement).Generate(drawContext.GetDocument()); base.Draw(drawContext); } - //TODO: DEVSIX-8775 probably we need to override ImageRenderer#calculateImageDimensions and calcualte percent - // values of svg width and height there by altering layoutBox or affine transform, this is needed to correctly - // calculate percent values in root svg element. Though this won't help with svg's loaded as background image in - // html2pdf, so this has to be carefully investigated } } diff --git a/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs index abf35ca314..2deb87ed58 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/AbstractContainerSvgNodeRenderer.cs @@ -20,10 +20,11 @@ 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.Kernel.Geom; -using iText.StyledXmlParser.Css.Util; using iText.Svg; using iText.Svg.Renderers; +using iText.Svg.Utils; namespace iText.Svg.Renderers.Impl { public abstract class AbstractContainerSvgNodeRenderer : AbstractBranchSvgNodeRenderer { @@ -45,33 +46,34 @@ protected internal override void DoDraw(SvgDrawContext context) { /// the SVG draw context /// the viewport that applies to this renderer internal virtual Rectangle CalculateViewPort(SvgDrawContext context) { - //TODO: DEVSIX-8775 the logic below should be refactored, first of all it shouldn't be applied to root svg tag - // (though depending on implementation maybe it won't be a problem), also it need to be adjusted to support em/rem - // which seems possible for all cases, and as for percents, I'm not sure it's possible for nested svg tags, but - // it should be possible for symbols - Rectangle currentViewPort = context.GetCurrentViewPort(); - // Set default values to parent viewport in the case of a nested svg tag + Rectangle percentBaseBox; + if (GetParent() is PdfRootSvgNodeRenderer || !(GetParent() is AbstractSvgNodeRenderer)) { + // If the current container is a top level SVG, take a current view port as a percent base + percentBaseBox = context.GetCurrentViewPort(); + } + else { + // If the current container is nested container, take a view box as a percent base + percentBaseBox = ((AbstractSvgNodeRenderer)GetParent()).GetCurrentViewBox(context); + } float portX = 0; float portY = 0; - // Default should be parent portWidth if not outermost - float portWidth = currentViewPort.GetWidth(); - // Default should be parent height if not outermost - float portHeight = currentViewPort.GetHeight(); + float portWidth = percentBaseBox.GetWidth(); + float portHeight = percentBaseBox.GetHeight(); if (attributesAndStyles != null) { - if (attributesAndStyles.ContainsKey(SvgConstants.Attributes.X)) { - portX = CssDimensionParsingUtils.ParseAbsoluteLength(attributesAndStyles.Get(SvgConstants.Attributes.X)); - } - if (attributesAndStyles.ContainsKey(SvgConstants.Attributes.Y)) { - portY = CssDimensionParsingUtils.ParseAbsoluteLength(attributesAndStyles.Get(SvgConstants.Attributes.Y)); - } - if (attributesAndStyles.ContainsKey(SvgConstants.Attributes.WIDTH)) { - portWidth = CssDimensionParsingUtils.ParseAbsoluteLength(attributesAndStyles.Get(SvgConstants.Attributes.WIDTH - )); - } - if (attributesAndStyles.ContainsKey(SvgConstants.Attributes.HEIGHT)) { - portHeight = CssDimensionParsingUtils.ParseAbsoluteLength(attributesAndStyles.Get(SvgConstants.Attributes. - HEIGHT)); - } + portX = SvgCssUtils.ParseAbsoluteLength(this, attributesAndStyles.Get(SvgConstants.Attributes.X), percentBaseBox + .GetWidth(), 0, context); + portY = SvgCssUtils.ParseAbsoluteLength(this, attributesAndStyles.Get(SvgConstants.Attributes.Y), percentBaseBox + .GetHeight(), 0, context); + String widthStr = attributesAndStyles.Get(SvgConstants.Attributes.WIDTH); + // In case widthStr==null, according to SVG spec default value is 100%, it is why default + // value is percentBaseBox.getWidth(). See SvgConstants.Values.DEFAULT_WIDTH_AND_HEIGHT_VALUE + portWidth = SvgCssUtils.ParseAbsoluteLength(this, widthStr, percentBaseBox.GetWidth(), percentBaseBox.GetWidth + (), context); + String heightStr = attributesAndStyles.Get(SvgConstants.Attributes.HEIGHT); + // In case heightStr==null, according to SVG spec default value is 100%, it is why default + // value is percentBaseBox.getHeight(). See SvgConstants.Values.DEFAULT_WIDTH_AND_HEIGHT_VALUE + portHeight = SvgCssUtils.ParseAbsoluteLength(this, heightStr, percentBaseBox.GetHeight(), percentBaseBox.GetHeight + (), context); } return new Rectangle(portX, portY, portWidth, portHeight); } diff --git a/itext/itext.svg/itext/svg/renderers/impl/AbstractSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/AbstractSvgNodeRenderer.cs index a4902d92e0..af40379049 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/AbstractSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/AbstractSvgNodeRenderer.cs @@ -187,14 +187,50 @@ public virtual float GetCurrentFontSize(SvgDrawContext context) { return CssDimensionParsingUtils.ParseRelativeValue(fontSizeAttribute, context.GetCssContext().GetRootFontSize ()); } - if (CssTypesValidationUtils.IsEmValue(fontSizeAttribute) && GetParent() != null && parent is AbstractSvgNodeRenderer + if (CssTypesValidationUtils.IsEmValue(fontSizeAttribute) && GetParent() != null && GetParent() is AbstractSvgNodeRenderer ) { - return CssDimensionParsingUtils.ParseRelativeValue(fontSizeAttribute, ((AbstractSvgNodeRenderer)parent).GetCurrentFontSize - (context)); + return CssDimensionParsingUtils.ParseRelativeValue(fontSizeAttribute, ((AbstractSvgNodeRenderer)GetParent( + )).GetCurrentFontSize(context)); } return CssDimensionParsingUtils.ParseAbsoluteFontSize(fontSizeAttribute); } + /// Gets the viewbox from the first parent element which can define it. + /// + /// Gets the viewbox from the first parent element which can define it. + /// + /// See SVG specification + /// to find which elements can define a viewbox. + /// + /// draw context from which fallback viewbox can be extracted + /// + /// the viewbox or + /// + /// if the element doesn't have parent which can define the viewbox + /// + public virtual Rectangle GetCurrentViewBox(SvgDrawContext context) { + // According to https://svgwg.org/svg2-draft/coords.html#EstablishingANewSVGViewport: "For historical reasons, + // the ‘pattern’ and ‘marker’ elements do not create a new viewport, despite accepting a ‘viewBox’ attribute". + // So get viewbox only from symbol and svg elements + if (this is AbstractContainerSvgNodeRenderer) { + float[] viewBoxValues = SvgCssUtils.ParseViewBox(this); + if (viewBoxValues == null || viewBoxValues.Length < SvgConstants.Values.VIEWBOX_VALUES_NUMBER) { + Rectangle currentViewPort = context.GetCurrentViewPort(); + viewBoxValues = new float[] { 0, 0, currentViewPort.GetWidth(), currentViewPort.GetHeight() }; + } + return new Rectangle(viewBoxValues[0], viewBoxValues[1], viewBoxValues[2], viewBoxValues[3]); + } + else { + if (GetParent() is AbstractSvgNodeRenderer) { + return ((AbstractSvgNodeRenderer)GetParent()).GetCurrentViewBox(context); + } + else { + // From iText this line isn't reachable, in custom renderer tree fallback to context's view port + return context.GetCurrentViewPort(); + } + } + } + /// /// Make a deep copy of the styles and attributes of this renderer /// Helper method for deep copying logic @@ -377,8 +413,7 @@ internal virtual void ApplyFillAndStrokeProperties(AbstractSvgNodeRenderer.FillP /// /// absolute length in points protected internal virtual float ParseHorizontalLength(String length, SvgDrawContext context) { - return SvgCssUtils.ParseAbsoluteLength(this, length, SvgCoordinateUtils.CalculatePercentBaseValueIfNeeded( - context, length, true), 0.0F, context); + return SvgCssUtils.ParseAbsoluteHorizontalLength(this, length, 0.0F, context); } /// Parse y-axis length value. @@ -409,8 +444,7 @@ protected internal virtual float ParseHorizontalLength(String length, SvgDrawCon /// /// absolute length in points protected internal virtual float ParseVerticalLength(String length, SvgDrawContext context) { - return SvgCssUtils.ParseAbsoluteLength(this, length, SvgCoordinateUtils.CalculatePercentBaseValueIfNeeded( - context, length, false), 0.0F, context); + return SvgCssUtils.ParseAbsoluteVerticalLength(this, length, 0.0F, context); } /// Parse length attributes. @@ -458,6 +492,9 @@ private TransparentColor GetColorFromAttributeValue(SvgDrawContext context, Stri String normalizedName = tokenValue.JSubstring(5, tokenValue.Length - 1).Trim(); ISvgNodeRenderer colorRenderer = context.GetNamedObject(normalizedName); if (colorRenderer is ISvgPaintServer) { + if (colorRenderer.GetParent() == null) { + colorRenderer.SetParent(this); + } resolvedColor = ((ISvgPaintServer)colorRenderer).CreateColor(context, GetObjectBoundingBox(context), objectBoundingBoxMargin , parentOpacity); } diff --git a/itext/itext.svg/itext/svg/renderers/impl/LinearGradientSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/LinearGradientSvgNodeRenderer.cs index b3ed79518c..5c227c2648 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/LinearGradientSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/LinearGradientSvgNodeRenderer.cs @@ -131,7 +131,7 @@ private Point[] GetCoordinates(SvgDrawContext context, bool isObjectBoundingBox) .Y2), 0) * CONVERT_COEFF); } else { - Rectangle currentViewPort = context.GetCurrentViewPort(); + Rectangle currentViewPort = this.GetCurrentViewBox(context); double x = currentViewPort.GetX(); double y = currentViewPort.GetY(); double width = currentViewPort.GetWidth(); diff --git a/itext/itext.svg/itext/svg/renderers/impl/PatternSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/PatternSvgNodeRenderer.cs index ec3c7fefb6..99eb6c6f34 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/PatternSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/PatternSvgNodeRenderer.cs @@ -185,7 +185,7 @@ private Rectangle CalculateOriginalPatternRectangle(SvgDrawContext context, bool 0) * CONVERT_COEFF; } else { - Rectangle currentViewPort = context.GetCurrentViewPort(); + Rectangle currentViewPort = this.GetCurrentViewBox(context); double viewPortX = currentViewPort.GetX(); double viewPortY = currentViewPort.GetY(); double viewPortWidth = currentViewPort.GetWidth(); diff --git a/itext/itext.svg/itext/svg/renderers/impl/UseSvgNodeRenderer.cs b/itext/itext.svg/itext/svg/renderers/impl/UseSvgNodeRenderer.cs index 0f59ebbb86..458ade6753 100644 --- a/itext/itext.svg/itext/svg/renderers/impl/UseSvgNodeRenderer.cs +++ b/itext/itext.svg/itext/svg/renderers/impl/UseSvgNodeRenderer.cs @@ -57,12 +57,9 @@ protected internal override void DoDraw(SvgDrawContext context) { PdfCanvas currentCanvas = context.GetCurrentCanvas(); float x = 0f; float y = 0f; - if (this.attributesAndStyles.ContainsKey(SvgConstants.Attributes.X)) { - x = CssDimensionParsingUtils.ParseAbsoluteLength(this.attributesAndStyles.Get(SvgConstants.Attributes.X)); - } - if (this.attributesAndStyles.ContainsKey(SvgConstants.Attributes.Y)) { - y = CssDimensionParsingUtils.ParseAbsoluteLength(this.attributesAndStyles.Get(SvgConstants.Attributes.Y)); - } + // If X or Y attribute is null, then default 0 value will be returned + x = ParseHorizontalLength(this.attributesAndStyles.Get(SvgConstants.Attributes.X), context); + y = ParseVerticalLength(this.attributesAndStyles.Get(SvgConstants.Attributes.Y), context); AffineTransform inverseMatrix = null; if (!CssUtils.CompareFloats(x, 0) || !CssUtils.CompareFloats(y, 0)) { AffineTransform translation = AffineTransform.GetTranslateInstance(x, y); diff --git a/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs b/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs index fae70080d4..7877a8d0ea 100644 --- a/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs +++ b/itext/itext.svg/itext/svg/renderers/path/impl/AbstractPathShape.cs @@ -117,8 +117,7 @@ public virtual void SetContext(SvgDrawContext context) { /// /// absolute length in points protected internal virtual float ParseHorizontalLength(String length) { - return SvgCssUtils.ParseAbsoluteLength(parent, length, SvgCoordinateUtils.CalculatePercentBaseValueIfNeeded - (context, length, true), 0.0F, context); + return SvgCssUtils.ParseAbsoluteHorizontalLength(parent, length, 0.0F, context); } /// Parse y axis length value. @@ -129,8 +128,7 @@ protected internal virtual float ParseHorizontalLength(String length) { /// /// absolute length in points protected internal virtual float ParseVerticalLength(String length) { - return SvgCssUtils.ParseAbsoluteLength(parent, length, SvgCoordinateUtils.CalculatePercentBaseValueIfNeeded - (context, length, false), 0.0F, context); + return SvgCssUtils.ParseAbsoluteVerticalLength(parent, length, 0.0F, context); } public abstract void SetCoordinates(String[] arg1, Point arg2); diff --git a/itext/itext.svg/itext/svg/utils/SvgCoordinateUtils.cs b/itext/itext.svg/itext/svg/utils/SvgCoordinateUtils.cs index 9c47ded7b6..6ece1ffdfb 100644 --- a/itext/itext.svg/itext/svg/utils/SvgCoordinateUtils.cs +++ b/itext/itext.svg/itext/svg/utils/SvgCoordinateUtils.cs @@ -136,28 +136,6 @@ public static float CalculateNormalizedDiagonalLength(SvgDrawContext context) { return (float)(Math.Sqrt(viewPortHeight * viewPortHeight + viewPortWidth * viewPortWidth) / Math.Sqrt(2)); } - /// Calculate percent base value if provided length is percent value. - /// svg draw context. - /// length to check - /// - /// if - /// - /// viewport's width will be used (x-axis), otherwise viewport's height will be - /// used (y-axis) - /// - /// percent base value if provided length is percent value, 0.0F otherwise - public static float CalculatePercentBaseValueIfNeeded(SvgDrawContext context, String length, bool isXAxis) { - float percentBaseValue = 0.0F; - if (CssTypesValidationUtils.IsPercentageValue(length)) { - if (context.GetCurrentViewPort() == null) { - throw new SvgProcessingException(SvgExceptionMessageConstant.ILLEGAL_RELATIVE_VALUE_NO_VIEWPORT_IS_SET); - } - percentBaseValue = isXAxis ? context.GetCurrentViewPort().GetWidth() : context.GetCurrentViewPort().GetHeight - (); - } - return percentBaseValue; - } - /// Returns the viewBox received after scaling and displacement given preserveAspectRatio. /// /// parsed viewBox rectangle. It should be a valid diff --git a/itext/itext.svg/itext/svg/utils/SvgCssUtils.cs b/itext/itext.svg/itext/svg/utils/SvgCssUtils.cs index 73d3e297a9..dcc0b62e3b 100644 --- a/itext/itext.svg/itext/svg/utils/SvgCssUtils.cs +++ b/itext/itext.svg/itext/svg/utils/SvgCssUtils.cs @@ -28,6 +28,7 @@ You should have received a copy of the GNU Affero General Public License using iText.Kernel.Geom; using iText.StyledXmlParser.Css.Util; using iText.Svg; +using iText.Svg.Exceptions; using iText.Svg.Logs; using iText.Svg.Renderers; using iText.Svg.Renderers.Impl; @@ -97,6 +98,44 @@ public static float ParseAbsoluteLength(AbstractSvgNodeRenderer svgNodeRenderer, return CssDimensionParsingUtils.ParseLength(length, percentBaseValue, defaultValue, em, rem); } + /// Parses vertical length attribute and converts it to an absolute value. + /// renderer for which length should be parsed + /// + /// + /// + /// for parsing + /// + /// default value if length is not recognized + /// + /// current + /// + /// + /// absolute value in points + public static float ParseAbsoluteVerticalLength(AbstractSvgNodeRenderer svgNodeRenderer, String length, float + defaultValue, SvgDrawContext context) { + float percentBaseValue = CalculatePercentBaseValueIfNeeded(svgNodeRenderer, context, length, false); + return ParseAbsoluteLength(svgNodeRenderer, length, percentBaseValue, defaultValue, context); + } + + /// Parses horizontal length attribute and converts it to an absolute value. + /// renderer for which length should be parsed + /// + /// + /// + /// for parsing + /// + /// default value if length is not recognized + /// + /// current + /// + /// + /// absolute value in points + public static float ParseAbsoluteHorizontalLength(AbstractSvgNodeRenderer svgNodeRenderer, String length, + float defaultValue, SvgDrawContext context) { + float percentBaseValue = CalculatePercentBaseValueIfNeeded(svgNodeRenderer, context, length, true); + return ParseAbsoluteLength(svgNodeRenderer, length, percentBaseValue, defaultValue, context); + } + /// Extract svg viewbox values. /// /// the @@ -142,65 +181,94 @@ public static float[] ParseViewBox(ISvgNodeRenderer svgRenderer) { } /// - /// Extract width and height of the passed SVGNodeRenderer, - /// defaulting to respective viewbox values if either one is not present or - /// to browser default if viewbox is missing as well. + /// Extract width and height of the passed SVGNodeRenderer, defaulting to + /// + /// if either one is not present. /// + /// + /// Extract width and height of the passed SVGNodeRenderer, defaulting to + /// + /// if either one is not present. If + /// + /// isn't specified, than respective + /// viewbox values or browser default (if viewbox is missing) will be used. + /// /// /// the /// - /// instance that contains - /// the renderer tree + /// instance that contains the renderer tree /// /// em value in pt - /// rem value in pt - /// Rectangle, where x,y = 0 and width and height are extracted ones by this method. - public static Rectangle ExtractWidthAndHeight(ISvgNodeRenderer svgRenderer, float em, float rem) { - float[] values = iText.Svg.Utils.SvgCssUtils.ParseViewBox(svgRenderer); - float defaultWidth = values == null ? CssDimensionParsingUtils.ParseAbsoluteLength(SvgConstants.Values.DEFAULT_VIEWBOX_WIDTH - ) : values[2]; - float defaultHeight = values == null ? CssDimensionParsingUtils.ParseAbsoluteLength(SvgConstants.Values.DEFAULT_VIEWBOX_HEIGHT - ) : values[3]; - Rectangle result = new Rectangle(defaultWidth, defaultHeight); - String width = svgRenderer.GetAttribute(SvgConstants.Attributes.WIDTH); - if (CssTypesValidationUtils.IsRemValue(width)) { - result.SetWidth(CssDimensionParsingUtils.ParseRelativeValue(width, rem)); - } - else { - if (CssTypesValidationUtils.IsEmValue(width)) { - result.SetWidth(CssDimensionParsingUtils.ParseRelativeValue(width, em)); + /// the svg draw context + /// rectangle, where x,y = 0 and width and height are extracted ones by this method. + public static Rectangle ExtractWidthAndHeight(ISvgNodeRenderer svgRenderer, float em, SvgDrawContext context + ) { + float finalWidth = 0; + float finalHeight = 0; + float percentHorizontalBase; + float percentVerticalBase; + // Here we follow https://svgwg.org/specs/integration/#svg-css-sizing with one exception: + // we use author specified width and height (SvgDrawContext#customViewport) + // in any case regardless viewbox existing (it is how browsers work). + if (context.GetCustomViewport() == null) { + float[] viewBox = iText.Svg.Utils.SvgCssUtils.ParseViewBox(svgRenderer); + if (viewBox == null) { + percentHorizontalBase = CssDimensionParsingUtils.ParseAbsoluteLength(SvgConstants.Values.DEFAULT_VIEWPORT_WIDTH + ); + percentVerticalBase = CssDimensionParsingUtils.ParseAbsoluteLength(SvgConstants.Values.DEFAULT_VIEWPORT_HEIGHT + ); } else { - if (width != null) { - result.SetWidth(CssDimensionParsingUtils.ParseAbsoluteLength(width)); - } - else { - if (values == null) { - LOGGER.LogWarning(SvgLogMessageConstant.MISSING_WIDTH); - } - } + percentHorizontalBase = viewBox[2]; + percentVerticalBase = viewBox[3]; } } + else { + percentHorizontalBase = context.GetCustomViewport().GetWidth(); + percentVerticalBase = context.GetCustomViewport().GetHeight(); + } + float rem = context.GetCssContext().GetRootFontSize(); + String width = svgRenderer.GetAttribute(SvgConstants.Attributes.WIDTH); + finalWidth = CalculateFinalSvgRendererLength(width, em, rem, percentHorizontalBase); String height = svgRenderer.GetAttribute(SvgConstants.Attributes.HEIGHT); - if (CssTypesValidationUtils.IsRemValue(height)) { - result.SetHeight(CssDimensionParsingUtils.ParseRelativeValue(height, rem)); + finalHeight = CalculateFinalSvgRendererLength(height, em, rem, percentVerticalBase); + return new Rectangle(finalWidth, finalHeight); + } + + private static float CalculateFinalSvgRendererLength(String length, float em, float rem, float percentBase + ) { + if (length == null) { + length = SvgConstants.Values.DEFAULT_WIDTH_AND_HEIGHT_VALUE; + } + if (CssTypesValidationUtils.IsRemValue(length)) { + return CssDimensionParsingUtils.ParseRelativeValue(length, rem); } else { - if (CssTypesValidationUtils.IsEmValue(height)) { - result.SetHeight(CssDimensionParsingUtils.ParseRelativeValue(height, em)); + if (CssTypesValidationUtils.IsEmValue(length)) { + return CssDimensionParsingUtils.ParseRelativeValue(length, em); } else { - if (height != null) { - result.SetHeight(CssDimensionParsingUtils.ParseAbsoluteLength(height)); + if (CssTypesValidationUtils.IsPercentageValue(length)) { + return CssDimensionParsingUtils.ParseRelativeValue(length, percentBase); } else { - if (values == null) { - LOGGER.LogWarning(SvgLogMessageConstant.MISSING_HEIGHT); - } + return CssDimensionParsingUtils.ParseAbsoluteLength(length); } } } - return result; + } + + private static float CalculatePercentBaseValueIfNeeded(AbstractSvgNodeRenderer svgNodeRenderer, SvgDrawContext + context, String length, bool isXAxis) { + float percentBaseValue = 0.0F; + if (CssTypesValidationUtils.IsPercentageValue(length)) { + Rectangle viewBox = svgNodeRenderer.GetCurrentViewBox(context); + if (viewBox == null) { + throw new SvgProcessingException(SvgExceptionMessageConstant.ILLEGAL_RELATIVE_VALUE_NO_VIEWPORT_IS_SET); + } + percentBaseValue = isXAxis ? viewBox.GetWidth() : viewBox.GetHeight(); + } + return percentBaseValue; } } } diff --git a/port-hash b/port-hash index 557d64e7b2..f06c3af195 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -ac38ed196978d1f68d38ccdfc1c58c4dbee26302 +46420ea909365a24c14171d170f8eec8865b55b6 From 29ddba55d2188677fa2ea53fb9b00c97c20ee5c9 Mon Sep 17 00:00:00 2001 From: Glenn Volckaert Date: Wed, 18 Dec 2024 15:32:35 +0000 Subject: [PATCH 2/3] Allow injecting of Ocsp and Crl clients and reource retriever in validation chain DEVSIX-8697 Autoported commit. Original commit hash: [1c53e77ac] Manual files: sign/pom.xml --- .../IssuingCertificateRetrieverTest.cs | 41 +++++ .../testutils/client/TestOcspClientWrapper.cs | 45 ++++- .../validation/RevocationDataValidatorTest.cs | 65 +++++-- .../validation/mocks/MockResourceRetriever.cs | 29 +++ itext/itext.sign/itext.sign.csproj | 3 +- .../signatures/IOcspClientBouncyCastle.cs | 32 ++++ .../signatures/IssuingCertificateRetriever.cs | 20 ++- .../signatures/OcspClientBouncyCastle.cs | 21 +-- .../validation/RevocationDataValidator.cs | 31 +++- .../validation/ValidatorChainBuilder.cs | 167 +++++++++++++----- port-hash | 2 +- 11 files changed, 370 insertions(+), 86 deletions(-) create mode 100644 itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs create mode 100644 itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs create mode 100644 itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs diff --git a/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs b/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs new file mode 100644 index 0000000000..663c50544c --- /dev/null +++ b/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using iText.Commons.Bouncycastle.Cert; +using iText.Commons.Utils; +using iText.Signatures.Testutils; +using iText.Signatures.Validation; +using iText.Signatures.Validation.Mocks; +using iText.Test; + +namespace iText.Signatures { +//\cond DO_NOT_DOCUMENT + internal class IssuingCertificateRetrieverTest : ExtendedITextTest { + private static readonly String CERTS_SRC = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext + .CurrentContext.TestDirectory) + "/resources/itext/signatures/certs/"; + + private static readonly char[] PASSWORD = "testpassphrase".ToCharArray(); + + [NUnit.Framework.Test] + public virtual void TestResourceRetrieverUsage() { + IX509Certificate[] cert = PemFileHelper.ReadFirstChain(CERTS_SRC + "intermediate.pem"); + IList urlsCalled = new List(); + MockResourceRetriever mockRetriever = new MockResourceRetriever(); + mockRetriever.OnGetInputStreamByUrl((u) => { + urlsCalled.Add(u); + try { + return FileUtil.GetInputStreamForFile(CERTS_SRC + "root.pem"); + } + catch (System.IO.IOException e) { + throw new Exception("Error reading certificate.", e); + } + } + ); + ValidatorChainBuilder builder = new ValidatorChainBuilder().WithResourceRetriever(() => mockRetriever); + builder.GetCertificateRetriever().RetrieveIssuerCertificate(cert[0]); + NUnit.Framework.Assert.AreEqual(1, urlsCalled.Count); + NUnit.Framework.Assert.AreEqual("http://test.example.com/example-ca/certs/ca/ca.crt", urlsCalled[0].ToString + ()); + } + } +//\endcond +} diff --git a/itext.tests/itext.sign.tests/itext/signatures/testutils/client/TestOcspClientWrapper.cs b/itext.tests/itext.sign.tests/itext/signatures/testutils/client/TestOcspClientWrapper.cs index e920b505a4..acc7653b8c 100644 --- a/itext.tests/itext.sign.tests/itext/signatures/testutils/client/TestOcspClientWrapper.cs +++ b/itext.tests/itext.sign.tests/itext/signatures/testutils/client/TestOcspClientWrapper.cs @@ -29,17 +29,22 @@ You should have received a copy of the GNU Affero General Public License using iText.Signatures; namespace iText.Signatures.Testutils.Client { - public class TestOcspClientWrapper : IOcspClient { + public class TestOcspClientWrapper : IOcspClient, IOcspClientBouncyCastle { private static readonly IBouncyCastleFactory BOUNCY_CASTLE_FACTORY = BouncyCastleFactoryCreator.GetFactory (); private readonly IList calls = new List(); + private readonly IList basicCalls = new List(); + private readonly IOcspClient wrappedClient; private Func onGetEncoded; + private Func onGetBasicPOcspResponse; + public TestOcspClientWrapper(IOcspClient wrappedClient) { this.wrappedClient = wrappedClient; } @@ -70,12 +75,36 @@ public virtual byte[] GetEncoded(IX509Certificate checkCert, IX509Certificate is return calls; } + public virtual IList GetBasicResponceCalls() { + return basicCalls; + } + public virtual iText.Signatures.Testutils.Client.TestOcspClientWrapper OnGetEncodedDo(Func callBack) { onGetEncoded = callBack; return this; } + public virtual IBasicOcspResponse GetBasicOCSPResp(IX509Certificate checkCert, IX509Certificate issuerCert + , String url) { + TestOcspClientWrapper.BasicOCSPCall call = new TestOcspClientWrapper.BasicOCSPCall(checkCert, issuerCert, + url); + basicCalls.Add(call); + if (onGetBasicPOcspResponse != null) { + return onGetBasicPOcspResponse.Invoke(call); + } + if (wrappedClient is IOcspClientBouncyCastle) { + return ((IOcspClientBouncyCastle)wrappedClient).GetBasicOCSPResp(checkCert, issuerCert, url); + } + throw new Exception("TestOcspClientWrapper for IOcspClientBouncyCastle was expected here."); + } + + public virtual iText.Signatures.Testutils.Client.TestOcspClientWrapper OnGetBasicOCSPRespDo(Func callback) { + onGetBasicPOcspResponse = callback; + return this; + } + public class OcspClientCall { public readonly IX509Certificate checkCert; @@ -95,5 +124,19 @@ public virtual void SetResponce(IBasicOcspResponse basicOCSPResp) { response = basicOCSPResp; } } + + public class BasicOCSPCall { + public readonly IX509Certificate checkCert; + + public readonly IX509Certificate issuerCert; + + public readonly String url; + + public BasicOCSPCall(IX509Certificate checkCert, IX509Certificate issuerCert, String url) { + this.checkCert = checkCert; + this.issuerCert = issuerCert; + this.url = url; + } + } } } diff --git a/itext.tests/itext.sign.tests/itext/signatures/validation/RevocationDataValidatorTest.cs b/itext.tests/itext.sign.tests/itext/signatures/validation/RevocationDataValidatorTest.cs index a497b715b9..5ea1883c13 100644 --- a/itext.tests/itext.sign.tests/itext/signatures/validation/RevocationDataValidatorTest.cs +++ b/itext.tests/itext.sign.tests/itext/signatures/validation/RevocationDataValidatorTest.cs @@ -411,7 +411,7 @@ public virtual void CrlEncodingErrorTest() { parameters.SetFreshness(ValidatorContexts.All(), CertificateSources.All(), TimeBasedContexts.All(), TimeSpan.FromDays (2)); RevocationDataValidator validator = validatorChainBuilder.BuildRevocationDataValidator(); - validator.AddCrlClient(new _ICrlClient_557(crl)).Validate(report, baseContext, checkCert, TimeTestUtil.TEST_DATE_TIME + validator.AddCrlClient(new _ICrlClient_561(crl)).Validate(report, baseContext, checkCert, TimeTestUtil.TEST_DATE_TIME ); AssertValidationReport.AssertThat(report, (a) => a.HasStatus(ValidationReport.ValidationResult.INDETERMINATE ).HasLogItem((la) => la.WithCheckName(RevocationDataValidator.REVOCATION_DATA_CHECK).WithMessage(MessageFormatUtil @@ -420,8 +420,8 @@ public virtual void CrlEncodingErrorTest() { ))); } - private sealed class _ICrlClient_557 : ICrlClient { - public _ICrlClient_557(byte[] crl) { + private sealed class _ICrlClient_561 : ICrlClient { + public _ICrlClient_561(byte[] crl) { this.crl = crl; } @@ -519,7 +519,7 @@ public virtual void ResponsesFromValidationClientArePassedTest() { mockCrlValidator.OnCallDo((c) => NUnit.Framework.Assert.AreEqual(crlGeneration, c.responseGenerationDate)); ValidationReport report = new ValidationReport(); RevocationDataValidator validator = validatorChainBuilder.GetRevocationDataValidator(); - ValidationOcspClient ocspClient = new _ValidationOcspClient_676(); + ValidationOcspClient ocspClient = new _ValidationOcspClient_680(); TestOcspResponseBuilder ocspBuilder = new TestOcspResponseBuilder(responderCert, ocspRespPrivateKey); byte[] ocspResponseBytes = new TestOcspClient().AddBuilderForCertIssuer(caCert, ocspBuilder).GetEncoded(checkCert , caCert, null); @@ -527,7 +527,7 @@ public virtual void ResponsesFromValidationClientArePassedTest() { )); ocspClient.AddResponse(basicOCSPResp, ocspGeneration, TimeBasedContext.HISTORICAL); validator.AddOcspClient(ocspClient); - ValidationCrlClient crlClient = new _ValidationCrlClient_691(); + ValidationCrlClient crlClient = new _ValidationCrlClient_695(); TestCrlBuilder crlBuilder = new TestCrlBuilder(caCert, caPrivateKey, checkDate); byte[] crlResponseBytes = new List(new TestCrlClient().AddBuilderForCertIssuer(crlBuilder).GetEncoded (checkCert, null))[0]; @@ -537,8 +537,8 @@ public virtual void ResponsesFromValidationClientArePassedTest() { validator.Validate(report, baseContext, checkCert, checkDate); } - private sealed class _ValidationOcspClient_676 : ValidationOcspClient { - public _ValidationOcspClient_676() { + private sealed class _ValidationOcspClient_680 : ValidationOcspClient { + public _ValidationOcspClient_680() { } public override byte[] GetEncoded(IX509Certificate checkCert, IX509Certificate issuerCert, String url) { @@ -547,8 +547,8 @@ public override byte[] GetEncoded(IX509Certificate checkCert, IX509Certificate i } } - private sealed class _ValidationCrlClient_691 : ValidationCrlClient { - public _ValidationCrlClient_691() { + private sealed class _ValidationCrlClient_695 : ValidationCrlClient { + public _ValidationCrlClient_695() { } public override ICollection GetEncoded(IX509Certificate checkCert, String url) { @@ -614,18 +614,18 @@ public virtual void TimeBasedContextProperlySetOnlineClientsTest() { RevocationDataValidator validator = validatorChainBuilder.GetRevocationDataValidator(); TestOcspResponseBuilder ocspBuilder = new TestOcspResponseBuilder(responderCert, ocspRespPrivateKey); TestOcspClient testOcspClient = new TestOcspClient().AddBuilderForCertIssuer(caCert, ocspBuilder); - OcspClientBouncyCastle ocspClient = new _OcspClientBouncyCastle_770(testOcspClient); + OcspClientBouncyCastle ocspClient = new _OcspClientBouncyCastle_774(testOcspClient); validator.AddOcspClient(ocspClient); TestCrlBuilder crlBuilder = new TestCrlBuilder(caCert, caPrivateKey, checkDate); TestCrlClient testCrlClient = new TestCrlClient().AddBuilderForCertIssuer(crlBuilder); - CrlClientOnline crlClient = new _CrlClientOnline_780(testCrlClient); + CrlClientOnline crlClient = new _CrlClientOnline_784(testCrlClient); validator.AddCrlClient(crlClient); validator.Validate(report, baseContext.SetTimeBasedContext(TimeBasedContext.HISTORICAL), checkCert, checkDate ); } - private sealed class _OcspClientBouncyCastle_770 : OcspClientBouncyCastle { - public _OcspClientBouncyCastle_770(TestOcspClient testOcspClient) { + private sealed class _OcspClientBouncyCastle_774 : OcspClientBouncyCastle { + public _OcspClientBouncyCastle_774(TestOcspClient testOcspClient) { this.testOcspClient = testOcspClient; } @@ -636,8 +636,8 @@ public override byte[] GetEncoded(IX509Certificate checkCert, IX509Certificate r private readonly TestOcspClient testOcspClient; } - private sealed class _CrlClientOnline_780 : CrlClientOnline { - public _CrlClientOnline_780(TestCrlClient testCrlClient) { + private sealed class _CrlClientOnline_784 : CrlClientOnline { + public _CrlClientOnline_784(TestCrlClient testCrlClient) { this.testCrlClient = testCrlClient; } @@ -802,5 +802,40 @@ public virtual void CrlClientGetEncodedFailureTest() { ).HasLogItem((l) => l.WithMessage(RevocationDataValidator.CRL_CLIENT_FAILURE, (p) => crlClient.ToString ()))); } + + [NUnit.Framework.Test] + public virtual void TestCrlClientInjection() { + TestCrlClient testCrlClient = new TestCrlClient(); + TestCrlClientWrapper mockCrlClient = new TestCrlClientWrapper(testCrlClient); + validatorChainBuilder.WithCrlClient(() => mockCrlClient); + testCrlClient.AddBuilderForCertIssuer(caCert, caPrivateKey); + ValidationReport report = new ValidationReport(); + ValidationContext context = new ValidationContext(ValidatorContext.CERTIFICATE_CHAIN_VALIDATOR, CertificateSource + .SIGNER_CERT, TimeBasedContext.HISTORICAL); + validatorChainBuilder.BuildRevocationDataValidator().Validate(report, context, checkCert, TimeTestUtil.TEST_DATE_TIME + ); + NUnit.Framework.Assert.AreEqual(1, mockCrlClient.GetCalls().Count); + } + + [NUnit.Framework.Test] + public virtual void TestOcspClientInjection() { + DateTime checkDate = TimeTestUtil.TEST_DATE_TIME; + TestOcspResponseBuilder builder = new TestOcspResponseBuilder(responderCert, ocspRespPrivateKey); + builder.SetProducedAt(checkDate.AddDays(5)); + builder.SetThisUpdate(DateTimeUtil.GetCalendar(checkDate.AddDays(5))); + builder.SetNextUpdate(DateTimeUtil.GetCalendar(checkDate.AddDays(10))); + TestOcspClientWrapper mockOcspClient = new TestOcspClientWrapper(new TestOcspClient().AddBuilderForCertIssuer + (caCert, builder)); + validatorChainBuilder.WithOcspClient(() => mockOcspClient); + mockParameters.AddRevocationOnlineFetchingResponse(SignatureValidationProperties.OnlineFetching.ALWAYS_FETCH + ); + certificateRetriever.AddKnownCertificates(JavaUtil.ArraysAsList(caCert, trustedOcspResponderCert)); + ValidationReport report = new ValidationReport(); + ValidationContext context = new ValidationContext(ValidatorContext.CERTIFICATE_CHAIN_VALIDATOR, CertificateSource + .SIGNER_CERT, TimeBasedContext.HISTORICAL); + validatorChainBuilder.BuildRevocationDataValidator().Validate(report, context, checkCert, TimeTestUtil.TEST_DATE_TIME + ); + NUnit.Framework.Assert.AreEqual(2, mockOcspClient.GetBasicResponceCalls().Count); + } } } diff --git a/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs b/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs new file mode 100644 index 0000000000..38e963c7ef --- /dev/null +++ b/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs @@ -0,0 +1,29 @@ +using System; +using System.IO; +using iText.StyledXmlParser.Resolver.Resource; + +namespace iText.Signatures.Validation.Mocks { + public class MockResourceRetriever : IResourceRetriever { + private Func getByteArrayByUrlHandler = (u) => null; + + private Func getInputStreamByUrlHandler = (u) => null; + + public virtual Stream GetInputStreamByUrl(Uri url) { + return getInputStreamByUrlHandler.Invoke(url); + } + + public virtual byte[] GetByteArrayByUrl(Uri url) { + return getByteArrayByUrlHandler.Invoke(url); + } + + public virtual MockResourceRetriever OnGetInputStreamByUrl(Func handler) { + getInputStreamByUrlHandler = handler; + return this; + } + + public virtual MockResourceRetriever OnGetByteArrayByUrl(Func handler) { + getByteArrayByUrlHandler = handler; + return this; + } + } +} diff --git a/itext/itext.sign/itext.sign.csproj b/itext/itext.sign/itext.sign.csproj index b1f45cc7a4..04f2dee329 100644 --- a/itext/itext.sign/itext.sign.csproj +++ b/itext/itext.sign/itext.sign.csproj @@ -26,7 +26,8 @@ - + + 1701;1702;1591;1570;1572;1573;1574;1580;1584;1658 diff --git a/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs b/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs new file mode 100644 index 0000000000..c2ae95818d --- /dev/null +++ b/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs @@ -0,0 +1,32 @@ +using System; +using iText.Commons.Bouncycastle.Asn1.Ocsp; +using iText.Commons.Bouncycastle.Cert; + +namespace iText.Signatures { + /// Interface for the Online Certificate Status Protocol (OCSP) Client. + /// + /// Interface for the Online Certificate Status Protocol (OCSP) Client. + /// With a method returning parsed IBasicOCSPResp instead of encoded response. + /// + public interface IOcspClientBouncyCastle : IOcspClient { + /// Gets OCSP response. + /// + /// Gets OCSP response. + /// + /// If required, + /// + /// can be checked using + /// + /// class. + /// + /// the certificate to check + /// parent certificate + /// to get the verification + /// + /// + /// + /// an OCSP response wrapper + /// + IBasicOcspResponse GetBasicOCSPResp(IX509Certificate checkCert, IX509Certificate rootCert, String url); + } +} diff --git a/itext/itext.sign/itext/signatures/IssuingCertificateRetriever.cs b/itext/itext.sign/itext/signatures/IssuingCertificateRetriever.cs index 8d58e41bbc..418d392260 100644 --- a/itext/itext.sign/itext/signatures/IssuingCertificateRetriever.cs +++ b/itext/itext.sign/itext/signatures/IssuingCertificateRetriever.cs @@ -33,6 +33,7 @@ You should have received a copy of the GNU Affero General Public License using iText.Commons.Utils.Collections; using iText.Signatures.Logs; using iText.Signatures.Validation; +using iText.StyledXmlParser.Resolver.Resource; namespace iText.Signatures { /// @@ -50,15 +51,30 @@ public class IssuingCertificateRetriever : IIssuingCertificateRetriever { private readonly IDictionary> knownCertificates = new Dictionary>(); + private readonly IResourceRetriever resourceRetriever; + /// /// Creates /// /// instance. /// public IssuingCertificateRetriever() { + this.resourceRetriever = new DefaultResourceRetriever(); + } + + /// + /// Creates + /// + /// instance. + /// + /// + /// an @{link IResourceRetriever} instance to use for performing http + /// requests. + /// + public IssuingCertificateRetriever(IResourceRetriever resourceRetriever) { + this.resourceRetriever = resourceRetriever; } - // Empty constructor. /// /// /// @@ -389,7 +405,7 @@ public virtual bool IsCertificateTrusted(IX509Certificate certificate) { /// . /// protected internal virtual Stream GetIssuerCertByURI(String uri) { - return SignUtils.GetHttpResponse(new Uri(uri)); + return resourceRetriever.GetInputStreamByUrl(new Uri(uri)); } /// Parses certificates represented as byte array. diff --git a/itext/itext.sign/itext/signatures/OcspClientBouncyCastle.cs b/itext/itext.sign/itext/signatures/OcspClientBouncyCastle.cs index d488045608..b3f003e26b 100644 --- a/itext/itext.sign/itext/signatures/OcspClientBouncyCastle.cs +++ b/itext/itext.sign/itext/signatures/OcspClientBouncyCastle.cs @@ -34,7 +34,7 @@ You should have received a copy of the GNU Affero General Public License namespace iText.Signatures { /// OcspClient implementation using BouncyCastle. - public class OcspClientBouncyCastle : IOcspClient { + public class OcspClientBouncyCastle : IOcspClientBouncyCastle { private static readonly IBouncyCastleFactory BOUNCY_CASTLE_FACTORY = BouncyCastleFactoryCreator.GetFactory (); @@ -51,24 +51,7 @@ public OcspClientBouncyCastle() { } // Empty constructor in order for default one to not be removed if another one is added. - /// Gets OCSP response. - /// - /// Gets OCSP response. - /// - /// If required, - /// - /// can be checked using - /// - /// class. - /// - /// the certificate to check - /// parent certificate - /// to get the verification - /// - /// - /// - /// an OCSP response wrapper - /// + /// public virtual IBasicOcspResponse GetBasicOCSPResp(IX509Certificate checkCert, IX509Certificate rootCert, String url) { try { diff --git a/itext/itext.sign/itext/signatures/validation/RevocationDataValidator.cs b/itext/itext.sign/itext/signatures/validation/RevocationDataValidator.cs index 11aed3377f..5be659e4c6 100644 --- a/itext/itext.sign/itext/signatures/validation/RevocationDataValidator.cs +++ b/itext/itext.sign/itext/signatures/validation/RevocationDataValidator.cs @@ -116,6 +116,8 @@ public class RevocationDataValidator { private readonly CRLValidator crlValidator; + private readonly ValidatorChainBuilder builder; + /// /// Creates new /// @@ -132,6 +134,7 @@ protected internal RevocationDataValidator(ValidatorChainBuilder builder) { this.crlValidator = builder.GetCRLValidator(); this.crlClients.AddAll(this.properties.GetCrlClients()); this.ocspClients.AddAll(this.properties.GetOcspClients()); + this.builder = builder; } /// @@ -139,6 +142,14 @@ protected internal RevocationDataValidator(ValidatorChainBuilder builder) { /// /// to be used for CRL responses receiving. /// + /// + /// Add + /// + /// to be used for CRL responses receiving. + /// These clients will be used regardless of the + /// + /// settings + /// /// /// /// @@ -158,6 +169,14 @@ public virtual iText.Signatures.Validation.RevocationDataValidator AddCrlClient( /// /// to be used for OCSP responses receiving. /// + /// + /// Add + /// + /// to be used for OCSP responses receiving. + /// These clients will be used regardless of the + /// + /// settings + /// /// /// /// @@ -388,8 +407,7 @@ private void ValidateRevocationData(ValidationReport report, ValidationContext c if (SignatureValidationProperties.OnlineFetching.ALWAYS_FETCH == onlineFetching) { foreach (IX509Certificate issuerCert in issuerCerts) { SafeCalling.OnRuntimeExceptionLog(() => { - IBasicOcspResponse basicOCSPResp = new OcspClientBouncyCastle().GetBasicOCSPResp(certificate, issuerCert, - null); + IBasicOcspResponse basicOCSPResp = builder.GetOcspClient().GetBasicOCSPResp(certificate, issuerCert, null); FillOcspResponses(ocspResponses, basicOCSPResp, DateTimeUtil.GetCurrentUtcTime(), TimeBasedContext.PRESENT ); } @@ -410,7 +428,7 @@ private void ValidateRevocationData(ValidationReport report, ValidationContext c SignatureValidationProperties.OnlineFetching onlineFetching = properties.GetRevocationOnlineFetching(context .SetValidatorContext(ValidatorContext.CRL_VALIDATOR)); if (SignatureValidationProperties.OnlineFetching.ALWAYS_FETCH == onlineFetching) { - crlResponses.AddAll(RetrieveAllCRLResponsesUsingClient(report, certificate, new CrlClientOnline())); + crlResponses.AddAll(RetrieveAllCRLResponsesUsingClient(report, certificate, builder.GetCrlClient())); } // Sort all the CRL responses available based on the most recent revocation data. return crlResponses.Sorted((o1, o2) => o2.crl.GetThisUpdate().CompareTo(o1.crl.GetThisUpdate())).ToList(); @@ -423,16 +441,15 @@ private void TryToFetchRevInfoOnline(ValidationReport report, ValidationContext .SetValidatorContext(ValidatorContext.CRL_VALIDATOR)); if (SignatureValidationProperties.OnlineFetching.FETCH_IF_NO_OTHER_DATA_AVAILABLE == crlOnlineFetching) { // Sort all the CRL responses available based on the most recent revocation data. - onlineCrlResponses.AddAll(RetrieveAllCRLResponsesUsingClient(report, certificate, new CrlClientOnline()).Sorted - ((o1, o2) => o2.crl.GetThisUpdate().CompareTo(o1.crl.GetThisUpdate())).ToList()); + onlineCrlResponses.AddAll(RetrieveAllCRLResponsesUsingClient(report, certificate, builder.GetCrlClient()). + Sorted((o1, o2) => o2.crl.GetThisUpdate().CompareTo(o1.crl.GetThisUpdate())).ToList()); } SignatureValidationProperties.OnlineFetching ocspOnlineFetching = properties.GetRevocationOnlineFetching(context .SetValidatorContext(ValidatorContext.OCSP_VALIDATOR)); if (SignatureValidationProperties.OnlineFetching.FETCH_IF_NO_OTHER_DATA_AVAILABLE == ocspOnlineFetching) { foreach (IX509Certificate issuerCert in certificateRetriever.RetrieveIssuerCertificate(certificate)) { SafeCalling.OnRuntimeExceptionLog(() => { - IBasicOcspResponse basicOCSPResp = new OcspClientBouncyCastle().GetBasicOCSPResp(certificate, issuerCert, - null); + IBasicOcspResponse basicOCSPResp = builder.GetOcspClient().GetBasicOCSPResp(certificate, issuerCert, null); IList ocspResponses = new List(); FillOcspResponses(ocspResponses, basicOCSPResp, DateTimeUtil.GetCurrentUtcTime(), TimeBasedContext.PRESENT diff --git a/itext/itext.sign/itext/signatures/validation/ValidatorChainBuilder.cs b/itext/itext.sign/itext/signatures/validation/ValidatorChainBuilder.cs index c01836f193..ff8c3cbf54 100644 --- a/itext/itext.sign/itext/signatures/validation/ValidatorChainBuilder.cs +++ b/itext/itext.sign/itext/signatures/validation/ValidatorChainBuilder.cs @@ -26,6 +26,7 @@ You should have received a copy of the GNU Affero General Public License using iText.Kernel.Pdf; using iText.Signatures; using iText.Signatures.Validation.Report.Xml; +using iText.StyledXmlParser.Resolver.Resource; namespace iText.Signatures.Validation { /// A builder class to construct all necessary parts of a validation chain. @@ -34,7 +35,7 @@ namespace iText.Signatures.Validation { /// The builder can be reused to create multiple instances of a validator. /// public class ValidatorChainBuilder { - private SignatureValidationProperties properties; + private SignatureValidationProperties properties = new SignatureValidationProperties(); private Func certificateRetrieverFactory; @@ -46,14 +47,33 @@ public class ValidatorChainBuilder { private Func crlValidatorFactory; + private Func resourceRetrieverFactory; + private Func documentRevisionsValidatorFactory; + private Func ocspClientFactory; + + private Func crlClientFactory; + private ICollection trustedCertificates; private ICollection knownCertificates; private AdESReportAggregator adESReportAggregator = new NullAdESReportAggregator(); + /// Creates a ValidatorChainBuilder using default implementations + public ValidatorChainBuilder() { + certificateRetrieverFactory = () => BuildIssuingCertificateRetriever(); + certificateChainValidatorFactory = () => BuildCertificateChainValidator(); + revocationDataValidatorFactory = () => BuildRevocationDataValidator(); + ocspValidatorFactory = () => BuildOCSPValidator(); + crlValidatorFactory = () => BuildCRLValidator(); + resourceRetrieverFactory = () => new DefaultResourceRetriever(); + documentRevisionsValidatorFactory = () => BuildDocumentRevisionsValidator(); + ocspClientFactory = () => new OcspClientBouncyCastle(); + crlClientFactory = () => new CrlClientOnline(); + } + /// /// Create a new /// @@ -157,8 +177,8 @@ public virtual CRLValidator BuildCRLValidator() { /// /// the document revisions validator factory method to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithDocumentRevisionsValidatorFactory(Func documentRevisionsValidatorFactory) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithDocumentRevisionsValidatorFactory(Func + documentRevisionsValidatorFactory) { this.documentRevisionsValidatorFactory = documentRevisionsValidatorFactory; return this; } @@ -170,11 +190,25 @@ public virtual ValidatorChainBuilder WithDocumentRevisionsValidatorFactory(Func< /// /// the CRLValidatorFactory method to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithCRLValidatorFactory(Func crlValidatorFactory) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithCRLValidatorFactory(Func crlValidatorFactory) { this.crlValidatorFactory = crlValidatorFactory; return this; } + /// + /// Use this factory method to create instances of + /// + /// for use in the validation chain. + /// + /// the ResourceRetrieverFactory method to use. + /// the current ValidatorChainBuilder. + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithResourceRetriever(Func resourceRetrieverFactory) { + this.resourceRetrieverFactory = resourceRetrieverFactory; + return this; + } + /// /// Use this factory method to create instances of /// @@ -182,7 +216,8 @@ public virtual ValidatorChainBuilder WithCRLValidatorFactory(Func /// /// the OCSPValidatorFactory method to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithOCSPValidatorFactory(Func ocspValidatorFactory) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithOCSPValidatorFactory(Func ocspValidatorFactory) { this.ocspValidatorFactory = ocspValidatorFactory; return this; } @@ -194,8 +229,8 @@ public virtual ValidatorChainBuilder WithOCSPValidatorFactory(Func /// the RevocationDataValidator factory method to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithRevocationDataValidatorFactory(Func revocationDataValidatorFactory - ) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithRevocationDataValidatorFactory(Func revocationDataValidatorFactory) { this.revocationDataValidatorFactory = revocationDataValidatorFactory; return this; } @@ -207,8 +242,8 @@ public virtual ValidatorChainBuilder WithRevocationDataValidatorFactory(Func /// the CertificateChainValidator factory method to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithCertificateChainValidatorFactory(Func - certificateChainValidatorFactory) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithCertificateChainValidatorFactory(Func + certificateChainValidatorFactory) { this.certificateChainValidatorFactory = certificateChainValidatorFactory; return this; } @@ -220,8 +255,8 @@ public virtual ValidatorChainBuilder WithCertificateChainValidatorFactory(Func /// the SignatureValidationProperties instance to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithSignatureValidationProperties(SignatureValidationProperties properties - ) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithSignatureValidationProperties(SignatureValidationProperties + properties) { this.properties = properties; return this; } @@ -233,20 +268,46 @@ public virtual ValidatorChainBuilder WithSignatureValidationProperties(Signature /// /// the IssuingCertificateRetriever factory method to use /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithIssuingCertificateRetrieverFactory(Func certificateRetrieverFactory) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithIssuingCertificateRetrieverFactory(Func + certificateRetrieverFactory) { this.certificateRetrieverFactory = certificateRetrieverFactory; return this; } + /// + /// Use this factory to create instances of + /// + /// for use in the validation chain. + /// + /// the IOcspClient factory method to use + /// the current ValidatorChainBuilder. + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithOcspClient(Func ocspClientFactory) { + this.ocspClientFactory = ocspClientFactory; + return this; + } + + /// + /// Use this factory to create instances of + /// + /// for use in the validation chain. + /// + /// the ICrlClient factory method to use + /// the current ValidatorChainBuilder. + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithCrlClient(Func crlClientFactory + ) { + this.crlClientFactory = crlClientFactory; + return this; + } + /// /// Adds known certificates to the /// . /// /// the list of known certificates to add /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithKnownCertificates(ICollection knownCertificates - ) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithKnownCertificates(ICollection knownCertificates) { this.knownCertificates = new List(knownCertificates); return this; } @@ -257,8 +318,8 @@ public virtual ValidatorChainBuilder WithKnownCertificates(ICollection /// the list of trusted certificates to set /// the current ValidatorChainBuilder. - public virtual ValidatorChainBuilder WithTrustedCertificates(ICollection trustedCertificates - ) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithTrustedCertificates(ICollection trustedCertificates) { this.trustedCertificates = new List(trustedCertificates); return this; } @@ -275,7 +336,8 @@ public virtual ValidatorChainBuilder WithTrustedCertificates(ICollection /// the report aggregator to use /// the current ValidatorChainBuilder - public virtual ValidatorChainBuilder WithAdESReportAggregator(AdESReportAggregator adESReportAggregator) { + public virtual iText.Signatures.Validation.ValidatorChainBuilder WithAdESReportAggregator(AdESReportAggregator + adESReportAggregator) { this.adESReportAggregator = adESReportAggregator; return this; } @@ -291,9 +353,6 @@ public virtual ValidatorChainBuilder WithAdESReportAggregator(AdESReportAggregat /// instance. /// public virtual IssuingCertificateRetriever GetCertificateRetriever() { - if (certificateRetrieverFactory == null) { - return BuildIssuingCertificateRetriever(); - } return certificateRetrieverFactory(); } @@ -308,9 +367,6 @@ public virtual IssuingCertificateRetriever GetCertificateRetriever() { /// instance. /// public virtual SignatureValidationProperties GetProperties() { - if (properties == null) { - properties = new SignatureValidationProperties(); - } return properties; } @@ -347,9 +403,6 @@ public virtual AdESReportAggregator GetAdESReportAggregator() { /// instance. /// internal virtual DocumentRevisionsValidator GetDocumentRevisionsValidator() { - if (documentRevisionsValidatorFactory == null) { - return BuildDocumentRevisionsValidator(); - } return documentRevisionsValidatorFactory(); } //\endcond @@ -366,9 +419,6 @@ internal virtual DocumentRevisionsValidator GetDocumentRevisionsValidator() { /// instance. /// internal virtual CertificateChainValidator GetCertificateChainValidator() { - if (certificateChainValidatorFactory == null) { - return BuildCertificateChainValidator(); - } return certificateChainValidatorFactory(); } //\endcond @@ -385,13 +435,56 @@ internal virtual CertificateChainValidator GetCertificateChainValidator() { /// instance. /// internal virtual RevocationDataValidator GetRevocationDataValidator() { - if (revocationDataValidatorFactory == null) { - return BuildRevocationDataValidator(); - } return revocationDataValidatorFactory(); } //\endcond +//\cond DO_NOT_DOCUMENT + /// + /// Retrieves the explicitly added or automatically created + /// + /// instance. + /// + /// + /// the explicitly added or automatically created + /// + /// instance. + /// + internal virtual ICrlClient GetCrlClient() { + return crlClientFactory(); + } +//\endcond + +//\cond DO_NOT_DOCUMENT + /// + /// Retrieves the explicitly added or automatically created + /// + /// instance. + /// + /// + /// the explicitly added or automatically created + /// + /// instance. + /// + internal virtual IOcspClientBouncyCastle GetOcspClient() { + return ocspClientFactory(); + } +//\endcond + + /// + /// Retrieves the explicitly added or automatically created + /// + /// instance. + /// + /// + /// the explicitly added or automatically created + /// + /// instance. + /// + public virtual IResourceRetriever GetResourceRetriever() { + return resourceRetrieverFactory(); + } + //\cond DO_NOT_DOCUMENT /// /// Retrieves the explicitly added or automatically created @@ -404,9 +497,6 @@ internal virtual RevocationDataValidator GetRevocationDataValidator() { /// instance. /// internal virtual CRLValidator GetCRLValidator() { - if (crlValidatorFactory == null) { - return BuildCRLValidator(); - } return crlValidatorFactory(); } //\endcond @@ -423,15 +513,12 @@ internal virtual CRLValidator GetCRLValidator() { /// instance. /// internal virtual OCSPValidator GetOCSPValidator() { - if (ocspValidatorFactory == null) { - return BuildOCSPValidator(); - } return ocspValidatorFactory(); } //\endcond private IssuingCertificateRetriever BuildIssuingCertificateRetriever() { - IssuingCertificateRetriever result = new IssuingCertificateRetriever(); + IssuingCertificateRetriever result = new IssuingCertificateRetriever(this.resourceRetrieverFactory()); if (trustedCertificates != null) { result.SetTrustedCertificates(trustedCertificates); } diff --git a/port-hash b/port-hash index f06c3af195..b592b3e5b0 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -46420ea909365a24c14171d170f8eec8865b55b6 +1c53e77ac5bb236a55406b3417dfe89bef1250c0 From 4aec83f5750459cb29e904f5b6d64d9eb7ebae89 Mon Sep 17 00:00:00 2001 From: iText Software Date: Wed, 18 Dec 2024 16:12:39 +0000 Subject: [PATCH 3/3] Add missing copyright headers Autoported commit. Original commit hash: [81e947664] --- .../IssuingCertificateRetrieverTest.cs | 22 +++++++++++++++++++ .../validation/mocks/MockResourceRetriever.cs | 22 +++++++++++++++++++ .../signatures/IOcspClientBouncyCastle.cs | 22 +++++++++++++++++++ port-hash | 2 +- 4 files changed, 67 insertions(+), 1 deletion(-) diff --git a/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs b/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs index 663c50544c..f7ab08a14a 100644 --- a/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs +++ b/itext.tests/itext.sign.tests/itext/signatures/IssuingCertificateRetrieverTest.cs @@ -1,3 +1,25 @@ +/* +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 System.Collections.Generic; using iText.Commons.Bouncycastle.Cert; diff --git a/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs b/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs index 38e963c7ef..7886ce106e 100644 --- a/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs +++ b/itext.tests/itext.sign.tests/itext/signatures/validation/mocks/MockResourceRetriever.cs @@ -1,3 +1,25 @@ +/* +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 System.IO; using iText.StyledXmlParser.Resolver.Resource; diff --git a/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs b/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs index c2ae95818d..7cd08ddc08 100644 --- a/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs +++ b/itext/itext.sign/itext/signatures/IOcspClientBouncyCastle.cs @@ -1,3 +1,25 @@ +/* +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.Commons.Bouncycastle.Asn1.Ocsp; using iText.Commons.Bouncycastle.Cert; diff --git a/port-hash b/port-hash index b592b3e5b0..45644bb10c 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -1c53e77ac5bb236a55406b3417dfe89bef1250c0 +81e947664c0e8cd96bb236ddbfb88205bdcc0243