Skip to content

Commit 34d0ba6

Browse files
committed
[RELEASE] iText 7 pdfOCR 2.0.2
2 parents 951ac4d + 83f1b0e commit 34d0ba6

File tree

111 files changed

+266
-192
lines changed

Some content is hidden

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

111 files changed

+266
-192
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 = "pdfOCR 2.0.1 API"
35+
PROJECT_NAME = "pdfOCR 2.0.2 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.pdfocr.api.tests/Properties/AssemblyInfo.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
[assembly: AssemblyConfiguration("")]
88
[assembly: AssemblyCompany("iText Group NV")]
99
[assembly: AssemblyProduct("iText")]
10-
[assembly: AssemblyCopyright ("Copyright (c) 1998-2021 iText Group NV")]
10+
[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")]
1111
[assembly: AssemblyTrademark("")]
1212
[assembly: AssemblyCulture("")]
1313

1414
[assembly: ComVisible(false)]
1515

1616
[assembly: Guid("d6a6ea97-1f23-448f-b700-eff62971d234")]
1717

18-
[assembly: AssemblyVersion("2.0.1.0")]
19-
[assembly: AssemblyFileVersion("2.0.1.0")]
20-
[assembly: AssemblyInformationalVersion("2.0.1")]
18+
[assembly: AssemblyVersion("2.0.2.0")]
19+
[assembly: AssemblyFileVersion("2.0.2.0")]
20+
[assembly: AssemblyInformationalVersion("2.0.2")]

itext.tests/itext.pdfocr.api.tests/itext.pdfocr.api.tests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<None Include="itext.snk" />
2525
</ItemGroup>
2626
<ItemGroup>
27-
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
28-
<PackageReference Include="itext7.pdftest" Version="7.2.1" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
27+
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
28+
<PackageReference Include="itext7.pdftest" Version="7.2.4" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
2929
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.0" />
3030
<PackageReference Include="NUnit" Version="3.12.0" />
3131
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/ApiTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -37,6 +37,7 @@ You should have received a copy of the GNU Affero General Public License
3737
using iText.Test.Attributes;
3838

3939
namespace iText.Pdfocr {
40+
[NUnit.Framework.Category("Integration test")]
4041
public class ApiTest : ExtendedITextTest {
4142
public static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory
4243
+ "/test/itext/pdfocr";

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/OcrPdfCreatorEventHelperTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -33,6 +33,7 @@ You should have received a copy of the GNU Affero General Public License
3333
using iText.Test;
3434

3535
namespace iText.Pdfocr {
36+
[NUnit.Framework.Category("Unit test")]
3637
public class OcrPdfCreatorEventHelperTest : ExtendedITextTest {
3738
private static readonly ProductData DUMMY_PRODUCT_DATA = new ProductData("test-product", "inner_product",
3839
"1.0.0", 1900, 2100);

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/OcrProcessContextTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -26,6 +26,7 @@ You should have received a copy of the GNU Affero General Public License
2626
using iText.Test;
2727

2828
namespace iText.Pdfocr {
29+
[NUnit.Framework.Category("Unit test")]
2930
public class OcrProcessContextTest : ExtendedITextTest {
3031
[NUnit.Framework.Test]
3132
public virtual void SetOcrEventHelperTest() {

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/PdfA3uTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -36,6 +36,7 @@ You should have received a copy of the GNU Affero General Public License
3636
using iText.Test.Attributes;
3737

3838
namespace iText.Pdfocr {
39+
[NUnit.Framework.Category("Integration test")]
3940
public class PdfA3uTest : ExtendedITextTest {
4041
[NUnit.Framework.Test]
4142
public virtual void TestPdfA3uWithNullIntent() {

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/PdfCreatorUtilTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -31,6 +31,7 @@ You should have received a copy of the GNU Affero General Public License
3131
using iText.Test.Attributes;
3232

3333
namespace iText.Pdfocr {
34+
[NUnit.Framework.Category("Unit test")]
3435
public class PdfCreatorUtilTest : ExtendedITextTest {
3536
[NUnit.Framework.Test]
3637
public virtual void GetImageDataFromValidSinglePagedTiffTest() {

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/PdfFontTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -34,6 +34,7 @@ You should have received a copy of the GNU Affero General Public License
3434
using iText.Test.Attributes;
3535

3636
namespace iText.Pdfocr {
37+
[NUnit.Framework.Category("Integration test")]
3738
public class PdfFontTest : ExtendedITextTest {
3839
[NUnit.Framework.Test]
3940
public virtual void TestFontColor() {
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -29,70 +29,33 @@ You should have received a copy of the GNU Affero General Public License
2929
using iText.Test.Attributes;
3030

3131
namespace iText.Pdfocr {
32+
[NUnit.Framework.Category("Integration test")]
3233
public class PdfInputImageTest : ExtendedITextTest {
3334
[LogMessage(PdfOcrLogMessageConstant.CANNOT_READ_INPUT_IMAGE)]
3435
[NUnit.Framework.Test]
35-
public virtual void TestCorruptedImage() {
36-
NUnit.Framework.Assert.That(() => {
37-
FileInfo file = new FileInfo(PdfHelper.GetImagesTestDirectory() + "corrupted.jpg");
38-
String realOutput = PdfHelper.GetTextFromPdf(file, "testCorruptedImage");
39-
NUnit.Framework.Assert.IsNotNull(realOutput);
40-
NUnit.Framework.Assert.AreEqual("", realOutput);
41-
}
42-
, NUnit.Framework.Throws.InstanceOf<PdfOcrInputException>())
43-
;
36+
public virtual void CorruptedImageTest() {
37+
FileInfo file = new FileInfo(PdfHelper.GetImagesTestDirectory() + "corrupted.jpg");
38+
Exception e = NUnit.Framework.Assert.Catch(typeof(PdfOcrInputException), () => PdfHelper.GetTextFromPdf(file
39+
, "testCorruptedImage"));
40+
NUnit.Framework.Assert.AreEqual(PdfOcrExceptionMessageConstant.CANNOT_READ_INPUT_IMAGE, e.Message);
4441
}
4542

4643
[LogMessage(PdfOcrLogMessageConstant.CANNOT_READ_INPUT_IMAGE)]
4744
[NUnit.Framework.Test]
48-
public virtual void TestCorruptedImageWithoutExtension() {
49-
NUnit.Framework.Assert.That(() => {
50-
FileInfo file = new FileInfo(PdfHelper.GetImagesTestDirectory() + "corrupted");
51-
String realOutput = PdfHelper.GetTextFromPdf(file, "testCorruptedImageWithoutExtension");
52-
NUnit.Framework.Assert.IsNotNull(realOutput);
53-
NUnit.Framework.Assert.AreEqual("", realOutput);
54-
}
55-
, NUnit.Framework.Throws.InstanceOf<PdfOcrInputException>())
56-
;
45+
public virtual void CorruptedImageWithoutExtensionTest() {
46+
FileInfo file = new FileInfo(PdfHelper.GetImagesTestDirectory() + "corrupted");
47+
Exception e = NUnit.Framework.Assert.Catch(typeof(PdfOcrInputException), () => PdfHelper.GetTextFromPdf(file
48+
, "testCorruptedImageWithoutExtension"));
49+
NUnit.Framework.Assert.AreEqual(PdfOcrExceptionMessageConstant.CANNOT_READ_INPUT_IMAGE, e.Message);
5750
}
5851

5952
[LogMessage(PdfOcrLogMessageConstant.CANNOT_READ_INPUT_IMAGE)]
6053
[NUnit.Framework.Test]
61-
public virtual void TestInvalidImagePathWithoutDot() {
62-
NUnit.Framework.Assert.That(() => {
63-
FileInfo file = new FileInfo("testName");
64-
String realOutput = PdfHelper.GetTextFromPdf(file, "testInvalidImagePathWithoutDot");
65-
NUnit.Framework.Assert.IsNotNull(realOutput);
66-
NUnit.Framework.Assert.AreEqual("", realOutput);
67-
}
68-
, NUnit.Framework.Throws.InstanceOf<PdfOcrInputException>())
69-
;
70-
}
71-
72-
[LogMessage(PdfOcrLogMessageConstant.CANNOT_READ_INPUT_IMAGE)]
73-
[NUnit.Framework.Test]
74-
public virtual void TestInvalidImagePathWithDot() {
75-
NUnit.Framework.Assert.That(() => {
76-
FileInfo file = new FileInfo("test.Name");
77-
String realOutput = PdfHelper.GetTextFromPdf(file, "testInvalidImagePathWithDot");
78-
NUnit.Framework.Assert.IsNotNull(realOutput);
79-
NUnit.Framework.Assert.AreEqual("", realOutput);
80-
}
81-
, NUnit.Framework.Throws.InstanceOf<PdfOcrInputException>())
82-
;
83-
}
84-
85-
[LogMessage(PdfOcrLogMessageConstant.CANNOT_READ_INPUT_IMAGE)]
86-
[NUnit.Framework.Test]
87-
public virtual void TestValidImageWithoutExtension() {
88-
NUnit.Framework.Assert.That(() => {
89-
FileInfo file = new FileInfo(PdfHelper.GetImagesTestDirectory() + "numbers_01");
90-
String realOutput = PdfHelper.GetTextFromPdf(file, "testValidImageWithoutExtension");
91-
NUnit.Framework.Assert.IsNotNull(realOutput);
92-
NUnit.Framework.Assert.AreEqual("", realOutput);
93-
}
94-
, NUnit.Framework.Throws.InstanceOf<PdfOcrInputException>())
95-
;
54+
public virtual void InvalidPathWithDotTest() {
55+
FileInfo file = new FileInfo("test.Name");
56+
Exception e = NUnit.Framework.Assert.Catch(typeof(PdfOcrInputException), () => PdfHelper.GetTextFromPdf(file
57+
, "testInvalidPathWithDot"));
58+
NUnit.Framework.Assert.AreEqual(PdfOcrExceptionMessageConstant.CANNOT_READ_INPUT_IMAGE, e.Message);
9659
}
9760
}
9861
}

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/PdfLayersTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -30,6 +30,7 @@ You should have received a copy of the GNU Affero General Public License
3030
using iText.Test;
3131

3232
namespace iText.Pdfocr {
33+
[NUnit.Framework.Category("Integration test")]
3334
public class PdfLayersTest : ExtendedITextTest {
3435
[NUnit.Framework.Test]
3536
public virtual void TestPdfLayersWithDefaultNames() {

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/PdfOcrMetaInfoContainerTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -24,6 +24,7 @@ You should have received a copy of the GNU Affero General Public License
2424
using iText.Test;
2525

2626
namespace iText.Pdfocr {
27+
[NUnit.Framework.Category("Unit test")]
2728
public class PdfOcrMetaInfoContainerTest : ExtendedITextTest {
2829
[NUnit.Framework.Test]
2930
public virtual void Test() {

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/ScaleModeTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -30,6 +30,7 @@ You should have received a copy of the GNU Affero General Public License
3030
using iText.Test;
3131

3232
namespace iText.Pdfocr {
33+
[NUnit.Framework.Category("Integration test")]
3334
public class ScaleModeTest : ExtendedITextTest {
3435
private const float DELTA = 1e-4f;
3536

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/exceptions/PdfOcrExceptionTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -24,6 +24,7 @@ You should have received a copy of the GNU Affero General Public License
2424
using iText.Test;
2525

2626
namespace iText.Pdfocr.Exceptions {
27+
[NUnit.Framework.Category("Integration test")]
2728
public class PdfOcrExceptionTest : ExtendedITextTest {
2829
[NUnit.Framework.Test]
2930
public virtual void OcrExceptionThrowableConstructorTest() {

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/helpers/CustomOcrEngine.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/helpers/CustomProductAwareOcrEngine.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/helpers/ExtractionStrategy.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/helpers/PdfHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/statistics/PdfOcrOutputTypeStatisticsAggregatorTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -27,6 +27,7 @@ You should have received a copy of the GNU Affero General Public License
2727
using iText.Test;
2828

2929
namespace iText.Pdfocr.Statistics {
30+
[NUnit.Framework.Category("Unit test")]
3031
public class PdfOcrOutputTypeStatisticsAggregatorTest : ExtendedITextTest {
3132
private static readonly ProductData DUMMY_PRODUCT_DATA = new ProductData("test-product", "inner_product",
3233
"1.0.0", 1900, 2100);

itext.tests/itext.pdfocr.api.tests/itext/pdfocr/statistics/PdfOcrOutputTypeStatisticsEventTest.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2021 iText Group NV
3+
Copyright (c) 1998-2022 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -27,6 +27,7 @@ You should have received a copy of the GNU Affero General Public License
2727
using iText.Test.Attributes;
2828

2929
namespace iText.Pdfocr.Statistics {
30+
[NUnit.Framework.Category("Unit test")]
3031
public class PdfOcrOutputTypeStatisticsEventTest : ExtendedITextTest {
3132
private static readonly ProductData DUMMY_PRODUCT_DATA = new ProductData("test-product", "inner_product",
3233
"1.0.0", 1900, 2100);

itext.tests/itext.pdfocr.tesseract4.tests/Properties/AssemblyInfo.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
[assembly: AssemblyConfiguration("")]
88
[assembly: AssemblyCompany("iText Group NV")]
99
[assembly: AssemblyProduct("iText")]
10-
[assembly: AssemblyCopyright ("Copyright (c) 1998-2021 iText Group NV")]
10+
[assembly: AssemblyCopyright ("Copyright (c) 1998-2022 iText Group NV")]
1111
[assembly: AssemblyTrademark("")]
1212
[assembly: AssemblyCulture("")]
1313

1414
[assembly: ComVisible(false)]
1515

1616
[assembly: Guid("d6a6ea97-1f23-448f-b700-eff62971d234")]
1717

18-
[assembly: AssemblyVersion("2.0.1.0")]
19-
[assembly: AssemblyFileVersion("2.0.1.0")]
20-
[assembly: AssemblyInformationalVersion("2.0.1")]
18+
[assembly: AssemblyVersion("2.0.2.0")]
19+
[assembly: AssemblyFileVersion("2.0.2.0")]
20+
[assembly: AssemblyInformationalVersion("2.0.2")]

itext.tests/itext.pdfocr.tesseract4.tests/itext.pdfocr.tesseract4.tests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<None Include="itext.snk" />
2626
</ItemGroup>
2727
<ItemGroup>
28-
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
29-
<PackageReference Include="itext7.pdftest" Version="7.2.1" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
28+
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
29+
<PackageReference Include="itext7.pdftest" Version="7.2.4" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.csproj')" />
3030
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.0" />
3131
<PackageReference Include="NUnit" Version="3.12.0" />
3232
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">

0 commit comments

Comments
 (0)