SP 204: Add 1200x600 Resolution setting

Make the resolution selectable in the PPD and take account of that selection
in pstoricohddst-gdi (keeping 600 as the default for the SP 100)

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
James Bottomley 2014-07-23 10:43:52 -07:00 committed by Serge V Shistarev
parent 60f16afe3c
commit b866c7b82d
2 changed files with 10 additions and 5 deletions

View file

@ -84,6 +84,7 @@
*OrderDependency: 10 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution 600dpi/600 DPI: "<</HWResolution[600 600]/cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*Resolution 1200x600dpi/1200x600 DPI: "<</HWResolution[1200 600]/cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"
*CloseUI: *Resolution
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(1.05)" Standard ROM

View file

@ -36,11 +36,15 @@ my="$0"
options="$5"
pagesize="A4"
resolution="600"
for opt in $options; do
case "$opt" in
PageSize=*)
pagesize="$(echo "${opt#PageSize=}" | tr a-z A-Z)"
;;
Resolution=*)
resolution=${opt#Resolution=}
resolution=${resolution%dpi}
esac
done
@ -105,7 +109,7 @@ EOF
@PJL SET PAPER=$pagesize$e
@PJL SET PAPERWIDTH=$xs$e
@PJL SET PAPERLENGTH=$ys$e
@PJL SET RESOLUTION=600$e
@PJL SET RESOLUTION=${resolution%x600}$e
@PJL SET IMAGELEN=$jsize$e
EOF
@ -123,8 +127,8 @@ EOF
) &
# 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=- -r$resolution -dQUIET -dBATCH -dNOPAUSE - |
gs -sDEVICE=pbmraw -sOutputFile=${uid}/%03d-page.pbm -r$resolution -dQUIET -dBATCH -dNOPAUSE -
stop
wait
@ -135,7 +139,7 @@ EOF
# Converting from PostScript to PostScript-monochrome, then to PBM image format (per page)
log "Converting document to pages"
gs -sDEVICE=ps2write -sOutputFile=- -r600 -dQUIET -dBATCH -dNOPAUSE - | gs -sDEVICE=pbmraw -sOutputFile=${uid}/%03d-page.pbm -r600 -dQUIET -dBATCH -dNOPAUSE -
gs -sDEVICE=ps2write -sOutputFile=- -r$resolution -dQUIET -dBATCH -dNOPAUSE - | gs -sDEVICE=pbmraw -sOutputFile=${uid}/%03d-page.pbm -r$resolution -dQUIET -dBATCH -dNOPAUSE -
log "Conversion complete"
cat <<EOF
@ -170,7 +174,7 @@ EOF
@PJL SET PAPER=$pagesize$e
@PJL SET PAPERWIDTH=$xs$e
@PJL SET PAPERLENGTH=$ys$e
@PJL SET RESOLUTION=600$e
@PJL SET RESOLUTION=${resolution%x600}$e
@PJL SET IMAGELEN=$jsize$e
EOF