diff options
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas')
3 files changed, 10 insertions, 11 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java index b0b45464..7a67160a 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java @@ -28,6 +28,8 @@ import at.gv.egiz.pdfas.lib.api.IConfigurationConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Map; + public class PlaceholderConfiguration extends SpecificBaseConfiguration implements IConfigurationConstants { @@ -57,8 +59,9 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration { logger.info("SelectedProfileID in ProfileConfEnabled: "+selectedProfileID); String profileMatch = SIG_OBJECT+SEPERATOR+selectedProfileID+SEPERATOR+PLACEHOLDER_SEARCH_ENABLED; - if (configuration.hasValue(profileMatch)) { - String value = configuration.getValue(profileMatch); + if (configuration.getValuesPrefix(profileMatch)!=null) { + Map<String, String> map = configuration.getValuesPrefix(profileMatch); + String value = map.get(profileMatch); if (value.equalsIgnoreCase(TRUE)) { logger.info("Configuration has Value: "+value); return true; @@ -68,5 +71,3 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration } } - - diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java index 455077a8..f511525d 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java @@ -70,14 +70,13 @@ public class PlaceholderFilter implements IConfigurationConstants, .extract(status.getPdfObject(), placeholderID, placeholderMode); return signaturePlaceholderData; - } else + } else if (status.getPlaceholderConfiguration().isProfileConfigurationEnabled(status.getRequestedSignature().getSignatureProfileID())) { //filter for local placeholder in selected profiles - if (status.getPlaceholderConfiguration().isProfileConfigurationEnabled(status.getRequestedSignature().getSignatureProfileID())) { - PlaceholderExtractor extractor = status.getBackend() + PlaceholderExtractor extractor = status.getBackend() .getPlaceholderExtractor(); String placeholderID = settings.getValue(PLACEHOLDER_ID); String placeholderModeString = settings.getValue(PLACEHOLDER_MODE); - int placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE; + int placeholderMode = PLACEHOLDER_MATCH_MODE_SORTED; if (placeholderModeString != null) { try { placeholderMode = Integer.parseInt(placeholderModeString); @@ -96,9 +95,6 @@ public class PlaceholderFilter implements IConfigurationConstants, .extract(status.getPdfObject(), placeholderID, placeholderMode); return signaturePlaceholderData; - - - } return null; }}
\ No newline at end of file diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java index b851af88..01a3a298 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java @@ -115,10 +115,12 @@ public class TableFactory implements IProfileConstants { // ".value."; // ArrayList table_def_keys = settings_.getKeys(table_key); Vector<String> table_defs = configuration.getFirstLevelKeys(table_key); + if (table_defs == null) { return null; } + Table sig_table = new Table(tableID); //SignatureProfileSettings profile = createProfile(profileID); boolean found_style = false; |