Skip to content

Commit 6ebc934

Browse files
committed
[RELEASE] iText 8.0.1
2 parents 3e6a670 + a5f5416 commit 6ebc934

File tree

932 files changed

+12942
-38775
lines changed

Some content is hidden

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

932 files changed

+12942
-38775
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The **iText Community** source code is hosted on [Github][github], where you can
2323

2424
*We strongly recommend that you use [NuGet][nuget] to add **iText Community** to your project:*
2525

26-
Install-Package itext7
26+
Install-Package itext
2727

2828
You can also [build iText Community from source][building].
2929

@@ -59,7 +59,7 @@ Contact [sales] for more info.
5959
[itext]: https://itextpdf.com/
6060
[github]: https://github.com/itext/itext7-dotnet
6161
[latest]: https://github.com/itext/itext7-dotnet/releases/latest
62-
[nuget]: https://www.nuget.org/packages/itext7
62+
[nuget]: https://www.nuget.org/packages/itext
6363
[sales]: https://itextpdf.com/sales
6464
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
6565
[rups]: https://github.com/itext/i7j-rups

doxyfile

Lines changed: 1 addition & 1 deletion
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 = "iText 8.0.0 API"
35+
PROJECT_NAME = "iText 8.0.1 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

itext7.nuspec renamed to itext.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata>
4-
<id>itext7</id>
5-
<version>8.0.0</version>
4+
<id>itext</id>
5+
<version>8.0.1</version>
66
<title>iText Community</title>
77
<authors>Apryse Software</authors>
88
<owners>Apryse Software</owners>
@@ -19,11 +19,11 @@
1919
<repository type="git" url="https://github.com/itext/itext7-dotnet.git" />
2020
<dependencies>
2121
<group targetFramework="net461">
22-
<dependency id="itext7.commons" version="8.0.0" />
22+
<dependency id="itext.commons" version="8.0.1" />
2323
<dependency id="Microsoft.Extensions.Logging" version="5.0.0" />
2424
</group>
2525
<group targetFramework="netstandard2.0">
26-
<dependency id="itext7.commons" version="8.0.0" />
26+
<dependency id="itext.commons" version="8.0.1" />
2727
<dependency id="Microsoft.Extensions.Logging" version="5.0.0" />
2828
<dependency id="System.Diagnostics.Process" version="4.3.0" />
2929
<dependency id="System.Globalization.Extensions" version="4.3.0" />

itext.tests/itext.barcodes.tests/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
[assembly: Guid("d015a3aa-613c-45d9-b908-7d47c4b613af")]
1616

17-
[assembly: AssemblyVersion("8.0.0.0")]
18-
[assembly: AssemblyFileVersion("8.0.0.0")]
19-
[assembly: AssemblyInformationalVersion("8.0.0")]
17+
[assembly: AssemblyVersion("8.0.1.0")]
18+
[assembly: AssemblyFileVersion("8.0.1.0")]
19+
[assembly: AssemblyInformationalVersion("8.0.1")]
2020

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

itext.tests/itext.commons.tests/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
[assembly: Guid("502eda37-c014-4822-8e5c-4e5d21b085e9")]
1717

18-
[assembly: AssemblyVersion("8.0.0.0")]
19-
[assembly: AssemblyFileVersion("8.0.0.0")]
20-
[assembly: AssemblyInformationalVersion("8.0.0")]
18+
[assembly: AssemblyVersion("8.0.1.0")]
19+
[assembly: AssemblyFileVersion("8.0.1.0")]
20+
[assembly: AssemblyInformationalVersion("8.0.1")]
2121

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

