diff options
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/api/analyze')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeParameters.java | 16 | ||||
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeResult.java | 14 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeParameters.java b/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeParameters.java index 0ab854c..b0ad28b 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeParameters.java +++ b/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeParameters.java @@ -33,6 +33,8 @@ public class AnalyzeParameters */
protected String verifyMode = Constants.VERIFY_MODE_FULL_CONSERVATIVE;
+ protected boolean returnNonTextualObjects = false;
+
/**
* @return the document
*/
@@ -65,5 +67,19 @@ public class AnalyzeParameters this.verifyMode = verifyMode;
}
+ public boolean isReturnNonTextualObjects() {
+ return this.returnNonTextualObjects;
+ }
+
+ /**
+ * Tells if non text object of the signed pdf should be extracted and returned.
+ * One should show this to the user, especially in case of textual signature.
+ * Defaults to <tt>false</tt>
+ *
+ * @param returnNonTextualObjects
+ */
+ public void setReturnNonTextualObjects(boolean returnNonTextualObjects) {
+ this.returnNonTextualObjects = returnNonTextualObjects;
+ }
}
diff --git a/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeResult.java b/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeResult.java index d063b76..c9dde9e 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeResult.java +++ b/src/main/java/at/gv/egiz/pdfas/api/analyze/AnalyzeResult.java @@ -29,4 +29,18 @@ public interface AnalyzeResult public List getSignatures() throws PdfAsException;
public List getNoSignatures();
+
+ /**
+ * Returns non textual data from pdf provided that {@link AnalyzeParameters#setReturnNonTextualObjects(boolean)}
+ * has been set {@code true}.
+ * @return List of {@link NonTextObjectInfo}
+ */
+ public List getNonTextualObjects();
+
+ /**
+ * Returns <code>true</code> if non textual objects have been found, <code>false</code> if not.
+ * @return <code>true</code> if non textual objects have been found, <code>false</code> if not.
+ */
+ public boolean hasNonTextualObjects();
+
}
|