Skip to content

Commit

Permalink
[RELEASE] iText 8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iText-CI committed Jul 20, 2023
2 parents 3e6a670 + a5f5416 commit 6ebc934
Show file tree
Hide file tree
Showing 932 changed files with 12,942 additions and 38,775 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -23,7 +23,7 @@ The **iText Community** source code is hosted on [Github][github], where you can

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

Install-Package itext7
Install-Package itext

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

Expand Down Expand Up @@ -59,7 +59,7 @@ Contact [sales] for more info.
[itext]: https://itextpdf.com/
[github]: https://github.com/itext/itext7-dotnet
[latest]: https://github.com/itext/itext7-dotnet/releases/latest
[nuget]: https://www.nuget.org/packages/itext7
[nuget]: https://www.nuget.org/packages/itext
[sales]: https://itextpdf.com/sales
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
[rups]: https://github.com/itext/i7j-rups
Expand Down
2 changes: 1 addition & 1 deletion doxyfile
Expand Up @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "iText 8.0.0 API"
PROJECT_NAME = "iText 8.0.1 API"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down
8 changes: 4 additions & 4 deletions itext7.nuspec → itext.nuspec
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>itext7</id>
<version>8.0.0</version>
<id>itext</id>
<version>8.0.1</version>
<title>iText Community</title>
<authors>Apryse Software</authors>
<owners>Apryse Software</owners>
Expand All @@ -19,11 +19,11 @@
<repository type="git" url="https://github.com/itext/itext7-dotnet.git" />
<dependencies>
<group targetFramework="net461">
<dependency id="itext7.commons" version="8.0.0" />
<dependency id="itext.commons" version="8.0.1" />
<dependency id="Microsoft.Extensions.Logging" version="5.0.0" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="itext7.commons" version="8.0.0" />
<dependency id="itext.commons" version="8.0.1" />
<dependency id="Microsoft.Extensions.Logging" version="5.0.0" />
<dependency id="System.Diagnostics.Process" version="4.3.0" />
<dependency id="System.Globalization.Extensions" version="4.3.0" />
Expand Down
6 changes: 3 additions & 3 deletions itext.tests/itext.barcodes.tests/Properties/AssemblyInfo.cs
Expand Up @@ -14,9 +14,9 @@

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

[assembly: AssemblyVersion("8.0.0.0")]
[assembly: AssemblyFileVersion("8.0.0.0")]
[assembly: AssemblyInformationalVersion("8.0.0")]
[assembly: AssemblyVersion("8.0.1.0")]
[assembly: AssemblyFileVersion("8.0.1.0")]
[assembly: AssemblyInformationalVersion("8.0.1")]

#if !NETSTANDARD2_0
[assembly: NUnit.Framework.Timeout(300000)]
Expand Down
6 changes: 3 additions & 3 deletions itext.tests/itext.commons.tests/Properties/AssemblyInfo.cs
Expand Up @@ -15,9 +15,9 @@

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

[assembly: AssemblyVersion("8.0.0.0")]
[assembly: AssemblyFileVersion("8.0.0.0")]
[assembly: AssemblyInformationalVersion("8.0.0")]
[assembly: AssemblyVersion("8.0.1.0")]
[assembly: AssemblyFileVersion("8.0.1.0")]
[assembly: AssemblyInformationalVersion("8.0.1")]

#if !NETSTANDARD2_0
[assembly: NUnit.Framework.Timeout(300000)]
Expand Down
Expand Up @@ -33,6 +33,8 @@ public class CommonsProductDataTest : ExtendedITextTest {
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_PRODUCT_NAME, commonsProductData.GetProductName
());
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_VERSION, commonsProductData.GetVersion());
NUnit.Framework.Assert.AreEqual(CommonsProductData.MINIMAL_COMPATIBLE_LICENSEKEY_VERSION, commonsProductData
.GetMinCompatibleLicensingModuleVersion());
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_COPYRIGHT_SINCE, commonsProductData.GetSinceCopyrightYear
());
NUnit.Framework.Assert.AreEqual(CommonsProductData.COMMONS_COPYRIGHT_TO, commonsProductData.GetToCopyrightYear
Expand Down
@@ -0,0 +1,93 @@
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2023 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 <https://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using iText.Test;

namespace iText.Commons.Datastructures {
[NUnit.Framework.Category("UnitTest")]
public class ConcurrentWeakMapTest : ExtendedITextTest {
[NUnit.Framework.Test]
public virtual void SizeTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
map.Put("3", "0");
map.Put("6", "2");
NUnit.Framework.Assert.AreEqual("6", map["5"]);
NUnit.Framework.Assert.AreEqual("0", map["3"]);
NUnit.Framework.Assert.AreEqual("2", map["6"]);
}

[NUnit.Framework.Test]
public virtual void ContainsKeyTrueTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
NUnit.Framework.Assert.IsTrue(map.ContainsKey("5"));
}

[NUnit.Framework.Test]
public virtual void ContainsKeyFalseTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
NUnit.Framework.Assert.IsFalse(map.ContainsKey("6"));
}

