Browse Source

fixing task verbose message, simpler output file name detection, readme reflecting it

master
Gustavo Neves 8 years ago
parent
commit
e895ecf8b2
2 changed files with 24 additions and 26 deletions
  1. +15
    -14
      README.md
  2. +9
    -12
      pdfScale.sh

+ 15
- 14
README.md View File

@@ -176,20 +176,21 @@ pdfscale v2.0.0 - Verbose Execution
```
```
$ pdfscale -v -v -s 0.9 ../input-nup.pdf "../My Glorius PDF"
2017-05-14:23:43:46 | pdfscale v2.0.0 - Verbose Execution
2017-05-14:23:43:46 | Input File: ../input-nup.pdf
2017-05-14:23:43:46 | Output File: ../My Glorius PDF.pdf
2017-05-14:23:43:46 | Get Page Size: Adaptive Enabled
2017-05-14:23:43:46 | Method: Cat + Grep
2017-05-14:23:43:46 | Failed
2017-05-14:23:43:46 | Method: Mac Quartz mdls
2017-05-14:23:43:46 | Source Width: 842 postscript-points
2017-05-14:23:43:46 | Source Height: 595 postscript-points
2017-05-14:23:43:46 | Scale Factor: 0.9 (manual)
2017-05-14:23:43:46 | Translation X: 46.777310
2017-05-14:23:43:46 | Translation Y: 33.055225
2017-05-14:23:43:46 | Run Scaling: -10 %
2017-05-14:23:43:47 | Final Status: File created successfully
2017-05-14:23:55:33 | pdfscale v2.0.0 - Verbose Execution
2017-05-14:23:55:33 | Single Task: Scale PDF Contents
2017-05-14:23:55:33 | Input File: ../input-nup.pdf
2017-05-14:23:55:33 | Output File: ../My Glorius PDF.pdf
2017-05-14:23:55:33 | Get Page Size: Adaptive Enabled
2017-05-14:23:55:33 | Method: Cat + Grep
2017-05-14:23:55:33 | Failed
2017-05-14:23:55:33 | Method: Mac Quartz mdls
2017-05-14:23:55:33 | Source Width: 842 postscript-points
2017-05-14:23:55:33 | Source Height: 595 postscript-points
2017-05-14:23:55:33 | Scale Factor: 0.9 (manual)
2017-05-14:23:55:33 | Translation X: 46.777310
2017-05-14:23:55:33 | Translation Y: 33.055225
2017-05-14:23:55:33 | Run Scaling: -10 %
2017-05-14:23:55:33 | Final Status: File created successfully
```
```
$ pdfscale -v -r a2 ../input.pdf


+ 9
- 12
pdfScale.sh View File

@@ -203,20 +203,17 @@ getOptions() {
isFile "$INFILEPDF" || initError "Input file not found: $INFILEPDF" $EXIT_FILE_NOT_FOUND
printVersion 1 'verbose'
if isEmpty "$2"; then
if isMixedMode; then
vprint " Mixed Tasks: Resize & Scale"
OUTFILEPDF="${INFILEPDF%.pdf}.$(uppercase $RESIZE_PAPER_TYPE).SCALED.pdf"
elif isResizeMode; then
vprint " Single Task: Resize PDF Paper"
OUTFILEPDF="${INFILEPDF%.pdf}.$(uppercase $RESIZE_PAPER_TYPE).pdf"
else
vprint " Single Task: Scale PDF Contents"
OUTFILEPDF="${INFILEPDF%.pdf}.SCALED.pdf"
fi
if isMixedMode; then
vprint " Mixed Tasks: Resize & Scale"
isEmpty "$2" && OUTFILEPDF="${INFILEPDF%.pdf}.$(uppercase $RESIZE_PAPER_TYPE).SCALED.pdf"
elif isResizeMode; then
vprint " Single Task: Resize PDF Paper"
isEmpty "$2" && OUTFILEPDF="${INFILEPDF%.pdf}.$(uppercase $RESIZE_PAPER_TYPE).pdf"
else
OUTFILEPDF="${2%.pdf}.pdf"
vprint " Single Task: Scale PDF Contents"
isEmpty "$2" && OUTFILEPDF="${INFILEPDF%.pdf}.SCALED.pdf"
fi
isNotEmpty "$2" && OUTFILEPDF="${2%.pdf}.pdf"
}




Loading…
Cancel
Save