itext.tests/itext.commons.tests/itext/commons/actions/data/CommonsProductDataTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public virtual void GetInstanceTest() {
3333
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_PRODUCT_NAME, commonsProductData.GetProductName
3434
());
3535
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_VERSION, commonsProductData.GetVersion());
36+
NUnit.Framework.Assert.AreEqual(CommonsProductData.MINIMAL_COMPATIBLE_LICENSEKEY_VERSION, commonsProductData
37+
.GetMinCompatibleLicensingModuleVersion());
3638
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_COPYRIGHT_SINCE, commonsProductData.GetSinceCopyrightYear
3739
());
3840
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_COPYRIGHT_TO, commonsProductData.GetToCopyrightYear
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2023 Apryse Group NV
4+
Authors: Apryse Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
using System;
24+
using System.Collections.Generic;
25+
using iText.Test;
26+
27+
namespace iText.Commons.Datastructures {
28+
[NUnit.Framework.Category("UnitTest")]
29+
public class ConcurrentWeakMapTest : ExtendedITextTest {
30+
[NUnit.Framework.Test]
31+
public virtual void SizeTest() {
32+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
33+
map.Put("5", "6");
34+
map.Put("3", "0");
35+
map.Put("6", "2");
36+
NUnit.Framework.Assert.AreEqual("6", map["5"]);
37+
NUnit.Framework.Assert.AreEqual("0", map["3"]);
38+
NUnit.Framework.Assert.AreEqual("2", map["6"]);
39+
}
40+
41+
[NUnit.Framework.Test]
42+
public virtual void ContainsKeyTrueTest() {
43+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
44+
map.Put("5", "6");
45+
NUnit.Framework.Assert.IsTrue(map.ContainsKey("5"));
46+
}
47+
48+
[NUnit.Framework.Test]
49+
public virtual void ContainsKeyFalseTest() {
50+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
51+
map.Put("5", "6");
52+
NUnit.Framework.Assert.IsFalse(map.ContainsKey("6"));
53+
}
54+
55+
[NUnit.Framework.Test]
56+
public virtual void GetTest() {
57+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
58+
map.Put("5", "6");
59+
NUnit.Framework.Assert.AreEqual("6", map.Get("5"));
60+
}
61+
62+
[NUnit.Framework.Test]
63+
public virtual void PutTest() {
64+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
65+
map.Put("5", "6");
66+
NUnit.Framework.Assert.Catch(typeof(ArgumentException), () =>
67+
{
68+
map.Put("5", "10");
69+
});
70+
}
71+
72+
[NUnit.Framework.Test]
73+
public virtual void RemoveTest() {
74+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
75+
map.Put("5", "6");
76+
NUnit.Framework.Assert.AreEqual("6", map.JRemove("5"));
77+
}
78+
79+
[NUnit.Framework.Test]
80+
public virtual void PutAllTest() {
81+
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
82+
map.Put("5", "6");
83+
IDictionary<string, string> anotherMap = new Dictionary<string,string>();
84+
anotherMap.Put("5", "10");
85+
anotherMap.Put("4", "3");
86+
anotherMap.Put("3", "7");
87+
NUnit.Framework.Assert.Catch(typeof(ArgumentException), () =>
88+
{
89+
map.AddAll(anotherMap);
90+
});
91+
}
92+
}
93+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2023 Apryse Group NV
4+
Authors: Apryse Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
using System;
24+
using iText.Test;
25+
26+
namespace iText.Commons.Utils {
27+
[NUnit.Framework.Category("UnitTest")]
28+
public class PlaceHolderTextUtilTest : ExtendedITextTest {
29+
[NUnit.Framework.Test]
30+
public virtual void GetPlaceHolderByCharacterTextSimple() {
31+
int amountOfCharacters = 24;
32+
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.CHARACTERS, amountOfCharacters
33+
);
34+
NUnit.Framework.Assert.AreEqual(amountOfCharacters, result.Length);
35+
NUnit.Framework.Assert.AreEqual(result, "Portable Document Format");
36+
}
37+
38+
[NUnit.Framework.Test]
39+
public virtual void GetPlaceHolderByCharactersTextOverflow() {
40+
int amountOfCharacters = 31222 + 24;
41+
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.CHARACTERS, amountOfCharacters
42+
);
43+
NUnit.Framework.Assert.AreEqual(amountOfCharacters, result.Length);
44+
NUnit.Framework.Assert.IsTrue(result.EndsWith("Portable Document Format"));
45+
}
46+
47+
[NUnit.Framework.Test]
48+
public virtual void GetPlaceHolderByWordsTextSimple() {
49+
int amountOfWords = 5;
50+
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.WORDS, amountOfWords
51+
);
52+
NUnit.Framework.Assert.AreEqual(44, result.Length);
53+
}
54+
55+
[NUnit.Framework.Test]
56+
public virtual void GetPlaceHolderByWordsTextOverflow() {
57+
int amountOfCharacters = 4000;
58+
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.WORDS, amountOfCharacters
59+
);
60+
NUnit.Framework.Assert.AreEqual(25472, result.Length);
61+
}
62+
}
63+
}

itext.tests/itext.forms.tests/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
[assembly: Guid("6fe2f714-6b3e-4b20-8c70-28bfce084ed2")]
1616

17-
[assembly: AssemblyVersion("8.0.0.0")]
18-
[assembly: AssemblyFileVersion("8.0.0.0")]
19-
[assembly: AssemblyInformationalVersion("8.0.0")]
17+
[assembly: AssemblyVersion("8.0.1.0")]
18+
[assembly: AssemblyFileVersion("8.0.1.0")]
19+
[assembly: AssemblyInformationalVersion("8.0.1")]
2020

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

