From 39223845f55cef96800be48cf80816f10a37cbe4 Mon Sep 17 00:00:00 2001 From: pdanner Date: Thu, 16 Dec 2010 10:46:19 +0000 Subject: Changed default values of signParameters.isCheckForPlaceholder() and config property enable_placeholder_search git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@713 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/gv/egiz/pdfas/commandline/Main.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') 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 + " ... [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 + " ... [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 ."); 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."); -- cgit v1.2.3