Skip to content

Commit 977acda

Browse files
iText-CIpavel-alay
authored andcommitted
[RELEASE] Merge branch 'release/2.0.2'
2 parents f333b71 + 1a3c076 commit 977acda

32 files changed

+230
-45
lines changed

itext.tests/itext.cleanup.tests/Properties/AssemblyInfo.cs

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

1616
[assembly: Guid("647c862e-d837-4901-8e7b-68f5f8bf8f34")]
1717

18-
[assembly: AssemblyVersion("2.0.1.0")]
19-
[assembly: AssemblyFileVersion("2.0.1.0")]
20-
[assembly: AssemblyInformationalVersion("2.0.1")]
18+
[assembly: AssemblyVersion("2.0.2.0")]
19+
[assembly: AssemblyFileVersion("2.0.2.0")]
20+
[assembly: AssemblyInformationalVersion("2.0.2")]
2121

2222
[assembly: NUnit.Framework.Timeout(300000)]

itext.tests/itext.cleanup.tests/itext.cleanup.tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
<AssemblyOriginatorKeyFile>itext.snk</AssemblyOriginatorKeyFile>
3737
</PropertyGroup>
3838
<ItemGroup>
39-
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
40-
<HintPath>$(SolutionDir)\packages\NUnit.3.4.1\lib\net40\nunit.framework.dll</HintPath>
39+
<Reference Include="nunit.framework, Version=3.7.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
40+
<HintPath>$(SolutionDir)\packages\NUnit.3.7.1\lib\net40\nunit.framework.dll</HintPath>
4141
<Private>True</Private>
4242
</Reference>
4343
<Reference Include="System" />

itext.tests/itext.cleanup.tests/itext/pdfcleanup/BigDocumentAutoCleanUpTest.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
3+
Copyright (c) 1998-2018 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify
@@ -141,6 +141,23 @@ public virtual void RedactIPhoneUserManual() {
141141
CompareResults(cmp, output, outputPath, "diff_redactIPhoneUserManual_");
142142
}
143143

144+
/// <exception cref="System.IO.IOException"/>
145+
/// <exception cref="System.Exception"/>
146+
[NUnit.Framework.Test]
147+
public virtual void RedactIPhoneUserManualColored() {
148+
String input = inputPath + "iphone_user_guide_untagged_small.pdf";
149+
String output = outputPath + "redactIPhoneUserManualColored.pdf";
150+
String cmp = inputPath + "cmp_redactIPhoneUserManualColored.pdf";
151+
CompositeCleanupStrategy strategy = new CompositeCleanupStrategy();
152+
strategy.Add(new RegexBasedCleanupStrategy("(iphone)|(iPhone)").SetRedactionColor(ColorConstants.GREEN));
153+
PdfDocument pdf = new PdfDocument(new PdfReader(input), new PdfWriter(output));
154+
// sweep
155+
PdfAutoSweep autoSweep = new PdfAutoSweep(strategy);
156+
autoSweep.CleanUp(pdf);
157+
pdf.Close();
158+
CompareResults(cmp, output, outputPath, "diff_redactIPhoneUserManualColored_");
159+
}
160+
144161
/// <exception cref="System.IO.IOException"/>
145162
/// <exception cref="System.Exception"/>
146163
private void CompareResults(String cmp, String output, String targetDir, String diffPrefix) {

itext.tests/itext.cleanup.tests/itext/pdfcleanup/BigDocumentCleanUpTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
3+
Copyright (c) 1998-2018 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

itext.tests/itext.cleanup.tests/itext/pdfcleanup/CleanUpAnnotationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
3+
Copyright (c) 1998-2018 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

itext.tests/itext.cleanup.tests/itext/pdfcleanup/CleanUpTaggedPdfTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
3+
Copyright (c) 1998-2018 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

itext.tests/itext.cleanup.tests/itext/pdfcleanup/FilteredImagesCacheTest.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2018 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+
*/
143
using System;
244
using System.Collections.Generic;
345
using iText.Kernel.Geom;

itext.tests/itext.cleanup.tests/itext/pdfcleanup/PdfCleanUpToolTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
3+
Copyright (c) 1998-2018 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

itext.tests/itext.cleanup.tests/itext/pdfcleanup/PdfCleanUpToolWithInlineImagesTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the iText (R) project.
3-
Copyright (c) 1998-2017 iText Group NV
3+
Copyright (c) 1998-2018 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="NUnit" version="3.4.1" targetFramework="net40" />
3+
<package id="NUnit" version="3.7.1" targetFramework="net40" />
44
</packages>

0 commit comments

Comments
 (0)