Skip to content

Commit 5f92da6

Browse files
committed
[RELEASE] iText 7 pdfHTML 4.0.3
2 parents 2920093 + f591e04 commit 5f92da6

File tree

18 files changed

+74
-22
lines changed

18 files changed

+74
-22
lines changed

doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = "pdfHTML 4.0.2 API"
35+
PROJECT_NAME = "pdfHTML 4.0.3 API"
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version

itext.tests/itext.html2pdf.tests/Properties/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
[assembly: Guid("ae4e5743-0665-4705-9a33-07ea57cdd269")]
1717

18-
[assembly: AssemblyVersion("4.0.2.0")]
19-
[assembly: AssemblyFileVersion("4.0.2.0")]
20-
[assembly: AssemblyInformationalVersion("4.0.2")]
18+
[assembly: AssemblyVersion("4.0.3.0")]
19+
[assembly: AssemblyFileVersion("4.0.3.0")]
20+
[assembly: AssemblyInformationalVersion("4.0.3")]
2121

2222
#if !NETSTANDARD2_0
2323
[assembly: NUnit.Framework.Timeout(300000)]

itext.tests/itext.html2pdf.tests/itext.html2pdf.tests.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
</ItemGroup>
4646
<ItemGroup>
4747
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
48-
<PackageReference Include="itext7" Version="7.2.2" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
48+
<PackageReference Include="itext7" Version="7.2.3" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
4949
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj')" />
5050
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj')" />
5151
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj')" />
5252
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.netstandard.csproj')" />
5353
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj')" />
54-
<PackageReference Include="itext7.hyph" Version="7.2.2" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj')" />
54+
<PackageReference Include="itext7.hyph" Version="7.2.3" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.netstandard.csproj')" />
5555
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
56-
<PackageReference Include="itext7.pdftest" Version="7.2.2" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
56+
<PackageReference Include="itext7.pdftest" Version="7.2.3" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
5757
<ProjectReference Include="..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.netstandard.csproj')" />
5858
<ProjectReference Include="..\..\..\itextcore\itext\itext.svg\itext.svg.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.netstandard.csproj')" />
5959
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.csproj" />

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/DisplayFlexTest.cs

+5
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ public virtual void MarginsCollapseInsideFlexItemTest() {
419419
ConvertToPdfAndCompare("marginsCollapseInsideFlexItem", SOURCE_FOLDER, DESTINATION_FOLDER);
420420
}
421421

