aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java2
-rw-r--r--src/main/java/at/gv/egiz/pdfas/commandline/Main.java14
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java8
3 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java b/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java
index bb0e7ad..9a01c72 100644
--- a/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java
+++ b/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java
@@ -127,7 +127,7 @@ public class SignParameters
/**
*
*/
- protected boolean checkForPlaceholder;
+ protected boolean checkForPlaceholder = true;
/**
* The id of the placeholder which should be replaced.
diff --git a/src/main/java/at/gv/egiz/pdfas/commandline/Main.java b/src/main/java/at/gv/egiz/pdfas/commandline/Main.java
index 3595ef1..29d92b7 100644
--- a/src/main/java/at/gv/egiz/pdfas/commandline/Main.java
+++ b/src/main/java/at/gv/egiz/pdfas/commandline/Main.java
@@ -116,9 +116,9 @@ public abstract class Main
protected static final String PARAMETER_POS = "-pos";
/**
- * Command line parameter signaling to search the source document for a placeholder for the signature
+ * Command line parameter signaling to not search the source document for a placeholder for the signature
*/
- protected static final String PARAMETER_SEARCH_PLACEHOLDER = "-checkforplaceholder";
+ protected static final String PARAMETER_DISABLE_PLACEHOLDER_SEARCH = "-nosearchplaceholder";
/**
* Command line parameter selecting the id of the placeholder to use
@@ -239,7 +239,7 @@ public abstract class Main
String user_password = null;
String pos_string = null;
- boolean search_placeholder = false;
+ boolean search_placeholder = true;
String placeholderId = null;
int placeholderMatchMode = SignParameters.PLACEHOLDER_MATCH_MODE_MODERATE;
@@ -335,9 +335,9 @@ public abstract class Main
continue;
}
- if (cur_arg.equals(PARAMETER_SEARCH_PLACEHOLDER))
+ if (cur_arg.equals(PARAMETER_DISABLE_PLACEHOLDER_SEARCH))
{
- search_placeholder = true;
+ search_placeholder = false;
continue;
}
@@ -1084,7 +1084,7 @@ public abstract class Main
writer.println(" intvalue ... pagenumber must be > 0 if p>number of pages in document p-->handled like p:'new'");
writer.println(" f_algo floatvalue ... consider footerline must be >= 0 (only if y_algo is auto and p_algo is not 'new')");
- writer.println(" " + PARAMETER_SEARCH_PLACEHOLDER + " ... [optional] if set, the source document will be scanned for signature placeholder images");
+ writer.println(" " + PARAMETER_DISABLE_PLACEHOLDER_SEARCH + " ... [optional] if set, the source document will NOT be scanned for signature placeholder images");
writer.println(" " + PARAMETER_PLACEHOLDER_ID + " <id> ... [optional] search for signature placeholder images containing the given id");
writer.println(" " + PARAMETER_PLACEHOLDER_MATCH_MODE + " <" + VALUE_PLACEHOLDER_MATCH_MODE_LENIENT + "|" + VALUE_PLACEHOLDER_MATCH_MODE_MODERATE + "|" + VALUE_PLACEHOLDER_MATCH_MODE_STRICT + "> ... [optional] specify the behaviour if no matching placeholder could be found. Default is <moderate>.");
writer.println(" " + VALUE_PLACEHOLDER_MATCH_MODE_LENIENT + " ... sign in place of the first found placeholder, regardless if it matches exactly, or at the end of the document if none is found.");
@@ -1268,7 +1268,7 @@ public abstract class Main
writer.println(" " + result.getManifestCheckCode().getCode() + " - " + result.getManifestCheckCode().getMessage());
} else {
PdfAsException ex = result.getVerificationException();
- writer.println("\n Signaturprüfung für diese Signatur nicht möglich: " + ErrorCodeHelper.formErrorMessage(ex));
+ writer.println("\n Signaturpr�fung f�r diese Signatur nicht m�glich: " + ErrorCodeHelper.formErrorMessage(ex));
}
}
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
index 1cb158e..5d4fec5 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
@@ -673,7 +673,7 @@ public class PdfAsObject implements PdfAs
SettingsReader settings = SettingsReader.getInstance();
- // check sig_obj.PROFILID.enable_placeholder_search
+ // check sig_obj.PROFILEID.enable_placeholder_search
String profile = signParameters.getSignatureProfileId();
if (profile == null)
profile = defaultProfile;
@@ -685,9 +685,9 @@ public class PdfAsObject implements PdfAs
enableSearchString = settings.getValueFromKey(ENABLE_PLACEHOLDER_SEARCH_KEY);
}
- boolean enableSearch = true;
- if (enableSearchString != null && enableSearchString.trim().equalsIgnoreCase("false"))
- enableSearch = false;
+ boolean enableSearch = false;
+ if (enableSearchString != null && enableSearchString.trim().equalsIgnoreCase("true"))
+ enableSearch = true;
if (enableSearch)
{