diff options
author | Serge V Shistarev <s.shistarev@i-wire.net> | 2014-05-07 14:16:14 +0900 |
---|---|---|
committer | Serge V Shistarev <s.shistarev@i-wire.net> | 2014-05-07 14:16:14 +0900 |
commit | a339269aceb4555d5ab8068b26d26ec7ab7711aa (patch) | |
tree | d9577547e1ff6b215054b8b80aae7cef54ae3fb6 | |
parent | 03370b7088a5b6cc6132726a6ef59623ede28b8f (diff) | |
download | ricoh-sp100-a339269aceb4555d5ab8068b26d26ec7ab7711aa.tar.gz |
Version change, MS-style EOL added
-rw-r--r-- | RICOH_Aficio_SP_100.ppd | 4 | ||||
-rwxr-xr-x | pstoricohddst-gdi | 83 |
2 files changed, 46 insertions, 41 deletions
diff --git a/RICOH_Aficio_SP_100.ppd b/RICOH_Aficio_SP_100.ppd index a0a2ba1..58210d7 100644 --- a/RICOH_Aficio_SP_100.ppd +++ b/RICOH_Aficio_SP_100.ppd @@ -1,6 +1,6 @@ *PPD-Adobe: "4.3" *%%%% PPD file for Ricoh Aficio SP 100 with CUPS. -*%%%% Created by Serge V Shistarev from PPD built for Ricoh Aficio SP 1000S +*%%%% Created by Serge V Shistarev from PPD built for Ricoh Aficio SP 100 *FormatVersion: "4.3" *FileVersion: "1.0" *LanguageVersion: English @@ -10,7 +10,7 @@ *Manufacturer: "Ricoh" *ModelName: "Ricoh Aficio SP 100" *ShortNickName: "Ricoh Aficio SP 100" -*NickName: "Ricoh Aficio SP 100, pstoricohddst-gdi 0.4 alpha" +*NickName: "Ricoh Aficio SP 100, pstoricohddst-gdi 0.5 alpha" *PSVersion: "(3010.000) 0" *LanguageLevel: "3" *ColorDevice: False diff --git a/pstoricohddst-gdi b/pstoricohddst-gdi index e10c5d8..e30351d 100755 --- a/pstoricohddst-gdi +++ b/pstoricohddst-gdi @@ -34,12 +34,16 @@ user="$2" ptitle="$3" my="$0" +# MS-style EOL +e=$(echo -en "\r") + # 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 +[ "${DEBUG}" = "yes" ] && exec >$uid/output.stream #> >(tee $uid/output.stream) [ -x "$(which inotifywait)" ] && { log "Asynchronous variant" @@ -51,13 +55,13 @@ mkdir -p $uid [ "$stage" = "empty" ] && { log "1st stage. Flushing PJL header" cat <<EOF -%-12345X@PJL -@PJL SET TIMESTAMP=$ddate -@PJL SET FILENAME=Document -@PJL SET COMPRESS=JBIG -@PJL SET USERNAME=$user -@PJL SET COVER=OFF -@PJL SET HOLD=OFF +%-12345X@PJL$e +@PJL SET TIMESTAMP=$ddate$e +@PJL SET FILENAME=Document$e +@PJL SET COMPRESS=JBIG$e +@PJL SET USERNAME=$user$e +@PJL SET COVER=OFF$e +@PJL SET HOLD=OFF$e EOF stage="printing" @@ -65,7 +69,7 @@ EOF [ "$page" = "999999999-page.pbm" ] && { log "Last stage. Flushing PJL footer" cat <<EOF -@PJL EOJ +@PJL EOJ$e %-12345X EOF pid=`ps ax | grep $uid | grep -v grep | awk ' { print $1 } '` @@ -84,15 +88,15 @@ EOF # Flushing page header cat <<EOF -@PJL SET PAGESTATUS=START -@PJL SET COPIES=1 -@PJL SET MEDIASOURCE=AUTO -@PJL SET MEDIATYPE=PLAINRECYCLE -@PJL SET PAPER=A4 -@PJL SET PAPERWIDTH=$xs -@PJL SET PAPERLENGTH=$ys -@PJL SET RESOLUTION=600 -@PJL SET IMAGELEN=$jsize +@PJL SET PAGESTATUS=START$e +@PJL SET COPIES=1$e +@PJL SET MEDIASOURCE=AUTO$e +@PJL SET MEDIATYPE=PLAINRECYCLE$e +@PJL SET PAPER=A4$e +@PJL SET PAPERWIDTH=$xs$e +@PJL SET PAPERLENGTH=$ys$e +@PJL SET RESOLUTION=600$e +@PJL SET IMAGELEN=$jsize$e EOF log "Flushing image $page" @@ -101,15 +105,16 @@ EOF # Flushing page footer # TODO: pixelcount for toner estimate cat <<EOF -@PJL SET DOTCOUNT=1132782 -@PJL SET PAGESTATUS=END +@PJL SET DOTCOUNT=1132782$e +@PJL SET PAGESTATUS=END$e EOF } done ) & # Converting from PostScript to PostScript-monochrome, then to PBM image format (per page) - gs -sDEVICE=ps2write -sOutputFile=- -r600 -dQUIET -dBATCH -dNOPAUSE - | gs -sDEVICE=pbmraw -sOutputFile=${uid}/%03d-page.pbm -r600 -dQUIET -dBATCH -dNOPAUSE - + #gs -sDEVICE=ps2write -sOutputFile=- -r600 -dQUIET -dBATCH -dNOPAUSE - | + gs -sDEVICE=pbmraw -sOutputFile=${uid}/%03d-page.pbm -r600 -dQUIET -dBATCH -dNOPAUSE - stop wait @@ -124,13 +129,13 @@ EOF log "Conversion complete" cat <<EOF -%-12345X@PJL -@PJL SET TIMESTAMP=$ddate -@PJL SET FILENAME=Document -@PJL SET COMPRESS=JBIG -@PJL SET USERNAME=$user -@PJL SET COVER=OFF -@PJL SET HOLD=OFF +%-12345X@PJL$e +@PJL SET TIMESTAMP=$ddate$e +@PJL SET FILENAME=Document$e +@PJL SET COMPRESS=JBIG$e +@PJL SET USERNAME=$user$e +@PJL SET COVER=OFF$e +@PJL SET HOLD=OFF$e EOF for page in ${uid}/*-page.pbm; do @@ -148,15 +153,15 @@ EOF # Flushing page header cat <<EOF -@PJL SET PAGESTATUS=START -@PJL SET COPIES=1 -@PJL SET MEDIASOURCE=AUTO -@PJL SET MEDIATYPE=PLAINRECYCLE -@PJL SET PAPER=A4 -@PJL SET PAPERWIDTH=$xs -@PJL SET PAPERLENGTH=$ys -@PJL SET RESOLUTION=600 -@PJL SET IMAGELEN=$jsize +@PJL SET PAGESTATUS=START$e +@PJL SET COPIES=1$e +@PJL SET MEDIASOURCE=AUTO$e +@PJL SET MEDIATYPE=PLAINRECYCLE$e +@PJL SET PAPER=A4$e +@PJL SET PAPERWIDTH=$xs$e +@PJL SET PAPERLENGTH=$ys$e +@PJL SET RESOLUTION=600$e +@PJL SET IMAGELEN=$jsize$e EOF # Flushing image @@ -165,14 +170,14 @@ EOF # Flushing page footer # TODO: pixelcount for toner estimate cat <<EOF -@PJL SET DOTCOUNT=1132782 -@PJL SET PAGESTATUS=END +@PJL SET DOTCOUNT=1132782$e +@PJL SET PAGESTATUS=END$e EOF done # Flushing PJL footer cat <<EOF -@PJL EOJ +@PJL EOJ$e %-12345X EOF |