[NUnit.Framework.Test]
public virtual void GetTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
NUnit.Framework.Assert.AreEqual("6", map.Get("5"));
}

[NUnit.Framework.Test]
public virtual void PutTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
NUnit.Framework.Assert.Catch(typeof(ArgumentException), () =>
{
map.Put("5", "10");
});
}

[NUnit.Framework.Test]
public virtual void RemoveTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
NUnit.Framework.Assert.AreEqual("6", map.JRemove("5"));
}

[NUnit.Framework.Test]
public virtual void PutAllTest() {
ConcurrentWeakMap<string, string> map = new ConcurrentWeakMap<string, string>();
map.Put("5", "6");
IDictionary<string, string> anotherMap = new Dictionary<string,string>();
anotherMap.Put("5", "10");
anotherMap.Put("4", "3");
anotherMap.Put("3", "7");
NUnit.Framework.Assert.Catch(typeof(ArgumentException), () =>
{
map.AddAll(anotherMap);
});
}
}
}
@@ -0,0 +1,63 @@
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2023 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 <https://www.gnu.org/licenses/>.
*/
using System;
using iText.Test;

namespace iText.Commons.Utils {
[NUnit.Framework.Category("UnitTest")]
public class PlaceHolderTextUtilTest : ExtendedITextTest {
[NUnit.Framework.Test]
public virtual void GetPlaceHolderByCharacterTextSimple() {
int amountOfCharacters = 24;
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.CHARACTERS, amountOfCharacters
);
NUnit.Framework.Assert.AreEqual(amountOfCharacters, result.Length);
NUnit.Framework.Assert.AreEqual(result, "Portable Document Format");
}

[NUnit.Framework.Test]
public virtual void GetPlaceHolderByCharactersTextOverflow() {
int amountOfCharacters = 31222 + 24;
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.CHARACTERS, amountOfCharacters
);
NUnit.Framework.Assert.AreEqual(amountOfCharacters, result.Length);
NUnit.Framework.Assert.IsTrue(result.EndsWith("Portable Document Format"));
}

[NUnit.Framework.Test]
public virtual void GetPlaceHolderByWordsTextSimple() {
int amountOfWords = 5;
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.WORDS, amountOfWords
);
NUnit.Framework.Assert.AreEqual(44, result.Length);
}

[NUnit.Framework.Test]
public virtual void GetPlaceHolderByWordsTextOverflow() {
int amountOfCharacters = 4000;
String result = PlaceHolderTextUtil.GetPlaceHolderText(PlaceHolderTextUtil.PlaceHolderTextBy.WORDS, amountOfCharacters
);
NUnit.Framework.Assert.AreEqual(25472, result.Length);
}
}
}
6 changes: 3 additions & 3 deletions itext.tests/itext.forms.tests/Properties/AssemblyInfo.cs
Expand Up @@ -14,9 +14,9 @@

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

[assembly: AssemblyVersion("8.0.0.0")]
[assembly: AssemblyFileVersion("8.0.0.0")]
[assembly: AssemblyInformationalVersion("8.0.0")]
[assembly: AssemblyVersion("8.0.1.0")]
[assembly: AssemblyFileVersion("8.0.1.0")]
[assembly: AssemblyInformationalVersion("8.0.1")]