itext.tests/itext.forms.tests/itext/forms/FlatteningRotatedTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public virtual void FormFlatteningTest_DefaultAppearanceGeneration_Rot() {
7676
String cmp = sourceFolder + "cmp_" + inputPdfFileName + ".pdf";
7777
String cmp_flattened = sourceFolder + "cmp_" + inputPdfFileName + "_flattened.pdf";
7878
using (PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest))) {
79-
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
79+
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
8080
foreach (PdfFormField field in form.GetAllFormFields().Values) {
8181
field.SetValue("Long Long Text");
8282
field.GetFirstFormAnnotation().SetBorderWidth(1);
@@ -85,7 +85,7 @@ public virtual void FormFlatteningTest_DefaultAppearanceGeneration_Rot() {
8585
}
8686
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest, cmp, destinationFolder, "diff_"));
8787
using (PdfDocument doc_1 = new PdfDocument(new PdfReader(dest), new PdfWriter(dest_flattened))) {
88-
PdfAcroForm.GetAcroForm(doc_1, true).FlattenFields();
88+
PdfFormCreator.GetAcroForm(doc_1, true).FlattenFields();
8989
}
9090
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest_flattened, cmp_flattened, destinationFolder
9191
, "diff_"));

itext.tests/itext.forms.tests/itext/forms/FlatteningTest.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24+
using iText.Forms.Fields;
2425
using iText.Forms.Logs;
2526
using iText.Kernel.Pdf;
2627
using iText.Kernel.Pdf.Canvas.Parser;
@@ -48,7 +49,7 @@ public virtual void FlatteningFormFieldNoSubtypeInAPTest() {
4849
String dest = destinationFolder + "flatteningFormFieldNoSubtypeInAPTest.pdf";
4950
String cmp = sourceFolder + "cmp_flatteningFormFieldNoSubtypeInAPTest.pdf";
5051
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
51-
PdfAcroForm.GetAcroForm(doc, false).FlattenFields();
52+
PdfFormCreator.GetAcroForm(doc, false).FlattenFields();
5253
doc.Close();
5354
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest, cmp, destinationFolder, "diff_"));
5455
}
@@ -61,7 +62,7 @@ public virtual void FormFlatteningTestWithoutNEntry() {
6162
String dest = destinationFolder + filename + "_flattened.pdf";
6263
String cmp = sourceFolder + "cmp_" + filename + "_flattened.pdf";
6364
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
64-
PdfAcroForm.GetAcroForm(doc, false).FlattenFields();
65+
PdfFormCreator.GetAcroForm(doc, false).FlattenFields();
6566
doc.Close();
6667
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest, cmp, destinationFolder, "diff_"));
6768
}
@@ -73,7 +74,7 @@ public virtual void HiddenFieldsFlatten() {
7374
String src = sourceFolder + filename + ".pdf";
7475
String dest = destinationFolder + filename + "_flattened.pdf";
7576
PdfDocument document = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
76-
PdfAcroForm acroForm = PdfAcroForm.GetAcroForm(document, true);
77+
PdfAcroForm acroForm = PdfFormCreator.GetAcroForm(document, true);
7778
acroForm.GetField("hiddenField").GetPdfObject().Put(PdfName.F, new PdfNumber(2));
7879
acroForm.FlattenFields();
7980
String textAfterFlatten = PdfTextExtractor.GetTextFromPage(document.GetPage(1));

itext.tests/itext.forms.tests/itext/forms/FlatteningWithNullKidElementTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24+
using iText.Forms.Fields;
2425
using iText.Kernel.Pdf;
2526
using iText.Test;
2627

@@ -46,7 +47,7 @@ public virtual void FormFlatteningTestWithNullKidElement() {
4647
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(temp));
4748
bool fail = false;
4849
try {
49-
PdfAcroForm.GetAcroForm(doc, true).FlattenFields();
50+
PdfFormCreator.GetAcroForm(doc, true).FlattenFields();
5051
doc.Close();
5152
}
5253
catch (Exception) {

itext.tests/itext.forms.tests/itext/forms/FormFieldAppendTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public virtual void FormFillingAppend_form_empty_Test() {
4949
StampingProperties props = new StampingProperties();
5050
props.UseAppendMode();
5151
PdfDocument doc = new PdfDocument(new PdfReader(srcFilename), new PdfWriter(temp), props);
52-
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
52+
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
5353
foreach (PdfFormField field in form.GetAllFormFields().Values) {
5454
field.SetValue("Test");
5555
}
@@ -73,7 +73,7 @@ public virtual void FormFillingAppend_form_filled_Test() {
7373
StampingProperties props = new StampingProperties();
7474
props.UseAppendMode();
7575
PdfDocument doc = new PdfDocument(new PdfReader(srcFilename), new PdfWriter(temp), props);
76-
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
76+
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
7777
foreach (PdfFormField field in form.GetAllFormFields().Values) {
7878
field.SetValue("Different");
7979
}
@@ -90,7 +90,7 @@ public virtual void FormFillingAppend_form_filled_Test() {
9090

9191
private void Flatten(String src, String dest) {
9292
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
93-
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
93+
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
9494
form.FlattenFields();
9595
doc.Close();
9696
}

0 commit comments

Comments
 (0)