|
22 | 22 | # |
23 | 23 | ################################################################ |
24 | 24 |
|
25 | | -VERSION="2.6.2" |
| 25 | +VERSION="2.6.3" |
26 | 26 |
|
27 | 27 |
|
28 | 28 | ###################### EXTERNAL PROGRAMS ####################### |
@@ -77,6 +77,7 @@ RESIZE_HEIGHT="" # Resized PDF Page Height |
77 | 77 | PAGE_RANGE="" # Pages to be processed (feeds -sPageList) |
78 | 78 | PAGE_COUNT="" # To store the PDF page count |
79 | 79 | PAGE_SIZES=() # To list all page sizes |
| 80 | +EXPLODE_SUFFIX='.Page%d' # Suffix for exploded pages |
80 | 81 |
|
81 | 82 | ############################# Image resolution (dpi) |
82 | 83 | IMAGE_RESOLUTION=300 # 300 is /Printer default |
@@ -157,8 +158,9 @@ main() { |
157 | 158 | initMain " Mixed Tasks: Resize & Scale" |
158 | 159 | local tempFile="" |
159 | 160 | local tempSuffix="$RANDOM$RANDOM""_TEMP_$RANDOM$RANDOM.pdf" |
160 | | - outputFile="$OUTFILEPDF" # backup outFile name |
161 | | - tempFile="${INFILEPDF%.pdf}.$tempSuffix" # set a temp file name |
| 161 | + outputFile="$OUTFILEPDF" # backup outFile name |
| 162 | + tempFile="${OUTFILEPDF%.pdf}" # set temp file, remove .pdf extension |
| 163 | + tempFile="${tempFile%$EXPLODE_SUFFIX}.$tempSuffix" # remove explode and add temp suffix |
162 | 164 | if isFile "$tempFile"; then |
163 | 165 | printError $'Error! Temporary file name already exists!\n'"File: $tempFile"$'\nAborting execution to avoid overwriting the file.\nPlease Try again...' |
164 | 166 | exit $EXIT_TEMP_FILE_EXISTS |
@@ -223,7 +225,7 @@ initMain() { |
223 | 225 | vprint " Dry-Run: $sim" |
224 | 226 | vPrintFileInfo |
225 | 227 | local exp="Disabled" |
226 | | - isExplodeMode && local exp="Enabled" |
| 228 | + isExplodeMode && exp="Enabled" |
227 | 229 | vprint " Explode PDF: $exp" |
228 | 230 | getPageSize |
229 | 231 | vPrintRange |
|
0 commit comments