Skip to content

Commit

Permalink
[RELEASE] iText 9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iText-CI committed Oct 11, 2024
2 parents b1f539d + 5e6f04c commit 99dacf9
Show file tree
Hide file tree
Showing 1,567 changed files with 30,168 additions and 23,256 deletions.
17 changes: 16 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

# Building and testing **iText Community**

To build **iText Community**, you need to build `itextsharp/itextcore/iTextCore.sln`.
To run tests, [Ghostscript][1] and [Imagemagick][2] must be installed.
Some of the tests compare generated PDF files with template files that show the correct results, and these tools are used to
Expand All @@ -14,5 +17,17 @@ environment variables. Examples of paths on Windows:
If you have a new version of ImageMagick, then there is no compare.exe utility there, wrap the path to magick.exe in quotes and call compare command:
ITEXT_MAGICK_COMPARE_EXEC=`"C:\Program Files\ImageMagick-7.0.9-Q16\magick.exe" compare`


# Deploying iText

When using **iText Community** in a project and want to deploy it you have to consider a few things for different deployments.

- **FrameworkDependend**: No additional parameters are required.
- **SelfContained**: No additional parameters are required.
- **PublishSingleFile**: When using `-p:PublishSingleFile=true` you will also need to add `-p:IncludeAllContentForSelfExtract=true`. This is important when using `hyph` or `font-asian` modules.
- **AssemblyTrimming**: Using `-p:PublishTrimmed=true` is currently not supported.



[1]: https://www.ghostscript.com/
[2]: https://www.imagemagick.org/
[2]: https://www.imagemagick.org/
120 changes: 65 additions & 55 deletions README.md

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# iText Security Policy

## Reporting a Vulnerability

We are committed to maintaining the security of our software. If you discover a security vulnerability, we encourage you to report it to us as soon as possible.

