Skip to content

Commit e8d44ab

Browse files
committed
Merge branch 'release_branch_DEVSIX-5576' into master-rc
2 parents 08b437a + dd3be29 commit e8d44ab

File tree

46 files changed

+2186
-1053
lines changed

Some content is hidden

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

46 files changed

+2186
-1053
lines changed

pom.xml

Lines changed: 2 additions & 8 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.1.16</version>
8+
<version>7.2.0</version>
99
<relativePath />
1010
</parent>
1111

1212
<artifactId>cleanup</artifactId>
13-
<version>2.0.7</version>
13+
<version>3.0.0</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
@@ -102,12 +102,6 @@
102102
<plugins>
103103
<plugin>
104104
<artifactId>maven-javadoc-plugin</artifactId>
105-
<configuration>
106-
<sourceFileExcludes>
107-
<!-- ProductInfo -->
108-
<sourceFileExclude>**/PdfCleanupProductInfo.java</sourceFileExclude>
109-
</sourceFileExcludes>
110-
</configuration>
111105
</plugin>
112106
</plugins>
113107
</build>
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/*
22
This file is part of the iText (R) project.
33
Copyright (c) 1998-2021 iText Group NV
4-
Authors: Bruno Lowagie, Paulo Soares, et al.
5-
4+
Authors: iText Software.
5+
66
This program is free software; you can redistribute it and/or modify
77
it under the terms of the GNU Affero General Public License version 3
88
as published by the Free Software Foundation with the addition of the
99
following permission added to Section 15 as permitted in Section 7(a):
1010
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
1111
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
1212
OF THIRD PARTY RIGHTS
13-
13+
1414
This program is distributed in the hope that it will be useful, but
1515
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1616
or FITNESS FOR A PARTICULAR PURPOSE.
@@ -20,41 +20,80 @@ This file is part of the iText (R) project.
2020
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
2121
Boston, MA, 02110-1301 USA, or download the license from the following URL:
2222
http://itextpdf.com/terms-of-use/
23-
23+
2424
The interactive user interfaces in modified source and object code versions
2525
of this program must display Appropriate Legal Notices, as required under
2626
Section 5 of the GNU Affero General Public License.
27-
27+
2828
In accordance with Section 7(b) of the GNU Affero General Public License,
2929
a covered work must retain the producer line in every PDF that is created
3030
or manipulated using iText.
31-
31+
3232
You can be released from the requirements of the license by purchasing
3333
a commercial license. Buying such a license is mandatory as soon as you
3434
develop commercial activities involving the iText software without
3535
disclosing the source code of your own applications.
3636
These activities include: offering paid services to customers as an ASP,
3737
serving PDFs on the fly in a web application, shipping iText with a closed
3838
source product.
39-
39+
4040
For more information, please contact iText Software Corp. at this
4141
4242
*/
43-
4443
package com.itextpdf.pdfcleanup;
4544

45+
import com.itextpdf.commons.actions.contexts.IMetaInfo;
46+
4647
/**
47-
* Product info about this iText add-on.
48+
* Contains properties for {@link PdfCleanUpTool} operations.
4849
*/
49-
// TODO refactor? move to local fields in order to hide it?
50-
public class PdfCleanupProductInfo {
51-
52-
/** The product name. */
53-
public static final String PRODUCT_NAME = "pdfSweep";
54-
55-
/** The major version number. */
56-
public static final int MAJOR_VERSION = 2;
57-
58-
/** The minor version number. */
59-
public static final int MINOR_VERSION = 0;
50+
public class CleanUpProperties {
51+
52+
private IMetaInfo metaInfo;
53+
private boolean processAnnotations;
54+
55+
/**
56+
* Creates default CleanUpProperties instance.
57+
*/
58+
public CleanUpProperties() {
59+
processAnnotations = true;
60+
}
61+
62+
/**
63+
* Returns metaInfo property.
64+
*
65+
* @return metaInfo property
66+
*/
67+
IMetaInfo getMetaInfo() {
68+
return metaInfo;
69+
}
70+
71+
/**
72+
* Sets additional meta info.
73+
*
74+
* @param metaInfo the meta info to set
75+
*/
76+
public void setMetaInfo(IMetaInfo metaInfo) {
77+
this.metaInfo = metaInfo;
78+
}
79+
80+
/**
81+
* Check if page annotations will be processed.
82+
* Default: {@code true}.
83+
*
84+
* @return {@code true} if annotations will be processed by the {@link PdfCleanUpTool}
85+
*/
86+
public boolean isProcessAnnotations() {
87+
return processAnnotations;
88+
}
89+
90+
/**
91+
* Set if page annotations will be processed.
92+
* Default processing behaviour: remove annotation if there is overlap with a redaction region.
93+
*
94+
* @param processAnnotations is page annotations will be processed
95+
*/
96+
public void setProcessAnnotations(boolean processAnnotations) {
97+
this.processAnnotations = processAnnotations;
98+
}
6099
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This file is part of the iText (R) project.
4343
package com.itextpdf.pdfcleanup;
4444

4545

46-
import com.itextpdf.kernel.PdfException;
46+
import com.itextpdf.kernel.exceptions.PdfException;
4747
import com.itextpdf.kernel.pdf.canvas.parser.data.IEventData;
4848
import com.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener;
4949
import com.itextpdf.kernel.pdf.canvas.parser.EventType;

0 commit comments

Comments
 (0)