Skip to content

Commit 99dacf9

Browse files
committed
[RELEASE] iText 9.0.0
2 parents b1f539d + 5e6f04c commit 99dacf9

File tree

1,567 files changed

+30168
-23256
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,567 files changed

+30168
-23256
lines changed

BUILDING.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
# Building and testing **iText Community**
3+
14
To build **iText Community**, you need to build `itextsharp/itextcore/iTextCore.sln`.
25
To run tests, [Ghostscript][1] and [Imagemagick][2] must be installed.
36
Some of the tests compare generated PDF files with template files that show the correct results, and these tools are used to
@@ -14,5 +17,17 @@ environment variables. Examples of paths on Windows:
1417
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:
1518
ITEXT_MAGICK_COMPARE_EXEC=`"C:\Program Files\ImageMagick-7.0.9-Q16\magick.exe" compare`
1619

20+
21+
# Deploying iText
22+
23+
When using **iText Community** in a project and want to deploy it you have to consider a few things for different deployments.
24+
25+
- **FrameworkDependend**: No additional parameters are required.
26+
- **SelfContained**: No additional parameters are required.
27+
- **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.
28+
- **AssemblyTrimming**: Using `-p:PublishTrimmed=true` is currently not supported.
29+
30+
31+
1732
[1]: https://www.ghostscript.com/
18-
[2]: https://www.imagemagick.org/
33+
[2]: https://www.imagemagick.org/

README.md

Lines changed: 65 additions & 55 deletions
Large diffs are not rendered by default.

