Skip to content

Commit a793fa9

Browse files
committed
[RELEASE] iText pdfHtml 5.0.5
2 parents 21ea8f9 + 418b88a commit a793fa9

File tree

1,365 files changed

+28227
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,365 files changed

+28227
-238
lines changed

doxyfile

+2-2
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 5.0.4 API"
35+
PROJECT_NAME = "pdfHTML 5.0.5 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
@@ -485,7 +485,7 @@ EXTRACT_PRIV_VIRTUAL = NO
485485
# scope will be included in the documentation.
486486
# The default value is: NO.
487487

488-
EXTRACT_PACKAGE = NO
488+
EXTRACT_PACKAGE = YES
489489

490490
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
491491
# included in the documentation.

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("5.0.4.0")]
19-
[assembly: AssemblyFileVersion("5.0.4.0")]
20-
[assembly: AssemblyInformationalVersion("5.0.4")]
18+
[assembly: AssemblyVersion("5.0.5.0")]
19+
[assembly: AssemblyFileVersion("5.0.5.0")]
20+
[assembly: AssemblyInformationalVersion("5.0.5")]
2121

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

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@
4444
</ItemGroup>
4545
<ItemGroup>
4646
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
47-
<PackageReference Include="itext" Version="8.0.4" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
47+
<PackageReference Include="itext" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.csproj')" />
4848
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.csproj')" />
4949
<ProjectReference Include="..\..\..\itextcore\itext\itext.layout\itext.layout.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.layout\itext.layout.csproj')" />
5050
<ProjectReference Include="..\..\..\itextcore\itext\itext.forms\itext.forms.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.forms\itext.forms.csproj')" />
5151
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdfa\itext.pdfa.csproj')" />
5252
<ProjectReference Include="..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
53-
<PackageReference Include="itext.hyph" Version="8.0.4" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
53+
<PackageReference Include="itext.hyph" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.hyph\itext.hyph.csproj')" />
5454
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
55-
<PackageReference Include="itext.pdftest" Version="8.0.4" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
55+
<PackageReference Include="itext.pdftest" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
5656
<ProjectReference Include="..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
57-
<PackageReference Include="itext.bouncy-castle-adapter" Version="8.0.4" Condition="!Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
57+
<PackageReference Include="itext.bouncy-castle-adapter" Version="8.0.5" Condition="!Exists('..\..\..\itextcore\itext\itext.bouncy-castle-adapter\itext.bouncy-castle-adapter.csproj')" />
5858
<ProjectReference Include="..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.styledxmlparser\itext.styledxmlparser.csproj')" />
5959
<ProjectReference Include="..\..\..\itextcore\itext\itext.svg\itext.svg.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.svg\itext.svg.csproj')" />
6060
<ProjectReference Include="..\..\itext\itext.html2pdf\itext.html2pdf.csproj" />