#if !NETSTANDARD2_0
[assembly: NUnit.Framework.Timeout(300000)]
Expand Down
Expand Up @@ -76,7 +76,7 @@ public FlatteningRotatedTest(Object[] array)
String cmp = sourceFolder + "cmp_" + inputPdfFileName + ".pdf";
String cmp_flattened = sourceFolder + "cmp_" + inputPdfFileName + "_flattened.pdf";
using (PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest))) {
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
foreach (PdfFormField field in form.GetAllFormFields().Values) {
field.SetValue("Long Long Text");
field.GetFirstFormAnnotation().SetBorderWidth(1);
Expand All @@ -85,7 +85,7 @@ public FlatteningRotatedTest(Object[] array)
}
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest, cmp, destinationFolder, "diff_"));
using (PdfDocument doc_1 = new PdfDocument(new PdfReader(dest), new PdfWriter(dest_flattened))) {
PdfAcroForm.GetAcroForm(doc_1, true).FlattenFields();
PdfFormCreator.GetAcroForm(doc_1, true).FlattenFields();
}
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest_flattened, cmp_flattened, destinationFolder
, "diff_"));
Expand Down
7 changes: 4 additions & 3 deletions itext.tests/itext.forms.tests/itext/forms/FlatteningTest.cs
Expand Up @@ -21,6 +21,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using iText.Forms.Fields;
using iText.Forms.Logs;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas.Parser;
Expand Down Expand Up @@ -48,7 +49,7 @@ public class FlatteningTest : ExtendedITextTest {
String dest = destinationFolder + "flatteningFormFieldNoSubtypeInAPTest.pdf";
String cmp = sourceFolder + "cmp_flatteningFormFieldNoSubtypeInAPTest.pdf";
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
PdfAcroForm.GetAcroForm(doc, false).FlattenFields();
PdfFormCreator.GetAcroForm(doc, false).FlattenFields();
doc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest, cmp, destinationFolder, "diff_"));
}
Expand All @@ -61,7 +62,7 @@ public class FlatteningTest : ExtendedITextTest {
String dest = destinationFolder + filename + "_flattened.pdf";
String cmp = sourceFolder + "cmp_" + filename + "_flattened.pdf";
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
PdfAcroForm.GetAcroForm(doc, false).FlattenFields();
PdfFormCreator.GetAcroForm(doc, false).FlattenFields();
doc.Close();
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(dest, cmp, destinationFolder, "diff_"));
}
Expand All @@ -73,7 +74,7 @@ public class FlatteningTest : ExtendedITextTest {
String src = sourceFolder + filename + ".pdf";
String dest = destinationFolder + filename + "_flattened.pdf";
PdfDocument document = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
PdfAcroForm acroForm = PdfAcroForm.GetAcroForm(document, true);
PdfAcroForm acroForm = PdfFormCreator.GetAcroForm(document, true);
acroForm.GetField("hiddenField").GetPdfObject().Put(PdfName.F, new PdfNumber(2));
acroForm.FlattenFields();
String textAfterFlatten = PdfTextExtractor.GetTextFromPage(document.GetPage(1));
Expand Down
Expand Up @@ -21,6 +21,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using iText.Forms.Fields;
using iText.Kernel.Pdf;
using iText.Test;

Expand All @@ -46,7 +47,7 @@ public class FlatteningWithNullKidElementTest : ExtendedITextTest {
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(temp));
bool fail = false;
try {
PdfAcroForm.GetAcroForm(doc, true).FlattenFields();
PdfFormCreator.GetAcroForm(doc, true).FlattenFields();
doc.Close();
}
catch (Exception) {
Expand Down
Expand Up @@ -49,7 +49,7 @@ public class FormFieldAppendTest : ExtendedITextTest {
StampingProperties props = new StampingProperties();
props.UseAppendMode();
PdfDocument doc = new PdfDocument(new PdfReader(srcFilename), new PdfWriter(temp), props);
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
foreach (PdfFormField field in form.GetAllFormFields().Values) {
field.SetValue("Test");
}
Expand All @@ -73,7 +73,7 @@ public class FormFieldAppendTest : ExtendedITextTest {
StampingProperties props = new StampingProperties();
props.UseAppendMode();
PdfDocument doc = new PdfDocument(new PdfReader(srcFilename), new PdfWriter(temp), props);
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
foreach (PdfFormField field in form.GetAllFormFields().Values) {
field.SetValue("Different");
}
Expand All @@ -90,7 +90,7 @@ public class FormFieldAppendTest : ExtendedITextTest {

private void Flatten(String src, String dest) {
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
PdfAcroForm form = PdfAcroForm.GetAcroForm(doc, true);
PdfAcroForm form = PdfFormCreator.GetAcroForm(doc, true);
form.FlattenFields();
doc.Close();
}
Expand Down

0 comments on commit 6ebc934

Please sign in to comment.