Browse Source

prettier -i info mode

master
Gustavo Neves 8 years ago
parent
commit
62da2539c7
2 changed files with 19 additions and 13 deletions
  1. +9
    -7
      README.md
  2. +10
    -6
      pdfScale.sh

+ 9
- 7
README.md View File

@@ -11,14 +11,16 @@ A temporary file is used in `mixed mode`, at the target location.

#### Checking File Information
```
$ ./pdfScale.sh -i ../input-nup.A0.SCALED.pdf
$ ./pdfScale.sh -i ../input-nup.pdf
pdfScale.sh v2.0.0 - Paper Sizes
File: input-nup.A0.SCALED.pdf
Paper Type: A0 Landscape
------------+----WIDTH-+-HEIGHT-----------
Points | 3370 | 2384
Milimeters | 1189 | 841
Inches | 46.81 | 33.11
------------+-----------------------------
File | input-nup.pdf
Paper Type | A4 Landscape
------------+-----------------------------
| WIDTH x HEIGHT
Points | 842 x 595
Milimeters | 297 x 210
Inches | 11.69 x 8.26
```
#### Resize to A0 and Scale by 1.05 (+5%)
```


+ 10
- 6
pdfScale.sh View File

@@ -137,12 +137,16 @@ printPDFSizes() {
getPageSize || initError "Could not get pagesize!"
local paperType="$(getGSPaperName $PGWIDTH $PGHEIGHT)"
isEmpty "$paperType" && paperType="NOT Detected"
printf " File: %s\n" "$(basename "$INFILEPDF")"
printf " Paper Type: %s\n" "$paperType"
printf '%s\n' "------------+----WIDTH-+-HEIGHT-----------"
printf " Points | %+8s | %-8s\n" "$PGWIDTH" "$PGHEIGHT"
printf " Milimeters | %+8s | %-8s\n" "$(pointsToMilimeters $PGWIDTH)" "$(pointsToMilimeters $PGHEIGHT)"
printf " Inches | %+8s | %-8s\n" "$(pointsToInches $PGWIDTH)" "$(pointsToInches $PGHEIGHT)"
#printf '%s\n' "-----+------+----WIDTH-+-HEIGHT-----------"
printf '%s\n' "------------+-----------------------------"
printf " File | %s\n" "$(basename "$INFILEPDF")"
printf " Paper Type | %s\n" "$paperType"
printf '%s\n' "------------+-----------------------------"
#printf '%s\n' "------------+----WIDTH-+-HEIGHT-----------"
printf '%s\n' " | WIDTH x HEIGHT"
printf " Points | %+8s x %-8s\n" "$PGWIDTH" "$PGHEIGHT"
printf " Milimeters | %+8s x %-8s\n" "$(pointsToMilimeters $PGWIDTH)" "$(pointsToMilimeters $PGHEIGHT)"
printf " Inches | %+8s x %-8s\n" "$(pointsToInches $PGWIDTH)" "$(pointsToInches $PGHEIGHT)"
exit $EXIT_SUCCESS
fi
return $EXIT_SUCCESS


Loading…
Cancel
Save