Browse Source

get working with GNU bc

master
parent
commit
9fd6c17da7
  1. 4
      pdfresize/pdfresize.sh

4
pdfresize/pdfresize.sh

@ -20,8 +20,8 @@ input_w=`echo $size | sed -e 's;x.*$;;'`
input_h=`echo $size | sed -e 's;^.*x;;'`
# calculate new size
output_w=`(echo "scale = 0"; echo "$input_w * $scale" ) | @l_prefix@/bin/bc - | sed -e 's;\..*;;'`
output_h=`(echo "scale = 0"; echo "$input_h * $scale" ) | @l_prefix@/bin/bc - | sed -e 's;\..*;;'`
output_w=`(echo "scale = 0"; echo "$input_w * $scale" ) | @l_prefix@/bin/bc | sed -e 's;\..*;;'`
output_h=`(echo "scale = 0"; echo "$input_h * $scale" ) | @l_prefix@/bin/bc | sed -e 's;\..*;;'`
# perform resizing with the help of Ghostscript
@l_prefix@/bin/gs \

Loading…
Cancel
Save