1
1
/*
2
2
This file is part of the iText (R) project.
3
3
Copyright (c) 1998-2021 iText Group NV
4
- Authors: Bruno Lowagie, Paulo Soares, et al .
5
-
4
+ Authors: iText Software .
5
+
6
6
This program is free software; you can redistribute it and/or modify
7
7
it under the terms of the GNU Affero General Public License version 3
8
8
as published by the Free Software Foundation with the addition of the
9
9
following permission added to Section 15 as permitted in Section 7(a):
10
10
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
11
11
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
12
12
OF THIRD PARTY RIGHTS
13
-
13
+
14
14
This program is distributed in the hope that it will be useful, but
15
15
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
16
or FITNESS FOR A PARTICULAR PURPOSE.
@@ -20,41 +20,80 @@ This file is part of the iText (R) project.
20
20
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
21
Boston, MA, 02110-1301 USA, or download the license from the following URL:
22
22
http://itextpdf.com/terms-of-use/
23
-
23
+
24
24
The interactive user interfaces in modified source and object code versions
25
25
of this program must display Appropriate Legal Notices, as required under
26
26
Section 5 of the GNU Affero General Public License.
27
-
27
+
28
28
In accordance with Section 7(b) of the GNU Affero General Public License,
29
29
a covered work must retain the producer line in every PDF that is created
30
30
or manipulated using iText.
31
-
31
+
32
32
You can be released from the requirements of the license by purchasing
33
33
a commercial license. Buying such a license is mandatory as soon as you
34
34
develop commercial activities involving the iText software without
35
35
disclosing the source code of your own applications.
36
36
These activities include: offering paid services to customers as an ASP,
37
37
serving PDFs on the fly in a web application, shipping iText with a closed
38
38
source product.
39
-
39
+
40
40
For more information, please contact iText Software Corp. at this
41
41
42
42
*/
43
-
44
43
package com .itextpdf .pdfcleanup ;
45
44
45
+ import com .itextpdf .commons .actions .contexts .IMetaInfo ;
46
+
46
47
/**
47
- * Product info about this iText add-on .
48
+ * Contains properties for {@link PdfCleanUpTool} operations .
48
49
*/
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
+ }
60
99
}
0 commit comments