Skip to content

Commit 62881d2

Browse files
committed
[RELEASE] iText 7 Core - 7.1.6
https://github.com/itext/itext7-dotnet/releases/tag/7.1.6 * release/7.1.6: [RELEASE] 7.1.6-SNAPSHOT -> 7.1.6 Throw exception if PdfReader instance is attempted to be reused between PdfDocument instances Add missing copyright headers Do not mark annotations as modified when simply reading them in append mode Fix Names PdfObject not being marked as modified in append mode Catch failed newline glyph retrieval Update port-hash Update port-hash Update hashCode and equals methods of some line-processing related classes. Fix minor issue in XMPDateTimeImpl constructor Suppress XML doc related warnings Remove NETStandard.Library dependency as implicit. Add searching differences in type 3 font forming Add missing copyright headers Change the way of checking transparency on the page SVG: Use actual closePath operator in PDF syntax Update port-hash Add test on advanced stroke properties Refactor PdfType0Font#getToUnicode logic Update port-hash Implement image masks filtering Update cmp files for Hebrew acroform test Fix incorrect glyph appearance for hebrew glyphs (fillFieldWithHebrewCase2 test). Added tests for DEVSIX-2069 Increase rebuilding xref table log message severity up to ERROR Improve documentation and naming for signature integrity, authenticity and document coverage checks Add tests for ISA and SWA attacks Remove font-asian duplicates from io-module Add getter for color prop of the form field Wrap old content when flattening fields Update port-hash Set color on font when drawing a TextField with MaxLen fix issue in pdfTokenizer, if minus char '-' is found after '.' in a real number then omitt everything after the '.' char. following the adobe reader rule DEVSIX-2674 Unify the criteria which are used to consider a font to be bold. Add info about pdfHTML and pdfSweep to README Extract PdfPage coping excluded keys Update the table's fixed-layout algorithm in case of a negative width remained. SVG paths: Support smooth curves Remove attributes checks of certificate extensions in CertificateVerification class and improve list of known standard extensions Handle noninvertible transformation matricies. Add some tests. Update port-hash Update port-hash Inherit MaxLen property for form fields Add some new direction log messages. Complete PdfAcroForm#getAcroForm() javadoc Extract color and fontSize property when creating a form field; normalize button field font size Downgrade exception to worning to allow for a work around implementation of vertical text Add "core" and "itextcore" to tags for iText7 Core nuget package Simplify PdfFormCopyTest#largeFilePerformanceTest Add control on field. Check null value Add test case Avoid use of MethodHandler add svg and styled-xml-parser to README DEVSIX-2717 Fix OCSPVerifier responder certificate verification Improve contribution guidelines Update PdfAFormFieldTest Allow unknown annotation type in PdfAnnot:makeAnnot Fix documentation of PdfTextExtractor Add more tests Test for text element background opacity Add text element background opacity Remove unused imports and add @category for tests Throw up warning instead of error for larger MediaBox entries Add missing copyright headers Avoid splitting at an hyphen used to denote a negative value Embed OCSP response for all certificates in the chain in PdfSigner#signDetached Support creating OCSP responses for different certificates using TestOcspClient Remove unparsable CP1252 characters for TypeScript Optimize check for words boundary in LocationTextExtractionStrategy Fix possible issues with invalid OpenType anchor data Add javadoc for PdfDocument#setTagged() Avoid fonts creation when fetching the needed data on registerDirectory() Don't fail on initial whitespace in path operator Fix issue with incorrect ref parsing Delete unnecessary maven-javadoc plugin param, delete obsolete profile for javadoc Fix Javadoc errors, eliminate a number of Javadoc warnings Fix problem with excess xref entries in copying PdfPage as XObject Reorder methods in AbstractSvgNodeRenderer for CC Support transparency in SVG, both opacity and rgba Add missing copyright headers SVG: Support for Elliptical paths Add missing copyright headers Support for Text-anchor attribute Implement TSpan support Upgrade Surefire and Failsafe Make default pages handling for open-close scenario more tolerable for invalid /Contents entry Do not add default font to document, just make it indirect SVG: Support (x y)+ parameters in MoveTo path operator Modify the page's resources if necessary. Refactor and improve drawing of text field's appearances. Add some tests. Ignore the Comb flag if the field doesn't have a MaxLen entry. Add test for setLineThrough() behavior with setTextRise() Add a few tests for deferred signing Do not throw an exception if a form field doesn't have /MaxLen and Comb flag is set. Cover the case of updating LTV verification data of PDF in which DSS does not contain VRI entry Introduce barcode constructors which take font as a parameter. Update javadocs a bit. Add new barcode + pdfa tests. Extract background and border color property when creating a form field add missing doc Update rotation documentation Update port-hash after release [RELEASE] 7.1.5-SNAPSHOT -> 7.1.6-SNAPSHOT Remove pdftest dependency from package configs Add the reset functionality to FontProvider.
2 parents b96f289 + aba05d9 commit 62881d2

