Skip to content

Commit f26e8b5

Browse files
committed
[RELEASE] iText 7 pdfSweep 3.0.2
2 parents 336705d + da65208 commit f26e8b5

Some content is hidden

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

47 files changed

+161
-47
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>com.itextpdf</groupId>
77
<artifactId>root</artifactId>
8-
<version>7.2.3</version>
8+
<version>7.2.5</version>
99
<relativePath />
1010
</parent>
1111

1212
<artifactId>cleanup</artifactId>
13-
<version>3.0.1</version>
13+
<version>3.0.2</version>
1414

1515
<name>pdfSweep</name>
1616
<description>Redact PDF documents. If you have to share PDFs with different departments or send them out of house, but they

src/main/java/com/itextpdf/pdfcleanup/CleanUpProperties.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/FilteredImagesCache.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/LineDashPattern.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/PdfCleanUpEventListener.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/PdfCleanUpFilter.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/PdfCleanUpLocation.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/PdfCleanUpProcessor.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/PdfCleanUpTool.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/PdfCleaner.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/TextPositioning.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/actions/data/PdfSweepProductData.java

Lines changed: 3 additions & 3 deletions
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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify
@@ -51,9 +51,9 @@ public class PdfSweepProductData {
5151
public static final String PDF_SWEEP_PRODUCT_NAME = "pdfSweep";
5252
public static final String PDF_SWEEP_PUBLIC_PRODUCT_NAME = PDF_SWEEP_PRODUCT_NAME;
5353

54-
private static final String PDF_SWEEP_VERSION = "3.0.1";
54+
private static final String PDF_SWEEP_VERSION = "3.0.2";
5555
private static final int PDF_SWEEP_COPYRIGHT_SINCE = 2000;
56-
private static final int PDF_SWEEP_COPYRIGHT_TO = 2022;
56+
private static final int PDF_SWEEP_COPYRIGHT_TO = 2023;
5757

5858
private static final ProductData PDF_SWEEP_PRODUCT_DATA = new ProductData(PDF_SWEEP_PUBLIC_PRODUCT_NAME,
5959
PDF_SWEEP_PRODUCT_NAME, PDF_SWEEP_VERSION, PDF_SWEEP_COPYRIGHT_SINCE, PDF_SWEEP_COPYRIGHT_TO);

src/main/java/com/itextpdf/pdfcleanup/actions/event/PdfSweepProductEvent.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/autosweep/CommonRegex.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/autosweep/CompositeCleanupStrategy.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/autosweep/ICleanupStrategy.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/autosweep/PdfAutoSweepTools.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/autosweep/RegexBasedCleanupStrategy.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/main/java/com/itextpdf/pdfcleanup/exceptions/CleanupExceptionMessageConstant.java

Lines changed: 4 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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.
@@ -31,6 +31,9 @@ public final class CleanupExceptionMessageConstant {
3131
+ "The behaviour is unpredictable.";
3232
public static final String PDF_DOCUMENT_MUST_BE_OPENED_IN_STAMPING_MODE = "PdfDocument must be opened in stamping "
3333
+ "mode.";
34+
// Do not remove, it's used in .NET
35+
// This same exception message is thrown in CleanUpImageUtil#cleanImage when the image format is unsupported
36+
public static final String UNSUPPORTED_IMAGE_TYPE = "Unsupported image type";
3437

3538
private CleanupExceptionMessageConstant(){}
3639
}

src/main/java/com/itextpdf/pdfcleanup/logs/CleanUpLogMessageConstant.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/pdfcleanup/util/CleanUpCsCompareUtil.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/pdfcleanup/util/CleanUpHelperUtil.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/main/java/com/itextpdf/pdfcleanup/util/CleanUpImageUtil.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/test/java/com/itextpdf/pdfcleanup/BigDocumentAutoCleanUpTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/BigDocumentCleanUpTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/CleanUpAnnotationTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/CleanUpCsCompareUtilTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/test/java/com/itextpdf/pdfcleanup/CleanUpImageUtilTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/test/java/com/itextpdf/pdfcleanup/CleanUpInvalidPdfTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/test/java/com/itextpdf/pdfcleanup/CleanUpTaggedPdfTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/CleanupLicenseEventsTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/test/java/com/itextpdf/pdfcleanup/FilteredImagesCacheTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/PdfAutoSweepToolsTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/PdfCleanUpFilterUnitTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

src/test/java/com/itextpdf/pdfcleanup/PdfCleanUpProcessorUnitTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is offered under a commercial and under the AGPL license.

src/test/java/com/itextpdf/pdfcleanup/PdfCleanUpToolTest.java

Lines changed: 20 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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify
@@ -51,6 +51,7 @@ This file is part of the iText (R) project.
5151
import com.itextpdf.kernel.pdf.PdfReader;
5252
import com.itextpdf.kernel.pdf.PdfString;
5353
import com.itextpdf.kernel.pdf.PdfWriter;
54+
import com.itextpdf.kernel.pdf.WriterProperties;
5455
import com.itextpdf.kernel.pdf.annot.PdfAnnotation;
5556
import com.itextpdf.kernel.pdf.annot.PdfRedactAnnotation;
5657
import com.itextpdf.kernel.utils.CompareTool;
@@ -1064,6 +1065,24 @@ public void lineArtsDrawingOnCanvasTest() throws IOException, InterruptedExcepti
10641065
compareByContent(cmp, output, OUTPUT_PATH, "diff_lineArtsDrawingOnCanvasTest_");
10651066
}
10661067

1068+
@Test
1069+
public void checkUnSupportedImageTypeTest() throws IOException {
1070+
String input = INPUT_PATH + "UnsupportedImageType.pdf";
1071+
String output = OUTPUT_PATH + "UnsupportedImageType.pdf";
1072+
1073+
PdfDocument pdfDocument = new PdfDocument(new PdfReader(input), new PdfWriter(output, new WriterProperties()));
1074+
PdfCleanUpTool workingTool = new PdfCleanUpTool(pdfDocument);
1075+
int pageIndex = 1;
1076+
Rectangle area = pdfDocument.getPage(pageIndex).getPageSize();
1077+
workingTool.addCleanupLocation(new PdfCleanUpLocation(pageIndex, area));
1078+
1079+
Exception e = Assert.assertThrows(Exception.class, () -> workingTool.cleanUp());
1080+
Assert.assertEquals(CleanupExceptionMessageConstant.UNSUPPORTED_IMAGE_TYPE.toLowerCase(),
1081+
e.getMessage().toLowerCase());
1082+
1083+
pdfDocument.close();
1084+
}
1085+
10671086
private void cleanUp(String input, String output, List<PdfCleanUpLocation> cleanUpLocations) throws IOException {
10681087
PdfDocument pdfDocument = new PdfDocument(new PdfReader(input), new PdfWriter(output));
10691088

src/test/java/com/itextpdf/pdfcleanup/PdfCleanUpToolWithInlineImagesTest.java

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-2022 iText Group NV
3+
Copyright (c) 1998-2023 iText Group NV
44
Authors: iText Software.
55
66
This program is free software; you can redistribute it and/or modify

0 commit comments

Comments
 (0)