default PDI definition moved to cfg file

This commit is contained in:
fritz-hh
2014-01-05 22:01:45 +01:00
parent ab994b32ee
commit 10a3d26291
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -20,3 +20,6 @@ TMP="./tmp" # location of the temporary files (one sub-folder will be created
OCR_PAGE="$SRC/ocrPage.sh" # path to the script aimed at OCRing one page
JHOVE="./jhove/bin/JhoveApp.jar" # java SW for validating the final PDF/A
JHOVE_CFG="./jhove/conf/jhove.conf" # location of the jhove config file
# other
DEFAULT_DPI=300 # dpi value used as fall back if the page dpi cannot be determined
+3 -3
View File
@@ -33,7 +33,7 @@ FORCE_OCR="${14}" # Force to OCR, even if the page already contains fonts
# Param 1: page number
# Param 2: PDF page width in pt
# Param 3: PDF page height in pt
# Param 4: temp file path (Path of the file in which the output should be written)
# Param 4: temporary file path (Path of the file in which the output should be written)
# Output: A file (<pagenum>-img-characteristics.txt) containing the characteristics of the embedded image
# Structure of the file:
# <dpi> <colorspace>
@@ -142,12 +142,12 @@ if [ "$ret_code" -eq "1" -a "$FORCE_OCR" -eq "0" ]; then
echo "Page $page: Exiting... (Use the -f option to force OCRing, even though fonts are available in the input file)" && exit $EXIT_BAD_INPUT_FILE
elif [ "$ret_code" -eq "1" -a "$FORCE_OCR" -eq "1" ]; then
colorspaceCurImg="sRGB"
dpi=300
dpi=$DEFAULT_DPI
[ $VERBOSITY -ge $LOG_WARN ] && echo "Page $page: OCRing anyway, assuming a default resolution of $dpi dpi"
# in case the page contains more than one image, warn the user but go on with default parameters
elif [ "$ret_code" -eq "2" ]; then
colorspaceCurImg="sRGB"
dpi=300
dpi=$DEFAULT_DPI
[ $VERBOSITY -ge $LOG_WARN ] && echo "Page $page: Continuing anyway, assuming a default resolution of $dpi dpi"
else
# read the image characteristics from the file