File tree

525 files changed

+10416
-2105
lines changed

Some content is hidden

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

525 files changed

+10416
-2105
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -70,83 +70,29 @@ Before you submit your pull request consider the following guidelines:
7070
* Please sign the [iText Contributor License Agreement (iCLA)](#cla) before sending pull
7171
requests for any change of more than 20 significant lines of code (we're not counting curly braces and other syntactical sugar).
7272
We cannot accept code without this agreement.
73-
* Clone **iText 7 Community** to your local machine.
74-
75-
```shell
76-
git clone [email protected]:itext/itext7.git
77-
cd itext7
78-
git fetch origin
79-
git checkout -b develop origin/develop
80-
```
81-
82-
* Make your changes in a new git branch based off the develop branch:
83-
84-
```shell
85-
git checkout -b my-fix-branch develop
86-
```
87-
88-
* Create your patch, **including appropriate test cases**.
73+
* Fork the iText repository on GitHub.
74+
* Clone your iText fork to your local machine.
75+
* Make your changes, **including appropriate test cases**.
8976
* Follow our [Coding Rules](#rules).
90-
* Run the full **iText 7 Community** test suite and ensure that all tests pass.
9177
* Commit your changes using a descriptive commit message that follows our
9278
[commit message conventions](#commit-message-format).
93-
94-
```shell
95-
git commit -a
96-
```
97-
Note: the optional commit `-a` command line option will automatically `add` and `rm` edited files.
98-
9979
* Now would be a good time to fix up your commits (if you want or need to) with `git rebase --interactive`.
10080
* Build your changes locally to ensure all the tests pass.
101-
* Push your branch to your GitHub account:
102-
103-
```shell
104-
git remote add my-remote [email protected]:my-remote/itext7.git
105-
git push my-remote my-fix-branch
106-
```
107-
108-
* In GitHub, send a pull request to `itext7:develop`.
81+
* Push your changes to your GitHub account.
82+
* Create a pull request in GitHub.
83+
"Head fork" should be your repository, and the "base fork" should be the iText7 official repository.
10984
* If we suggest changes then:
11085
* Make the required updates.
111-
* Re-run the **iText 7 Community** test suite to ensure tests are still passing.
112-
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
113-
114-
```shell
115-
git fetch origin
116-
git rebase develop -i
117-
git push my-remote my-fix-branch -f
118-
```
86+
* Fix up your commits if needed, with an interactive rebase.
87+
* Re-run the tests and make sure that they are still passing.
88+
* Force push to your GitHub repository. This will update your Pull Request.
11989

12090
That's it! Thank you for your contribution!
12191

12292
#### After your pull request is merged
12393

124-
After your pull request is merged, you can safely delete your branch and pull the changes
125-
from the main (upstream) repository:
126-
127-
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
128-
129-
```shell
130-
git push my-remote --delete my-fix-branch
131-
```
132-
133-
* Check out the develop branch:
134-
135-
```shell
136-
git checkout develop -f
137-
```
138-
139-
* Delete the local branch:
140-
141-
```shell
142-
git branch -D my-fix-branch
143-
```
144-
145-
* Update your develop with the latest upstream version:
146-
147-
```shell
148-
git pull --ff upstream develop
149-
```
94+
After your pull request is merged, you can safely delete your fork and pull the changes
95+
from the main (upstream) repository.
15096

15197

15298
## <a name="rules">Coding Rules</a>

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**[iText 7 Community][itext]** for .NET consists of several dlls.
1+
**[iText 7 Community for .NET][itext]** (former iTextSharp) consists of several dlls.
22

33
The **iText 7 Core/Community** release contains:
44

@@ -12,6 +12,8 @@ The **iText 7 Core/Community** release contains:
1212
- ```hyph.dll```: use this if you want text to be hyphenated
1313
- ```font-asian.dll```: use this is you need CJK functionality (Chinese / Japanese / Korean)
1414
- ```sign.dll```: use this if you need support for digital signatures
15+
- ```styled-xml-parser.dll```: use this if you need support for SVG or html2pdf
16+
- ```svg.dll```: SVG support
1517

1618
The **iText 7 Community** source code is hosted on [Github][github], where you can also [download the latest releases][latest].
1719

@@ -21,11 +23,10 @@ The **iText 7 Community** source code is hosted on [Github][github], where you c
2123

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

24-
We also have a Java tool that can help you debug PDFs:
25-
26-
- ```itext-rups-x.y.z.jar```
27-
28-
RUPS is also hosted on [Github][github-rups].
26+
We also provide opensource add-ons and tools to complement the core functionality:
27+
- [pdfHTML][pdfhtml] — allows you to easily convert HTML to PDF or iText objects
28+
- [pdfSweep][pdfsweep] — a highly efficient PDF tool to merge, split and redact data
29+
- [RUPS][rups] — a Java tool that can help you debug PDFs
2930

3031
If you have an idea on how to improve **iText 7 Community** and you want to submit code,
3132
please read our [Contribution Guidelines][contributing].
@@ -50,10 +51,12 @@ Contact [sales] for more info.
5051
[agpl]: LICENSE.md
5152
[building]: BUILDING.md
5253
[contributing]: CONTRIBUTING.md
53-
[itext]: http://itextpdf.com/
54+
[itext]: https://itextpdf.com/
5455
[github]: https://github.com/itext/itext7-dotnet
55-
[github-rups]: http://github.com/itext/rups
5656
[latest]: https://github.com/itext/itext7-dotnet/releases/latest
5757
[nuget]: https://www.nuget.org/packages/itext7
58-
[sales]: http://itextpdf.com/sales
58+
[sales]: https://itextpdf.com/sales
5959
[gratis]: https://en.wikipedia.org/wiki/Gratis_versus_libre
60+
[rups]: https://github.com/itext/rups
61+
[pdfhtml]: https://github.com/itext/i7n-pdfhtml
62+
[pdfsweep]: https://github.com/itext/i7n-pdfsweep

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("7.1.5.0")]
18-
[assembly: AssemblyFileVersion("7.1.5.0")]
19-
[assembly: AssemblyInformationalVersion("7.1.5")]
17+
[assembly: AssemblyVersion("7.1.6.0")]
18+
[assembly: AssemblyFileVersion("7.1.6.0")]
19+
[assembly: AssemblyInformationalVersion("7.1.6")]
2020

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

itext.tests/itext.barcodes.tests/itext.barcodes.tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<DefineConstants>DEBUG;TRACE</DefineConstants>
2525
<ErrorReport>prompt</ErrorReport>
2626
<WarningLevel>4</WarningLevel>
27+
<NoWarn>CS1591;CS1570;CS1572;CS1573;CS1574;CS1580;CS1584;CS1658</NoWarn>
2728
</PropertyGroup>
2829
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2930
<DebugType>pdbonly</DebugType>
@@ -32,6 +33,7 @@
3233
<DefineConstants>TRACE</DefineConstants>
3334
<ErrorReport>prompt</ErrorReport>
3435
<WarningLevel>4</WarningLevel>
36+
<NoWarn>CS1591;CS1570;CS1572;CS1573;CS1574;CS1580;CS1584;CS1658</NoWarn>
3537
</PropertyGroup>
3638
<ItemGroup>
3739
<Reference Include="nunit.framework, Version=3.7.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">

itext.tests/itext.barcodes.tests/itext.barcodes.tests.netstandard.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<AssemblyName>itext.barcodes.tests</AssemblyName>
2626
<RootNamespace />
2727
</PropertyGroup>
28+
<PropertyGroup>
29+
<NoWarn>1701;1702;1591;1570;1572;1573;1574;1580;1584;1658</NoWarn>
30+
</PropertyGroup>
2831
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
2932
<Reference Include="System" />
3033
<Reference Include="System.Core" />

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("7.1.5.0")]
18-
[assembly: AssemblyFileVersion("7.1.5.0")]
19-
[assembly: AssemblyInformationalVersion("7.1.5")]
17+
[assembly: AssemblyVersion("7.1.6.0")]
18+
[assembly: AssemblyFileVersion("7.1.6.0")]
19+
[assembly: AssemblyInformationalVersion("7.1.6")]
2020

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

itext.tests/itext.forms.tests/itext.forms.tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<DefineConstants>DEBUG;TRACE</DefineConstants>
2424
<ErrorReport>prompt</ErrorReport>
2525
<WarningLevel>4</WarningLevel>
26+
<NoWarn>CS1591;CS1570;CS1572;CS1573;CS1574;CS1580;CS1584;CS1658</NoWarn>
2627
</PropertyGroup>
2728
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2829
<DebugType>pdbonly</DebugType>
@@ -31,6 +32,7 @@
3132
<DefineConstants>TRACE</DefineConstants>
3233
<ErrorReport>prompt</ErrorReport>
3334
<WarningLevel>4</WarningLevel>
35+
<NoWarn>CS1591;CS1570;CS1572;CS1573;CS1574;CS1580;CS1584;CS1658</NoWarn>
3436
</PropertyGroup>
3537
<ItemGroup>
3638
<Reference Include="nunit.framework, Version=3.7.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">

itext.tests/itext.forms.tests/itext.forms.tests.netstandard.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<AssemblyName>itext.forms.tests</AssemblyName>
2626
<RootNamespace />
2727
</PropertyGroup>
28+
<PropertyGroup>
29+
<NoWarn>1701;1702;1591;1570;1572;1573;1574;1580;1584;1658</NoWarn>
30+
</PropertyGroup>
2831
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
2932
<Reference Include="System" />
3033
<Reference Include="System.Core" />
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2019 iText Group NV
4+
Authors: iText Software.
5+
6+
This program is free software; you can redistribute it and/or modify
7+
it under the terms of the GNU Affero General Public License version 3
8+
as published by the Free Software Foundation with the addition of the
9+
following permission added to Section 15 as permitted in Section 7(a):
10+
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
11+
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
12+
OF THIRD PARTY RIGHTS
13+
14+
This program is distributed in the hope that it will be useful, but
15+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16+
or FITNESS FOR A PARTICULAR PURPOSE.
17+
See the GNU Affero General Public License for more details.
18+
You should have received a copy of the GNU Affero General Public License
19+
along with this program; if not, see http://www.gnu.org/licenses or write to
20+
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21+
Boston, MA, 02110-1301 USA, or download the license from the following URL:
22+
http://itextpdf.com/terms-of-use/
23+
24+
The interactive user interfaces in modified source and object code versions
25+
of this program must display Appropriate Legal Notices, as required under
26+
Section 5 of the GNU Affero General Public License.
27+
28+
In accordance with Section 7(b) of the GNU Affero General Public License,
29+
a covered work must retain the producer line in every PDF that is created
30+
or manipulated using iText.
31+
32+
You can be released from the requirements of the license by purchasing
33+
a commercial license. Buying such a license is mandatory as soon as you
34+
develop commercial activities involving the iText software without
35+
disclosing the source code of your own applications.
36+
These activities include: offering paid services to customers as an ASP,
37+
serving PDFs on the fly in a web application, shipping iText with a closed
38+
source product.
39+
40+
For more information, please contact iText Software Corp. at this
41+
42+
*/
43+
using System;
44+
using iText.Kernel.Pdf;
45+
using iText.Test;
46+
47+
namespace iText.Forms {
48+
public class FlatteningWithNullKidElementTest : ExtendedITextTest {
49+
public static readonly String sourceFolder = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
50+
.CurrentContext.TestDirectory) + "/resources/itext/forms/FlatteningWithNullKidElementTest/";
51+
52+
public static readonly String destinationFolder = NUnit.Framework.TestContext.CurrentContext.TestDirectory
53+
+ "/test/itext/forms/FlatteningWithNullKidElementTest/";
54+
55+
[NUnit.Framework.OneTimeSetUp]
56+
public static void BeforeClass() {
57+
CreateDestinationFolder(destinationFolder);
58+
}
59+
60+
/// <exception cref="System.IO.IOException"/>
61+
/// <exception cref="System.Exception"/>
62+
[NUnit.Framework.Test]
63+
public virtual void FormFlatteningTestWithNullKidElement() {
64+
String filename = "Form_NullKidElement";
65+
String src = sourceFolder + filename + ".pdf";
66+
String temp = destinationFolder + "temp.pdf";
67+
PdfDocument doc = new PdfDocument(new PdfReader(src), new PdfWriter(temp));
68+
bool fail = false;
69+
try {
70+
PdfAcroForm.GetAcroForm(doc, true).FlattenFields();
71+
doc.Close();
72+
}
73+
catch (Exception) {
74+
fail = true;
75+
}
76+
NUnit.Framework.Assert.IsFalse(fail);
77+
}
78+
}
79+
}

itext.tests/itext.forms.tests/itext/forms/PdfFormCopyTest.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,19 @@ public virtual void CopyFieldsTest03() {
114114

115115
/// <exception cref="System.IO.IOException"/>
116116
/// <exception cref="System.Exception"/>
117-
#if !NETSTANDARD1_6
118-
[NUnit.Framework.Timeout(100000)]
119-
#endif
120117
[NUnit.Framework.Test]
121-
public virtual void LargeFilePerformanceTest() {
118+
public virtual void LargeFileTest() {
122119
String srcFilename1 = sourceFolder + "frontpage.pdf";
123120
String srcFilename2 = sourceFolder + "largeFile.pdf";
124121
String filename = destinationFolder + "copyLargeFile.pdf";
125-
long timeStart = System.DateTime.Now.Ticks;
126122
PdfDocument doc1 = new PdfDocument(new PdfReader(srcFilename1));
127123
PdfDocument doc2 = new PdfDocument(new PdfReader(srcFilename2));
128124
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(filename));
129125
pdfDoc.InitializeOutlines();
130126
PdfPageFormCopier formCopier = new PdfPageFormCopier();
131127
doc1.CopyPagesTo(1, doc1.GetNumberOfPages(), pdfDoc, formCopier);
132-
doc2.CopyPagesTo(1, doc2.GetNumberOfPages(), pdfDoc, formCopier);
128+
doc2.CopyPagesTo(1, 10, pdfDoc, formCopier);
133129
pdfDoc.Close();
134-
System.Console.Out.WriteLine(((System.DateTime.Now.Ticks - timeStart) / 1000 / 1000));
135130
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(filename, sourceFolder + "cmp_copyLargeFile.pdf"
136131
, destinationFolder, "diff_"));
137132
}

0 commit comments

Comments
 (0)