diff --git a/pstoricohddst-gdi b/pstoricohddst-gdi index 78dc552..e7f0f16 100755 --- a/pstoricohddst-gdi +++ b/pstoricohddst-gdi @@ -1,14 +1,22 @@ #!/bin/bash +# Username user="$2" -ptitle="$3" -ddate="`LC_ALL=en_US.UTF-8 date '+%Y/%m/%d %H:%M:%S'`" -uid="/tmp/pstoricohddst-gdi-`uuidgen`" +# Page title (not used at this time, "Document" instead) +ptitle="$3" + +# Printing date +ddate="`LC_ALL=en_US.UTF-8 date '+%Y/%m/%d %H:%M:%S'`" + +# Temporary directory +uid="/tmp/pstoricohddst-gdi-`uuidgen`" mkdir -p $uid +# Converting from PostScript to PostScript-monochrome, then to PBM image format (per page) gs -sDEVICE=psmono -sOutputFile=- -r600 -dQUIET -dBATCH -dNOPAUSE - | gs -sDEVICE=pbmraw -sOutputFile=${uid}/%d-page.pbm -r600 -dQUIET -dBATCH -dNOPAUSE - +# Flushing PJL header cat < $uid/raster.jbig + + # Taking image size jsize=`wc -c < $uid/raster.jbig` + + # Taking image dimensions read fn ft xs ys garb < <(identify $uid/raster.jbig | tr "x" " ") + # Flushing page header cat <