From 267d4702dea55cc65a7ac36c7aeed666c3fea226 Mon Sep 17 00:00:00 2001 From: Gustavo Neves Date: Sun, 14 May 2017 02:00:13 -0300 Subject: [PATCH] Adding aprox points for JIS papers --- README.md | 2 +- pdfScale.sh | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fffcec1..220cd04 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Uses ghostscript to create a scaled and or resized version of the pdf input. In `scaling mode`, the PDF paper size does not change, just the elements are scaled. In `resize mode`, the PDF paper will be changed and fit-to-page will be applied. In `mixed mode`, the PDF will first be `resized` then `scaled` with two Ghostscript calls. -A temporary file is used in `mixed mode`, at the target location. +A temporary file is used in `mixed mode`, at the target location. ## Dependencies The script uses `basename`, `cat`, `grep`, `bc`, `head` and `gs` (ghostscript). diff --git a/pdfScale.sh b/pdfScale.sh index 2537b3b..77aff15 100755 --- a/pdfScale.sh +++ b/pdfScale.sh @@ -698,13 +698,13 @@ c5 6.4 9.0 162 229 459 649 c6 4.5 6.4 114 162 323 459" sizesJIS="\ -jisb0 NA NA 1030 1456 NA NA -jisb1 NA NA 728 1030 NA NA -jisb2 NA NA 515 728 NA NA -jisb3 NA NA 364 515 NA NA -jisb4 NA NA 257 364 NA NA -jisb5 NA NA 182 257 NA NA -jisb6 NA NA 128 182 NA NA" +jisb0 NA NA 1030 1456 2920 4127 +jisb1 NA NA 728 1030 2064 2920 +jisb2 NA NA 515 728 1460 2064 +jisb3 NA NA 364 515 1032 1460 +jisb4 NA NA 257 364 729 1032 +jisb5 NA NA 182 257 516 729 +jisb6 NA NA 128 182 363 516" sizesOther="\ flsa 8.5 13.0 216 330 612 936 @@ -764,7 +764,7 @@ printPaperInfo() { getPaperInfo printPaperTable "ISO STANDARD" "$sizesISO"; echo printPaperTable "US STANDARD" "$sizesUS"; echo - printPaperTable "JIS STANDARD" "$sizesJIS"; echo + printPaperTable "JIS STANDARD *Aproximated Points" "$sizesJIS"; echo printPaperTable "OTHERS" "$sizesOther"; echo } @@ -819,6 +819,9 @@ isMixedMode() { return $FALSE } +mmToPoints() { + local calc=$(($1)) +} lowercaseChar() {