aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/commandline/Main.java16
1 files changed, 11 insertions, 5 deletions
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 29d92b7..4a70f3f 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 not search the source document for a placeholder for the signature
+ * Command line parameter signaling to search the source document for a placeholder for the signature
*/
- protected static final String PARAMETER_DISABLE_PLACEHOLDER_SEARCH = "-nosearchplaceholder";
+ protected static final String PARAMETER_PLACEHOLDER_SEARCH = "-searchplaceholder";
/**
* Command line parameter selecting the id of the placeholder to use
@@ -335,9 +335,15 @@ public abstract class Main
continue;
}
- if (cur_arg.equals(PARAMETER_DISABLE_PLACEHOLDER_SEARCH))
+ if (cur_arg.equals(PARAMETER_PLACEHOLDER_SEARCH))
{
- search_placeholder = false;
+ i++;
+ if (i >= args.length)
+ {
+ printNoValue(PARAMETER_PLACEHOLDER_SEARCH);
+ return;
+ }
+ search_placeholder = Boolean.parseBoolean(args[i]);
continue;
}
@@ -1084,7 +1090,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_DISABLE_PLACEHOLDER_SEARCH + " ... [optional] if set, the source document will NOT be scanned for signature placeholder images");
+ writer.println(" " + PARAMETER_PLACEHOLDER_SEARCH + " <true|false> ... [optional] if set to true, the source document will be scanned for signature placeholder images. If not set, the enable_placeholder_search value in the config file decides whether or not a search for placeholder images will be performed.");
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.");