To report a vulnerability, please visit our [Vulnerability Reporting Page](https://itextpdf.com/report-vulnerability), or email [[email protected]]([email protected]). If you do not receive a response in 2 business days, please follow up as we may not have received your message.

We follow the procedure of Coordinated Vulnerability Disclosure (CVD) and, to protect the ecosystem, we request that those reporting do the same. Please visit the above page for more information, and follow the steps below to ensure that your report is handled promptly and appropriately:

1. **Do not disclose the vulnerability publicly** until we have had a chance to address it.
2. **Provide a detailed description** of the vulnerability, including steps to reproduce it, if possible.
3. **Include any relevant information** such as the version of iText Core you are using, your operating system, and any other pertinent details.

## Security Updates and Patches

When a vulnerability is reported, we will:

1. **Investigate and verify** the vulnerability.
2. **Develop and test** a fix for the vulnerability.
3. **Release a patch** as soon as possible.


## Known Vulnerabilities

The iText Knowledge Base has a page for known [Common Vulnerabilities and Exposures](https://kb.itextpdf.com/itext/cves) (CVEs), please check it to ensure your vulnerability has not already been disclosed or addressed.

## Supported product lines

See [Compatibility Matrix](https://kb.itextpdf.com/itext/compatibility-matrix)

## Security Best Practices

To help ensure the security of your applications using iText Core, we recommend the following best practices:

1. **Keep iText Core up to date** by regularly checking for and applying updates.
2. **Review and follow** our security guidelines for secure usage.
3. **Monitor your applications** for any unusual activity and investigate any anomalies promptly.

Thank you for helping us keep iText secure!
2 changes: 1 addition & 1 deletion doxyfile
Original file line number Diff line number Diff line change
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.5 API"
PROJECT_NAME = "iText 9.0.0 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
6 changes: 3 additions & 3 deletions itext.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>itext</id>
<version>8.0.5</version>
<version>9.0.0</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="itext.commons" version="8.0.5" />
<dependency id="itext.commons" version="9.0.0" />
<dependency id="Microsoft.Extensions.Logging" version="5.0.0" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="itext.commons" version="8.0.5" />
<dependency id="itext.commons" version="9.0.0" />
<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
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

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

[assembly: AssemblyVersion("8.0.5.0")]
[assembly: AssemblyFileVersion("8.0.5.0")]
[assembly: AssemblyInformationalVersion("8.0.5")]
[assembly: AssemblyVersion("9.0.0.0")]
[assembly: AssemblyFileVersion("9.0.0.0")]
[assembly: AssemblyInformationalVersion("9.0.0")]

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

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

[assembly: AssemblyVersion("8.0.5.0")]
[assembly: AssemblyFileVersion("8.0.5.0")]
[assembly: AssemblyInformationalVersion("8.0.5")]
[assembly: AssemblyVersion("9.0.0.0")]
[assembly: AssemblyFileVersion("9.0.0.0")]
[assembly: AssemblyInformationalVersion("9.0.0")]

#if !NETSTANDARD2_0
[assembly: NUnit.Framework.Timeout(300000)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ namespace iText.Commons.Actions {
public class AbstractProductITextEventTest : ExtendedITextTest {
[NUnit.Framework.Test]
public virtual void NullProductDataTest() {
Exception exception = NUnit.Framework.Assert.Catch(typeof(InvalidOperationException), () => new _AbstractProductITextEvent_36
Exception exception = NUnit.Framework.Assert.Catch(typeof(InvalidOperationException), () => new _AbstractProductITextEvent_35
(null));
NUnit.Framework.Assert.AreEqual("ProductData shouldn't be null.", exception.Message);
}

private sealed class _AbstractProductITextEvent_36 : AbstractProductITextEvent {
public _AbstractProductITextEvent_36(ProductData baseArg1)
private sealed class _AbstractProductITextEvent_35 : AbstractProductITextEvent {
public _AbstractProductITextEvent_35(ProductData baseArg1)
: base(baseArg1) {
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2024 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.Commons.Datastructures;
using iText.Test;

namespace iText.Commons.Datastructures.Portable {
[NUnit.Framework.Category("UnitTest")]
public class NullUnlimitedListTest : ExtendedITextTest {
[NUnit.Framework.Test]
public virtual void NullUnlimitedListAddTest() {
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
list.Add("hey");
list.Add("bye");
NUnit.Framework.Assert.AreEqual(2, list.Size());
list.Add(-1, "hello");
list.Add(3, "goodbye");
NUnit.Framework.Assert.AreEqual(2, list.Size());
}

[NUnit.Framework.Test]
public virtual void NullUnlimitedListIndexOfTest() {
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
list.Add("hey");
list.Add(null);
list.Add("bye");
list.Add(null);
NUnit.Framework.Assert.AreEqual(4, list.Size());
NUnit.Framework.Assert.AreEqual(1, list.IndexOf(null));
}

[NUnit.Framework.Test]
public virtual void NullUnlimitedListRemoveTest() {
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
list.Add("hey");
list.Add("bye");
NUnit.Framework.Assert.AreEqual(2, list.Size());
list.Remove(-1);
list.Remove(2);
NUnit.Framework.Assert.AreEqual(2, list.Size());
}

[NUnit.Framework.Test]
public virtual void TestIsEmpty() {
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
NUnit.Framework.Assert.IsTrue(list.IsEmpty());
list.Add("hey");
NUnit.Framework.Assert.IsFalse(list.IsEmpty());
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour01() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add(null));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(1, list.IndexOf(null)));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour02() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add(null));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(4, list.Size()));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour03() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add(null));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add(null));
actionList.Add((list) => list.Set(1, "4"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(list.Get(1), "4"));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour04() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add(null));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add(null));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(1, list.IndexOf(null)));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour05() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(-1, list.IndexOf(null)));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour06() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("2"));
actionList.Add((list) => list.Add("3"));
actionList.Add((list) => list.Add("4"));
actionList.Add((list) => list.Add("5"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(4, list.IndexOf("5")));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour07() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("2"));
actionList.Add((list) => list.Add("3"));
actionList.Add((list) => list.Add("4"));
actionList.Add((list) => list.Add("5"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(-1, list.IndexOf("6")));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour08() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("2"));
actionList.Add((list) => list.Add("3"));
actionList.Add((list) => list.Add("4"));
actionList.Add((list) => list.Add(2, "5"));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(5, list.Size()));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour09() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("2"));
actionList.Add((list) => list.Add("3"));
actionList.Add((list) => list.Add("4"));
actionList.Add((list) => list.Set(2, null));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(4, list.Size()));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour10() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => list.Add("2"));
actionList.Add((list) => list.Add("3"));
actionList.Add((list) => list.Add("4"));
actionList.Add((list) => list.Remove(2));
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(3, list.Size()));
ExecuteActions(actionList);
}

[NUnit.Framework.Test]
public virtual void TestSameBehaviour11() {
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
actionList.Add((list) => NUnit.Framework.Assert.IsTrue(list.IsEmpty()));
actionList.Add((list) => list.Add("1"));
actionList.Add((list) => NUnit.Framework.Assert.IsFalse(list.IsEmpty()));
actionList.Add((list) => list.Add("2"));
actionList.Add((list) => list.Add("3"));
actionList.Add((list) => list.Add("4"));
actionList.Add((list) => NUnit.Framework.Assert.IsFalse(list.IsEmpty()));
ExecuteActions(actionList);
}

public virtual void ExecuteActions(IList<Action<ISimpleList<String>>> actionList) {
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
SimpleArrayList<String> list2 = new SimpleArrayList<String>();
foreach (Action<ISimpleList<String>> action in actionList) {
action(list);
action(list2);
}
}
}
}
Loading

0 comments on commit 99dacf9

Please sign in to comment.