itext.tests/itext.html2pdf.tests/itext/html2pdf/HtmlConverterMetaInfoTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace iText.Html2pdf {
4040
public class HtmlConverterMetaInfoTest : ExtendedITextTest {
4141
[NUnit.Framework.Test]
4242
public virtual void MetaInfoShouldBePresentTest() {
43-
IMetaInfo o = new _IMetaInfo_56();
43+
IMetaInfo o = new _IMetaInfo_55();
4444
ConverterProperties converterProperties = new ConverterProperties();
4545
converterProperties.SetEventMetaInfo(o);
4646
HtmlConverterMetaInfoTest.InvocationAssert invocationAssert = new HtmlConverterMetaInfoTest.InvocationAssert
@@ -54,8 +54,8 @@ public virtual void MetaInfoShouldBePresentTest() {
5454
NUnit.Framework.Assert.IsTrue(invocationAssert.IsInvoked());
5555
}
5656

57-
private sealed class _IMetaInfo_56 : IMetaInfo {
58-
public _IMetaInfo_56() {
57+
private sealed class _IMetaInfo_55 : IMetaInfo {
58+
public _IMetaInfo_55() {
5959
}
6060
}
6161

itext.tests/itext.html2pdf.tests/itext/html2pdf/HtmlConverterPdfAParameterizedTest.cs

+3-24
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,23 @@ You should have received a copy of the GNU Affero General Public License
2323
using System;
2424
using System.Collections.Generic;
2525
using System.IO;
26-
using System.Linq;
2726
using iText.Commons.Utils;
2827
using iText.Kernel.Pdf;
2928

3029
namespace iText.Html2pdf {
3130
[NUnit.Framework.Category("IntegrationTest")]
32-
[NUnit.Framework.TestFixtureSource("RotationRelatedPropertiesTestFixtureData")]
3331
public class HtmlConverterPdfAParameterizedTest : ExtendedHtmlConversionITextTest {
3432
public static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
3533
.CurrentContext.TestDirectory) + "/resources/itext/html2pdf/HtmlConverterPdfAParameterizedTest/";
3634

3735
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
3836
+ "/test/itext/html2pdf/HtmlConverterPdfAParameterizedTest/";
3937

40-
private readonly String htmlName;
41-
42-
private readonly String testName;
43-
44-
private readonly PdfAConformanceLevel conformanceLevel;
45-
4638
[NUnit.Framework.OneTimeSetUp]
4739
public static void BeforeClass() {
4840
CreateDestinationFolder(DESTINATION_FOLDER);
4941
}
5042

51-
public HtmlConverterPdfAParameterizedTest(Object htmlName, Object testName, Object conformance) {
52-
this.conformanceLevel = (PdfAConformanceLevel)conformance;
53-
this.htmlName = (String)htmlName;
54-
this.testName = (String)testName;
55-
}
56-
57-
public HtmlConverterPdfAParameterizedTest(Object[] array)
58-
: this(array[0], array[1], array[2]) {
59-
}
60-
6143
// TODO DEVSIX-2449 z-index is not supported (zindex.html)
6244
public static IEnumerable<Object[]> RotationRelatedProperties() {
6345
return JavaUtil.ArraysAsList(new Object[][] { new Object[] { "images.html", "pdfA4BasicImageTest", PdfAConformanceLevel
@@ -105,12 +87,9 @@ public static IEnumerable<Object[]> RotationRelatedProperties() {
10587
}, new Object[] { "zIndex.html", "pdfA1ZIndexTest", PdfAConformanceLevel.PDF_A_1B } });
10688
}
10789

108-
public static ICollection<NUnit.Framework.TestFixtureData> RotationRelatedPropertiesTestFixtureData() {
109-
return RotationRelatedProperties().Select(array => new NUnit.Framework.TestFixtureData(array)).ToList();
110-
}
111-
112-
[NUnit.Framework.Test]
113-
public virtual void ConvertToPdfA4Test() {
90+
[NUnit.Framework.TestCaseSource("RotationRelatedProperties")]
91+
public virtual void ConvertToPdfA4Test(Object htmlName, Object testName, PdfAConformanceLevel conformanceLevel
92+
) {
11493
String sourceHtml = SOURCE_FOLDER + htmlName;
11594
String destinationPdf = DESTINATION_FOLDER + testName + ".pdf";
11695
String cmpPdf = SOURCE_FOLDER + "cmp_" + testName + ".pdf";

itext.tests/itext.html2pdf.tests/itext/html2pdf/HtmlConverterTest.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ public virtual void ConvertToPdfASimpleTest() {
7878

7979
[NUnit.Framework.Test]
8080
public virtual void CannotConvertHtmlToDocumentInReadingModeTest() {
81-
NUnit.Framework.Assert.That(() => {
81+
Exception exception = NUnit.Framework.Assert.Catch(typeof(Html2PdfException), () => {
8282
PdfDocument pdfDocument = CreateTempDoc();
8383
ConverterProperties properties = new ConverterProperties();
8484
Document document = HtmlConverter.ConvertToDocument("", pdfDocument, properties);
8585
}
86-
, NUnit.Framework.Throws.InstanceOf<Html2PdfException>().With.Message.EqualTo(Html2PdfException.PDF_DOCUMENT_SHOULD_BE_IN_WRITING_MODE))
87-
;
86+
);
87+
NUnit.Framework.Assert.AreEqual(Html2PdfException.PDF_DOCUMENT_SHOULD_BE_IN_WRITING_MODE, exception.Message
88+
);
8889
}
8990

9091
[NUnit.Framework.Test]

itext.tests/itext.html2pdf.tests/itext/html2pdf/ProcessorContextTest.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public static void BeforeClass() {
4949

5050
[NUnit.Framework.Test]
5151
public virtual void DoNotResetFontProviderTest() {
52-
NUnit.Framework.Assert.That(() => {
52+
NUnit.Framework.Assert.Catch(typeof(PdfException), () => {
5353
FileStream fileInputStream = new FileStream(sourceFolder + "justHelloWorld.html", FileMode.Open, FileAccess.Read
5454
);
5555
IXmlParser parser = new JsoupHtmlParser();
5656
IDocumentNode documentNode = parser.Parse(fileInputStream, null);
5757
ConverterProperties converterProperties = new ConverterProperties();
58-
converterProperties.SetFontProvider(new _DefaultFontProvider_71(false, true, false));
58+
converterProperties.SetFontProvider(new _DefaultFontProvider_66(false, true, false));
5959
// Do nothing here. That should result in an exception.
6060
IHtmlProcessor processor = new DefaultHtmlProcessor(converterProperties);
6161
Document doc1 = processor.ProcessDocument(documentNode, new PdfDocument(new PdfWriter(new MemoryStream()))
@@ -67,12 +67,11 @@ public virtual void DoNotResetFontProviderTest() {
6767
NUnit.Framework.Assert.IsTrue(false, "The test should have failed before that assert, since it's strictly forbidden not to reset the FontProvider instance after each html to pdf conversion."
6868
);
6969
}
70-
, NUnit.Framework.Throws.InstanceOf<PdfException>())
71-
;
70+
);
7271
}
7372

74-
private sealed class _DefaultFontProvider_71 : DefaultFontProvider {
75-
public _DefaultFontProvider_71(bool baseArg1, bool baseArg2, bool baseArg3)
73+
private sealed class _DefaultFontProvider_66 : DefaultFontProvider {
74+
public _DefaultFontProvider_66(bool baseArg1, bool baseArg2, bool baseArg3)
7675
: base(baseArg1, baseArg2, baseArg3) {
7776
}
7877

itext.tests/itext.html2pdf.tests/itext/html2pdf/attach/impl/DefaultTagWorkerFactoryTest.cs

+4
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ public virtual void CannotGetTagWorkerForCustomTagViaReflection() {
4040
}
4141
}
4242

43+
//\cond DO_NOT_DOCUMENT
4344
internal class TestTagWorkerFactory : DefaultTagWorkerFactory {
4445
public TestTagWorkerFactory() {
4546
GetDefaultMapping().PutMapping("custom-tag", (lhs, rhs) => new TestClass());
4647
}
4748
}
49+
//\endcond
4850

51+
//\cond DO_NOT_DOCUMENT
4952
internal class TestClass : ITagWorker {
5053
public virtual void ProcessEnd(IElementNode element, ProcessorContext context) {
5154
}
@@ -62,4 +65,5 @@ public virtual IPropertyContainer GetElementResult() {
6265
return null;
6366
}
6467
}
68+
//\endcond
6569
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/attach/impl/layout/PageCountRendererTest.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ public class PageCountRendererTest : ExtendedITextTest {
3333
[NUnit.Framework.Test]
3434
[LogMessage(iText.IO.Logs.IoLogMessageConstant.GET_NEXT_RENDERER_SHOULD_BE_OVERRIDDEN)]
3535
public virtual void GetNextRendererShouldBeOverriddenTest() {
36-
PageCountRenderer pageCountRenderer = new _PageCountRenderer_50(new PageCountElement());
36+
PageCountRenderer pageCountRenderer = new _PageCountRenderer_49(new PageCountElement());
3737
// Nothing is overridden
3838
NUnit.Framework.Assert.AreEqual(typeof(PageCountRenderer), pageCountRenderer.GetNextRenderer().GetType());
3939
}
4040

41-
private sealed class _PageCountRenderer_50 : PageCountRenderer {
42-
public _PageCountRenderer_50(PageCountElement baseArg1)
41+
private sealed class _PageCountRenderer_49 : PageCountRenderer {
42+
public _PageCountRenderer_49(PageCountElement baseArg1)
4343
: base(baseArg1) {
4444
}
4545
}
@@ -55,6 +55,7 @@ public virtual void CreateCopyShouldBeOverriddenTest() {
5555
NUnit.Framework.Assert.IsTrue(true);
5656
}
5757

58+
//\cond DO_NOT_DOCUMENT
5859
internal class CustomPageCountRenderer : PageCountRenderer {
5960
public CustomPageCountRenderer(PageCountElement textElement)
6061
: base(textElement) {
@@ -74,5 +75,6 @@ public override IRenderer GetNextRenderer() {
7475
return new PageCountRendererTest.CustomPageCountRenderer((PageCountElement)this.modelElement);
7576
}
7677
}
78+
//\endcond
7779
}
7880
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/attach/impl/layout/PageTargetCountRendererTest.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public class PageTargetCountRendererTest : ExtendedITextTest {
3333
[NUnit.Framework.Test]
3434
[LogMessage(iText.IO.Logs.IoLogMessageConstant.GET_NEXT_RENDERER_SHOULD_BE_OVERRIDDEN)]
3535
public virtual void GetNextRendererShouldBeOverriddenTest() {
36-
PageTargetCountRenderer pageTargetCountRenderer = new _PageTargetCountRenderer_51(new PageTargetCountElement
36+
PageTargetCountRenderer pageTargetCountRenderer = new _PageTargetCountRenderer_50(new PageTargetCountElement
3737
("test"));
3838
// Nothing is overridden
3939
NUnit.Framework.Assert.AreEqual(typeof(PageTargetCountRenderer), pageTargetCountRenderer.GetNextRenderer()
4040
.GetType());
4141
}
4242

43-
private sealed class _PageTargetCountRenderer_51 : PageTargetCountRenderer {
44-
public _PageTargetCountRenderer_51(PageTargetCountElement baseArg1)
43+
private sealed class _PageTargetCountRenderer_50 : PageTargetCountRenderer {
44+
public _PageTargetCountRenderer_50(PageTargetCountElement baseArg1)
4545
: base(baseArg1) {
4646
}
4747
}
@@ -57,6 +57,7 @@ public virtual void CreateCopyShouldBeOverriddenTest() {
5757
NUnit.Framework.Assert.IsTrue(true);
5858
}
5959

60+
//\cond DO_NOT_DOCUMENT
6061
internal class CustomPageTargetCountRenderer : PageTargetCountRenderer {
6162
public CustomPageTargetCountRenderer(PageTargetCountElement textElement)
6263
: base(textElement) {
@@ -77,5 +78,6 @@ public override IRenderer GetNextRenderer() {
7778
);
7879
}
7980
}
81+
//\endcond
8082
}
8183
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/attach/impl/layout/WidthDimensionContainerTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ public virtual void MinFixContentDimensionTest() {
3535
INode iNode = null;
3636
IDictionary<String, String> styles = new Dictionary<String, String>();
3737
styles.Put("width", "20pt");
38-
CssContextNode cssContextNode = new _CssContextNode_46(iNode);
38+
CssContextNode cssContextNode = new _CssContextNode_45(iNode);
3939
cssContextNode.SetStyles(styles);
4040
Paragraph paragraph = new Paragraph("Paragraph");
4141
WidthDimensionContainer widthDimensionContainer = new WidthDimensionContainer(cssContextNode, 500, paragraph
4242
.CreateRendererSubTree(), 0);
4343
NUnit.Framework.Assert.AreEqual(widthDimensionContainer.minContentDimension, 20, 0.0);
4444
}
4545

46-
private sealed class _CssContextNode_46 : CssContextNode {
47-
public _CssContextNode_46(INode baseArg1)
46+
private sealed class _CssContextNode_45 : CssContextNode {
47+
public _CssContextNode_45(INode baseArg1)
4848
: base(baseArg1) {
4949
}
5050

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/FontFaceTest.cs

+6
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ public virtual void UnusedFontWithUnicodeRangeTest() {
311311
RunTest("unusedFontWithUnicodeRangeTest");
312312
}
313313

314+
[NUnit.Framework.Test]
315+
public virtual void BolderAndLighterFontWeightTest() {
316+
//TODO DEVSIX-2114: Support bolder / Lighter font weight
317+
RunTest("bolderLighterFontWeightTest");
318+
}
319+
314320
private void RunTest(String name, FontProvider fontProvider) {
315321
String htmlPath = sourceFolder + name + ".html";
316322
String pdfPath = destinationFolder + name + ".pdf";

0 commit comments

Comments
 (0)