Skip to content

Commit 11a3028

Browse files
committed
Merge branch 'release_branch_DEVSIX-5576' into master-rc
2 parents 3dd32e3 + a03e906 commit 11a3028

File tree

58 files changed

+2014
-1082
lines changed

Some content is hidden

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

58 files changed

+2014
-1082
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
def repoName = "pdfSweep"
55
def dependencyRegex = "itextcore"
66
def solutionFile = "itext.cleanup.sln"
7-
def csprojFramework = "netcoreapp2.0"
7+
def frameworksToTest = "net461"
88

9-
automaticDotnetBuild(repoName, dependencyRegex, solutionFile, csprojFramework)
9+
automaticDotnetBuild(repoName, dependencyRegex, solutionFile, frameworksToTest)

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 = "pdfSweep 2.0.7 API"
35+
PROJECT_NAME = "pdfSweep 3.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.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.7.0")]
19-
[assembly: AssemblyFileVersion("2.0.7.0")]
20-
[assembly: AssemblyInformationalVersion("2.0.7")]
18+
[assembly: AssemblyVersion("3.0.0.0")]
19+
[assembly: AssemblyFileVersion("3.0.0.0")]
20+
[assembly: AssemblyInformationalVersion("3.0.0")]
2121

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

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<PropertyGroup Label="Configuration">
44
<SignAssembly>True</SignAssembly>
55
<DelaySign>False</DelaySign>
6-
<RootNamespace></RootNamespace>
6+
<RootNamespace />
77
</PropertyGroup>
88
<PropertyGroup>
9-
<TargetFrameworks>net45</TargetFrameworks>
9+
<TargetFrameworks>net461</TargetFrameworks>
1010
</PropertyGroup>
1111
<PropertyGroup>
1212
<OutputType>library</OutputType>
@@ -34,16 +34,16 @@
3434
<PropertyGroup>
3535
<NoWarn>1701;1702;1591;1570;1572;1573;1574;1580;1584;1658</NoWarn>
3636
</PropertyGroup>
37-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
37+
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
3838
<Reference Include="System" />
3939
<Reference Include="System.Core" />
4040
</ItemGroup>
4141
<ItemGroup>
4242
<ProjectReference Include="..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
43-
<PackageReference Include="itext7" Version="7.1.16" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
43+
<PackageReference Include="itext7" Version="7.2.0" Condition="!Exists('..\..\..\itextcore\itext\itext.io\itext.io.netstandard.csproj')" />
4444
<ProjectReference Include="..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.kernel\itext.kernel.netstandard.csproj')" />
4545
<ProjectReference Include="..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj" Condition="Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
46-
<PackageReference Include="itext7.pdftest" Version="7.1.16" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
46+
<PackageReference Include="itext7.pdftest" Version="7.2.0" Condition="!Exists('..\..\..\itextcore\itext\itext.pdftest\itext.pdftest.netstandard.csproj')" />
4747
<ProjectReference Include="..\..\itext\itext.cleanup\itext.cleanup.csproj" />
4848
</ItemGroup>
4949
</Project>

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ public virtual void RedactTonySoprano() {
7777
writer.SetCompressionLevel(0);
7878
PdfDocument pdf = new PdfDocument(new PdfReader(input), writer);
7979
// sweep
80-
PdfAutoSweep autoSweep = new PdfAutoSweep(strategy);
81-
autoSweep.CleanUp(pdf);
80+
PdfCleaner.AutoSweepCleanUp(pdf, strategy);
8281
pdf.Close();
8382
// compare
8483
CompareResults(cmp, output, outputPath, "4");
@@ -93,8 +92,7 @@ public virtual void CleanUpAreaCalculationPrecisionTest() {
9392
strategy.Add(new CustomLocationExtractionStrategy("(iphone)|(iPhone)"));
9493
PdfDocument pdf = new PdfDocument(new PdfReader(input), new PdfWriter(output));
9594
// sweep
96-
PdfAutoSweep autoSweep = new PdfAutoSweep(strategy);
97-
autoSweep.CleanUp(pdf);
95+
PdfCleaner.AutoSweepCleanUp(pdf, strategy);
9896
pdf.Close();
9997
// compare
10098
CompareTool compareTool = new CompareTool();
@@ -111,8 +109,7 @@ public virtual void RedactIPhoneUserManualMatchColor() {
111109
strategy.Add(new CustomLocationExtractionStrategy("(iphone)|(iPhone)"));
112110
PdfDocument pdf = new PdfDocument(new PdfReader(input), new PdfWriter(output));
113111
// sweep
114-
PdfAutoSweep autoSweep = new PdfAutoSweep(strategy);
115-
autoSweep.CleanUp(pdf);
112+
PdfCleaner.AutoSweepCleanUp(pdf, strategy);
116113
pdf.Close();
117114
// compare
118115
CleanUpImagesCompareTool cmpTool = new CleanUpImagesCompareTool();
@@ -137,8 +134,7 @@ public virtual void RedactIPhoneUserManual() {
137134
strategy.Add(new RegexBasedCleanupStrategy("(iphone)|(iPhone)"));
138135
PdfDocument pdf = new PdfDocument(new PdfReader(input), new PdfWriter(output));
139136
// sweep
140-
PdfAutoSweep autoSweep = new PdfAutoSweep(strategy);
141-
autoSweep.CleanUp(pdf);
137+
PdfCleaner.AutoSweepCleanUp(pdf, strategy);
142138
pdf.Close();
143139
// compare
144140
CleanUpImagesCompareTool cmpTool = new CleanUpImagesCompareTool();
@@ -163,8 +159,7 @@ public virtual void RedactIPhoneUserManualColored() {
163159
strategy.Add(new RegexBasedCleanupStrategy("(iphone)|(iPhone)").SetRedactionColor(ColorConstants.GREEN));
164160
PdfDocument pdf = new PdfDocument(new PdfReader(input), new PdfWriter(output));
165161
// sweep
166-
PdfAutoSweep autoSweep = new PdfAutoSweep(strategy);
167-
autoSweep.CleanUp(pdf);
162+
PdfCleaner.AutoSweepCleanUp(pdf, strategy);
168163
pdf.Close();
169164
CompareResults(cmp, output, outputPath, "4");
170165
}

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ source product.
4242
*/
4343
using System;
4444
using System.Collections.Generic;
45-
using iText.IO.Util;
45+
using iText.Commons.Utils;
4646
using iText.Kernel.Geom;
4747
using iText.Kernel.Pdf;
4848
using iText.PdfCleanup.Util;
@@ -73,7 +73,7 @@ public virtual void BigUntaggedDocument() {
7373
}
7474

7575
[NUnit.Framework.Test]
76-
[LogMessage(iText.IO.LogMessageConstant.CREATED_ROOT_TAG_HAS_MAPPING)]
76+
[LogMessage(iText.IO.Logs.IoLogMessageConstant.CREATED_ROOT_TAG_HAS_MAPPING)]
7777
public virtual void BigTaggedDocument() {
7878
String input = inputPath + "chapter8_Interactive_features.pdf";
7979
String output = outputPath + "bigTaggedDocument.pdf";
@@ -98,9 +98,7 @@ public virtual void TextPositioning() {
9898
private void CleanUp(String input, String output, IList<iText.PdfCleanup.PdfCleanUpLocation> cleanUpLocations
9999
) {
100100
PdfDocument pdfDocument = new PdfDocument(new PdfReader(input), new PdfWriter(output));
101-
iText.PdfCleanup.PdfCleanUpTool cleaner = new iText.PdfCleanup.PdfCleanUpTool(pdfDocument, cleanUpLocations
102-
);
103-
cleaner.CleanUp();
101+
PdfCleaner.CleanUp(pdfDocument, cleanUpLocations);
104102
pdfDocument.Close();
105103
}
106104

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ source product.
4242
*/
4343
using System;
4444
using System.Collections.Generic;
45-
using iText.IO.Util;
45+
using iText.Commons.Utils;
4646
using iText.Kernel.Colors;
4747
using iText.Kernel.Geom;
4848
using iText.Kernel.Pdf;
4949
using iText.Kernel.Utils;
50+
using iText.PdfCleanup.Logs;
5051
using iText.Test;
5152
using iText.Test.Attributes;
5253

@@ -226,9 +227,12 @@ public virtual void CleanWatermarkAnnotation() {
226227
private void CleanUp(String input, String output, IList<iText.PdfCleanup.PdfCleanUpLocation> cleanUpLocations
227228
) {
228229
PdfDocument pdfDocument = new PdfDocument(new PdfReader(input), new PdfWriter(output));
229-
iText.PdfCleanup.PdfCleanUpTool cleaner = (cleanUpLocations == null) ? new iText.PdfCleanup.PdfCleanUpTool
230-
(pdfDocument, true) : new iText.PdfCleanup.PdfCleanUpTool(pdfDocument, cleanUpLocations);
231-
cleaner.CleanUp();
230+
if (cleanUpLocations == null) {
231+
PdfCleaner.CleanUpRedactAnnotations(pdfDocument);
232+
}
233+
else {
234+
PdfCleaner.CleanUp(pdfDocument, cleanUpLocations);
235+
}
232236
pdfDocument.Close();
233237
}
234238

itext.tests/itext.cleanup.tests/itext/pdfcleanup/CleanUpInvalidPdfTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public virtual void CleanCircularReferencesInResourcesTest() {
4949
>();
5050
cleanUpLocations.Add(new iText.PdfCleanup.PdfCleanUpLocation(1, pdfDocument.GetPage(1).GetPageSize(), null
5151
));
52-
new iText.PdfCleanup.PdfCleanUpTool(pdfDocument, cleanUpLocations).CleanUp();
52+
PdfCleaner.CleanUp(pdfDocument, cleanUpLocations);
5353
pdfDocument.Close();
5454
}
5555
, NUnit.Framework.Throws.InstanceOf<OutOfMemoryException>())

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ public virtual void CleanPathPartial() {
115115
private void CleanUp(String input, String output, IList<iText.PdfCleanup.PdfCleanUpLocation> cleanUpLocations
116116
) {
117117
PdfDocument pdfDocument = new PdfDocument(new PdfReader(input), new PdfWriter(output));
118-
iText.PdfCleanup.PdfCleanUpTool cleaner = (cleanUpLocations == null) ? new iText.PdfCleanup.PdfCleanUpTool
119-
(pdfDocument, true) : new iText.PdfCleanup.PdfCleanUpTool(pdfDocument, cleanUpLocations);
120-
cleaner.CleanUp();
118+
if (cleanUpLocations == null) {
119+
PdfCleaner.CleanUpRedactAnnotations(pdfDocument);
120+
}
121+
else {
122+
PdfCleaner.CleanUp(pdfDocument, cleanUpLocations);
123+
}
121124
pdfDocument.Close();
122125
}
123126

0 commit comments

Comments
 (0)