422+
[NUnit.Framework.Test]
423+
public virtual void ResolveStylesIfParentHasDisplayFlexStyleTest() {
424+
ConvertToPdfAndCompare("displayNoneTest", SOURCE_FOLDER, DESTINATION_FOLDER);
425+
}
426+
422427
private static void AssertDiv(IElement element, String text) {
423428
NUnit.Framework.Assert.IsTrue(element is Div);
424429
NUnit.Framework.Assert.AreEqual(1, ((Div)element).GetChildren().Count);

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/FloatTest.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ public virtual void ResponsiveIText() {
711711
foreach (PageSize pageSize in pageSizes) {
712712
float? pxWidth = null;
713713
if (pageSize != null) {
714-
pxWidth = CssDimensionParsingUtils.ParseAbsoluteLength(pageSize.GetWidth().ToString());
714+
pxWidth = CssDimensionParsingUtils.ParseAbsoluteLength(pageSize.GetWidth().ToString(System.Globalization.CultureInfo.InvariantCulture
715+
));
715716
}
716717
String outName = "responsiveIText" + (pxWidth != null ? "_" + (int)(float)pxWidth : "") + ".pdf";
717718
PdfWriter writer = new PdfWriter(DESTINATION_FOLDER + outName);
@@ -731,7 +732,8 @@ public virtual void ResponsiveIText() {
731732
foreach (PageSize pageSize in pageSizes) {
732733
float? pxWidth = null;
733734
if (pageSize != null) {
734-
pxWidth = CssDimensionParsingUtils.ParseAbsoluteLength(pageSize.GetWidth().ToString());
735+
pxWidth = CssDimensionParsingUtils.ParseAbsoluteLength(pageSize.GetWidth().ToString(System.Globalization.CultureInfo.InvariantCulture
736+
));
735737
}
736738
String outName = "responsiveIText" + (pxWidth != null ? "_" + (int)(float)pxWidth : "") + ".pdf";
737739
String cmpName = "cmp_" + outName;

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/MarginTest.cs

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ public virtual void MarginAutoImageInsideDiv02Test() {
6868
ConvertToPdfAndCompare("marginAutoImageInsideDiv02", SOURCE_FOLDER, DESTINATION_FOLDER);
6969
}
7070

71+
[NUnit.Framework.Test]
72+
public virtual void AutoMarginTest() {
73+
//TODO DEVSIX-5002 pdfHTML: support 'margin: auto'
74+
ConvertToPdfAndCompare("autoMargin", SOURCE_FOLDER, DESTINATION_FOLDER);
75+
}
76+
7177
[NUnit.Framework.Test]
7278
//TODO DEVSIX-1101 Layout + Html2pdf: Support margin value in percents
7379
[LogMessage(Html2PdfLogMessageConstant.MARGIN_VALUE_IN_PERCENT_NOT_SUPPORTED)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<style>
5+
*[parent]:not([parent~="z"]) {
6+
display: flex;
7+
}
8+
*[child1]:not([child1~="z"]) {
9+
display: none;
10+
}
11+
*[child2]:not([child2~="z"]) {
12+
display: block;
13+
}
14+
</style>
15+
<meta charset="UTF-8">
16+
<title>Title</title>
17+
</head>
18+
<body>
19+
<div class="fieldLabel" parent="v"> FlexParent
20+
<div class="fieldLabe2" child1="w"> , NoneChild </div>
21+
<div class="fieldLabe2" child2="x"> , BlockChild </div>
22+
</div>
23+
<div class="fieldLabe3"> NoneChild should be unvisible </div>
24+
</body>
25+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
</head>
5+
<body>
6+
<div style="background-color: blue; position: absolute">
7+
<div style="background-color: yellow; width: 100px; margin-left: auto">
8+
should aligned right cause of margins<br/>
9+
</div>
10+
<div style="background-color: yellow; width: 200px">
11+
should aligned left as default
12+
</div>
13+
</div>
14+
</body>
15+
</html>

itext/itext.html2pdf/Properties/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828

2929
[assembly: Guid("ff6ba09d-3655-466a-8c17-a7bfd3479ca1")]
3030

31-
[assembly: AssemblyVersion("4.0.2.0")]
32-
[assembly: AssemblyFileVersion("4.0.2.0")]
33-
[assembly: AssemblyInformationalVersion("4.0.2")]
31+
[assembly: AssemblyVersion("4.0.3.0")]
32+
[assembly: AssemblyFileVersion("4.0.3.0")]
33+
[assembly: AssemblyInformationalVersion("4.0.3")]

itext/itext.html2pdf/itext.html2pdf.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</ItemGroup>
3232
<ItemGroup>
3333
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
34-
<PackageReference Include="itext7" Version="7.2.2" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
34+
<PackageReference Include="itext7" Version="7.2.3" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
3535
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj')" />
3636
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.netstandard.csproj')" />
3737
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.netstandard.csproj')" />

itext/itext.html2pdf/itext/html2pdf/actions/data/PdfHtmlProductData.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace iText.Html2pdf.Actions.Data {
3333
public sealed class PdfHtmlProductData {
3434
private const String PDF_HTML_PUBLIC_PRODUCT_NAME = "pdfHTML";
3535

36-
private const String PDF_HTML_VERSION = "4.0.2";
36+
private const String PDF_HTML_VERSION = "4.0.3";
3737

3838
private const int PDF_HTML_COPYRIGHT_SINCE = 2000;
3939

itext/itext.html2pdf/itext/html2pdf/css/apply/impl/SpanTagCssApplier.cs

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public virtual void Apply(ProcessorContext context, IStylesContainer stylesConta
8282
}
8383
}
8484
}
85-
// TODO as for now spans are flattened, let's at least make kids of floating spans floating too
8685
String floatVal = cssStyles.Get(CssConstants.FLOAT);
8786
if (floatVal != null && !CssConstants.NONE.Equals(floatVal)) {
8887
foreach (IPropertyContainer elem in spanTagWorker.GetAllElements()) {

itext/itext.html2pdf/itext/html2pdf/css/resolve/CssContentPropertyResolver.cs

-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ internal static IList<INode> ResolveContent(IDictionary<String, String> styles,
223223
if (token.GetValue().StartsWith("url(")) {
224224
IDictionary<String, String> attributes = new Dictionary<String, String>();
225225
attributes.Put(AttributeConstants.SRC, CssUtils.ExtractUrl(token.GetValue()));
226-
//TODO: probably should add user agent styles on CssContentElementNode creation, not here.
227226
attributes.Put(AttributeConstants.STYLE, CssConstants.DISPLAY + ":" + CssConstants.INLINE_BLOCK);
228227
result.Add(new CssContentElementNode(contentContainer, TagConstants.IMG, attributes));
229228
}

itext/itext.html2pdf/itext/html2pdf/css/resolve/DefaultCssResolver.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@ private IDictionary<String, String> ResolveStyles(INode element, CssContext cont
163163
elementStyles = StyleUtil.MergeParentStyleDeclaration(elementStyles, entry.Key, entry.Value, parentStyles.
164164
Get(CommonCssConstants.FONT_SIZE), inheritanceRules);
165165
// If the parent has display: flex, the flex item is blockified
166-
// no matter what display value is set for it.
166+
// no matter what display value is set for it (except 'none' value).
167167
// See CSS Flexible Box Layout Module Level 1,
168168
// W3C Candidate Recommendation, 19 November 2018: 4. Flex Items.
169-
if (IsFlexItem(entry, elementStyles.Get(CssConstants.DISPLAY))) {
169+
String currentElementDisplay = elementStyles.Get(CssConstants.DISPLAY);
170+
if (IsFlexItem(entry, currentElementDisplay) && !CommonCssConstants.NONE.Equals(currentElementDisplay)) {
170171
elementStyles.Put(CssConstants.DISPLAY, CssConstants.BLOCK);
171172
}
172173
}

pdfHTML.nuspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata>
44
<id>itext7.pdfhtml</id>
5-
<version>4.0.2</version>
5+
<version>4.0.3</version>
66
<title>iText 7 pdfHTML</title>
77
<authors>iText Software</authors>
88
<owners>iText Software</owners>
@@ -19,10 +19,10 @@
1919
<repository type="git" url="https://github.com/itext/i7n-pdfhtml.git" />
2020
<dependencies>
2121
<group targetFramework="net461">
22-
<dependency id="itext7" version="7.2.2" />
22+
<dependency id="itext7" version="7.2.3" />
2323
</group>
2424
<group targetFramework="netstandard2.0">
25-
<dependency id="itext7" version="7.2.2" />
25+
<dependency id="itext7" version="7.2.3" />
2626
</group>
2727
</dependencies>
2828
</metadata>

port-hash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12343b9837284da254c583d7e8ea63aeea5c4624
1+
dabd0f95b6ce55524fa71022ff05eef9ad1f4aa9

0 commit comments

Comments
 (0)