diff --git a/pstoricohddst-gdi b/pstoricohddst-gdi index 2913dd3..122d19e 100755 --- a/pstoricohddst-gdi +++ b/pstoricohddst-gdi @@ -30,74 +30,134 @@ ddate="`LC_ALL=en_US.UTF-8 date '+%Y/%m/%d %H:%M:%S'`" uid="/tmp/pstoricohddst-gdi-`uuidgen`" mkdir -p $uid -( -stage="empty" -inotifywait -q -m -r -e close_write --format '%f' $uid | grep --line-buffered 'page.pbm$' | while read page; do - # page submitted - [ "$stage" = "empty" ] && { - # 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/$page | tr "x" " ") + + # Flushing page header + cat < $uid/raster.jbig + + # Taking image size + jsize=`wc -c < $uid/raster.jbig` + + # Taking image dimensions + read fn ft xs ys garb < <(identify $page | tr "x" " ") + + # Flushing page 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/$page | tr "x" " ") - - # Flushing page header - cat <