aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-common/src/main/java/at/gv
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-12-12 07:50:25 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-12-12 07:50:25 +0100
commit65eb7054679d63a4f519bd31eb37805666e6fef8 (patch)
tree132ec9504a268e44e801e6bd1c26fcc49bd57e7d /pdf-as-common/src/main/java/at/gv
parent57ffbe830705003caa2af2e12f7e38c38d3a2ff8 (diff)
downloadpdf-as-4-65eb7054679d63a4f519bd31eb37805666e6fef8.tar.gz
pdf-as-4-65eb7054679d63a4f519bd31eb37805666e6fef8.tar.bz2
pdf-as-4-65eb7054679d63a4f519bd31eb37805666e6fef8.zip
added PDF/A-3b support, and PDF/A version detection
Diffstat (limited to 'pdf-as-common/src/main/java/at/gv')
-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;
+ }
}