aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-common/src')
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/IProfileConstants.java1
-rw-r--r--pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java26
2 files changed, 26 insertions, 1 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/IProfileConstants.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/IProfileConstants.java
index 2c2b941b..a2cee944 100644
--- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/IProfileConstants.java
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/IProfileConstants.java
@@ -92,6 +92,7 @@ public interface IProfileConstants {
public final static String SIGNFIELD_VALUE = "adobeSignFieldValue";
public final static String TIMEZONE_BASE = "timezone";
public final static String SIG_PDFA1B_VALID = "SIG_PDFA1B_VALID";
+ public final static String SIG_PDFA3B_VALID = "SIG_PDFA3B_VALID";
public final static String SIG_PDFUA_FORCE = "SIG_PDFUA_FORCE";
}
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java
index cbc1d601..b6a1b6ca 100644
--- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java
+++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java
@@ -39,6 +39,8 @@ public class SignatureProfileSettings implements IProfileConstants {
private String profileID;
+ private String pdfAVersion = null;
+
private ISettings configuration;
public SignatureProfileSettings(String profileID, ISettings configuration) {
@@ -203,8 +205,17 @@ public class SignatureProfileSettings implements IProfileConstants {
public String getProfileTimeZone() {
return this.getValue(TIMEZONE_BASE);
}
-
+
+ public void setPDFAVersion(String version) {
+ this.pdfAVersion = version;
+ }
+
public boolean isPDFA() {
+
+ if(this.pdfAVersion != null) {
+ return "1".equals(this.pdfAVersion);
+ }
+
SignatureProfileEntry entry = profileInformations.get(SIG_PDFA1B_VALID);
if (entry != null) {
String value = entry.getCaption();
@@ -221,4 +232,17 @@ public class SignatureProfileSettings implements IProfileConstants {
}
return false;
}
+
+ public boolean isPDFA3() {
+ if(this.pdfAVersion != null) {
+ return "3".equals(this.pdfAVersion);
+ }
+
+ SignatureProfileEntry entry = profileInformations.get(SIG_PDFA3B_VALID);
+ if (entry != null) {
+ String value = entry.getCaption();
+ return "true".equals(value);
+ }
+ return false;
+ }
}