SECURITY.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# iText Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
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.
6+
7+
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.
8+
9+
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:
10+
11+
1. **Do not disclose the vulnerability publicly** until we have had a chance to address it.
12+
2. **Provide a detailed description** of the vulnerability, including steps to reproduce it, if possible.
13+
3. **Include any relevant information** such as the version of iText Core you are using, your operating system, and any other pertinent details.
14+
15+
## Security Updates and Patches
16+
17+
When a vulnerability is reported, we will:
18+
19+
1. **Investigate and verify** the vulnerability.
20+
2. **Develop and test** a fix for the vulnerability.
21+
3. **Release a patch** as soon as possible.
22+
23+
24+
## Known Vulnerabilities
25+
26+
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.
27+
28+
## Supported product lines
29+
30+
See [Compatibility Matrix](https://kb.itextpdf.com/itext/compatibility-matrix)
31+
32+
## Security Best Practices
33+
34+
To help ensure the security of your applications using iText Core, we recommend the following best practices:
35+
36+
1. **Keep iText Core up to date** by regularly checking for and applying updates.
37+
2. **Review and follow** our security guidelines for secure usage.
38+
3. **Monitor your applications** for any unusual activity and investigate any anomalies promptly.
39+
40+
Thank you for helping us keep iText secure!

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.5 API"
35+
PROJECT_NAME = "iText 9.0.0 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.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33
<metadata>
44
<id>itext</id>
5-
<version>8.0.5</version>
5+
<version>9.0.0</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="itext.commons" version="8.0.5" />
22+
<dependency id="itext.commons" version="9.0.0" />
2323
<dependency id="Microsoft.Extensions.Logging" version="5.0.0" />
2424
</group>
2525
<group targetFramework="netstandard2.0">
26-
<dependency id="itext.commons" version="8.0.5" />
26+
<dependency id="itext.commons" version="9.0.0" />
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.5.0")]
18-
[assembly: AssemblyFileVersion("8.0.5.0")]
19-
[assembly: AssemblyInformationalVersion("8.0.5")]
17+
[assembly: AssemblyVersion("9.0.0.0")]
18+
[assembly: AssemblyFileVersion("9.0.0.0")]
19+
[assembly: AssemblyInformationalVersion("9.0.0")]
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.5.0")]
19-
[assembly: AssemblyFileVersion("8.0.5.0")]
20-
[assembly: AssemblyInformationalVersion("8.0.5")]
18+
[assembly: AssemblyVersion("9.0.0.0")]
19+
[assembly: AssemblyFileVersion("9.0.0.0")]
20+
[assembly: AssemblyInformationalVersion("9.0.0")]
2121

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

itext.tests/itext.commons.tests/itext/commons/actions/AbstractProductITextEventTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ namespace iText.Commons.Actions {
2929
public class AbstractProductITextEventTest : ExtendedITextTest {
3030
[NUnit.Framework.Test]
3131
public virtual void NullProductDataTest() {
32-
Exception exception = NUnit.Framework.Assert.Catch(typeof(InvalidOperationException), () => new _AbstractProductITextEvent_36
32+
Exception exception = NUnit.Framework.Assert.Catch(typeof(InvalidOperationException), () => new _AbstractProductITextEvent_35
3333
(null));
3434
NUnit.Framework.Assert.AreEqual("ProductData shouldn't be null.", exception.Message);
3535
}
3636

37-
private sealed class _AbstractProductITextEvent_36 : AbstractProductITextEvent {
38-
public _AbstractProductITextEvent_36(ProductData baseArg1)
37+
private sealed class _AbstractProductITextEvent_35 : AbstractProductITextEvent {
38+
public _AbstractProductITextEvent_35(ProductData baseArg1)
3939
: base(baseArg1) {
4040
}
4141
}
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2024 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.Commons.Datastructures;
26+
using iText.Test;
27+
28+
namespace iText.Commons.Datastructures.Portable {
29+
[NUnit.Framework.Category("UnitTest")]
30+
public class NullUnlimitedListTest : ExtendedITextTest {
31+
[NUnit.Framework.Test]
32+
public virtual void NullUnlimitedListAddTest() {
33+
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
34+
list.Add("hey");
35+
list.Add("bye");
36+
NUnit.Framework.Assert.AreEqual(2, list.Size());
37+
list.Add(-1, "hello");
38+
list.Add(3, "goodbye");
39+
NUnit.Framework.Assert.AreEqual(2, list.Size());
40+
}
41+
42+
[NUnit.Framework.Test]
43+
public virtual void NullUnlimitedListIndexOfTest() {
44+
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
45+
list.Add("hey");
46+
list.Add(null);
47+
list.Add("bye");
48+
list.Add(null);
49+
NUnit.Framework.Assert.AreEqual(4, list.Size());
50+
NUnit.Framework.Assert.AreEqual(1, list.IndexOf(null));
51+
}
52+
53+
[NUnit.Framework.Test]
54+
public virtual void NullUnlimitedListRemoveTest() {
55+
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
56+
list.Add("hey");
57+
list.Add("bye");
58+
NUnit.Framework.Assert.AreEqual(2, list.Size());
59+
list.Remove(-1);
60+
list.Remove(2);
61+
NUnit.Framework.Assert.AreEqual(2, list.Size());
62+
}
63+
64+
[NUnit.Framework.Test]
65+
public virtual void TestIsEmpty() {
66+
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
67+
NUnit.Framework.Assert.IsTrue(list.IsEmpty());
68+
list.Add("hey");
69+
NUnit.Framework.Assert.IsFalse(list.IsEmpty());
70+
}
71+
72+
[NUnit.Framework.Test]
73+
public virtual void TestSameBehaviour01() {
74+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
75+
actionList.Add((list) => list.Add("1"));
76+
actionList.Add((list) => list.Add(null));
77+
actionList.Add((list) => list.Add("1"));
78+
actionList.Add((list) => list.Add("1"));
79+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(1, list.IndexOf(null)));
80+
ExecuteActions(actionList);
81+
}
82+
83+
[NUnit.Framework.Test]
84+
public virtual void TestSameBehaviour02() {
85+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
86+
actionList.Add((list) => list.Add("1"));
87+
actionList.Add((list) => list.Add(null));
88+
actionList.Add((list) => list.Add("1"));
89+
actionList.Add((list) => list.Add("1"));
90+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(4, list.Size()));
91+
ExecuteActions(actionList);
92+
}
93+
94+
[NUnit.Framework.Test]
95+
public virtual void TestSameBehaviour03() {
96+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
97+
actionList.Add((list) => list.Add("1"));
98+
actionList.Add((list) => list.Add(null));
99+
actionList.Add((list) => list.Add("1"));
100+
actionList.Add((list) => list.Add("1"));
101+
actionList.Add((list) => list.Add(null));
102+
actionList.Add((list) => list.Set(1, "4"));
103+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(list.Get(1), "4"));
104+
ExecuteActions(actionList);
105+
}
106+
107+
[NUnit.Framework.Test]
108+
public virtual void TestSameBehaviour04() {
109+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
110+
actionList.Add((list) => list.Add("1"));
111+
actionList.Add((list) => list.Add(null));
112+
actionList.Add((list) => list.Add("1"));
113+
actionList.Add((list) => list.Add("1"));
114+
actionList.Add((list) => list.Add(null));
115+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(1, list.IndexOf(null)));
116+
ExecuteActions(actionList);
117+
}
118+
119+
[NUnit.Framework.Test]
120+
public virtual void TestSameBehaviour05() {
121+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
122+
actionList.Add((list) => list.Add("1"));
123+
actionList.Add((list) => list.Add("1"));
124+
actionList.Add((list) => list.Add("1"));
125+
actionList.Add((list) => list.Add("1"));
126+
actionList.Add((list) => list.Add("1"));
127+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(-1, list.IndexOf(null)));
128+
ExecuteActions(actionList);
129+
}
130+
131+
[NUnit.Framework.Test]
132+
public virtual void TestSameBehaviour06() {
133+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
134+
actionList.Add((list) => list.Add("1"));
135+
actionList.Add((list) => list.Add("2"));
136+
actionList.Add((list) => list.Add("3"));
137+
actionList.Add((list) => list.Add("4"));
138+
actionList.Add((list) => list.Add("5"));
139+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(4, list.IndexOf("5")));
140+
ExecuteActions(actionList);
141+
}
142+
143+
[NUnit.Framework.Test]
144+
public virtual void TestSameBehaviour07() {
145+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
146+
actionList.Add((list) => list.Add("1"));
147+
actionList.Add((list) => list.Add("2"));
148+
actionList.Add((list) => list.Add("3"));
149+
actionList.Add((list) => list.Add("4"));
150+
actionList.Add((list) => list.Add("5"));
151+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(-1, list.IndexOf("6")));
152+
ExecuteActions(actionList);
153+
}
154+
155+
[NUnit.Framework.Test]
156+
public virtual void TestSameBehaviour08() {
157+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
158+
actionList.Add((list) => list.Add("1"));
159+
actionList.Add((list) => list.Add("2"));
160+
actionList.Add((list) => list.Add("3"));
161+
actionList.Add((list) => list.Add("4"));
162+
actionList.Add((list) => list.Add(2, "5"));
163+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(5, list.Size()));
164+
ExecuteActions(actionList);
165+
}
166+
167+
[NUnit.Framework.Test]
168+
public virtual void TestSameBehaviour09() {
169+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
170+
actionList.Add((list) => list.Add("1"));
171+
actionList.Add((list) => list.Add("2"));
172+
actionList.Add((list) => list.Add("3"));
173+
actionList.Add((list) => list.Add("4"));
174+
actionList.Add((list) => list.Set(2, null));
175+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(4, list.Size()));
176+
ExecuteActions(actionList);
177+
}
178+
179+
[NUnit.Framework.Test]
180+
public virtual void TestSameBehaviour10() {
181+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
182+
actionList.Add((list) => list.Add("1"));
183+
actionList.Add((list) => list.Add("2"));
184+
actionList.Add((list) => list.Add("3"));
185+
actionList.Add((list) => list.Add("4"));
186+
actionList.Add((list) => list.Remove(2));
187+
actionList.Add((list) => NUnit.Framework.Assert.AreEqual(3, list.Size()));
188+
ExecuteActions(actionList);
189+
}
190+
191+
[NUnit.Framework.Test]
192+
public virtual void TestSameBehaviour11() {
193+
IList<Action<ISimpleList<String>>> actionList = new List<Action<ISimpleList<String>>>();
194+
actionList.Add((list) => NUnit.Framework.Assert.IsTrue(list.IsEmpty()));
195+
actionList.Add((list) => list.Add("1"));
196+
actionList.Add((list) => NUnit.Framework.Assert.IsFalse(list.IsEmpty()));
197+
actionList.Add((list) => list.Add("2"));
198+
actionList.Add((list) => list.Add("3"));
199+
actionList.Add((list) => list.Add("4"));
200+
actionList.Add((list) => NUnit.Framework.Assert.IsFalse(list.IsEmpty()));
201+
ExecuteActions(actionList);
202+
}
203+
204+
public virtual void ExecuteActions(IList<Action<ISimpleList<String>>> actionList) {
205+
NullUnlimitedList<String> list = new NullUnlimitedList<String>();
206+
SimpleArrayList<String> list2 = new SimpleArrayList<String>();
207+
foreach (Action<ISimpleList<String>> action in actionList) {
208+
action(list);
209+
action(list2);
210+
}
211+
}
212+
}
213+
}

0 commit comments

Comments
 (0)