diff options
author | Serge V Shistarev <madlynxed@gmail.com> | 2014-07-01 13:42:16 +0900 |
---|---|---|
committer | Serge V Shistarev <madlynxed@gmail.com> | 2014-07-01 13:42:16 +0900 |
commit | d9f55de89ebc318bde3c267b4386cb49875e64b9 (patch) | |
tree | 3c433b6f7bd3a4c6f6944f09d71748fc8e01cc02 | |
parent | a339269aceb4555d5ab8068b26d26ec7ab7711aa (diff) | |
parent | 8b32784283cb14d5c9845f6d7fa931a118b3b851 (diff) | |
download | ricoh-sp100-d9f55de89ebc318bde3c267b4386cb49875e64b9.tar.gz |
Merge pull request #18 from knuta/master
Add support for other paper sizes
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | pstoricohddst-gdi | 14 |
2 files changed, 13 insertions, 3 deletions
@@ -1,6 +1,6 @@ Driver and CUPS filter for Ricoh Aficio SP-100 family laser printers Current restrictions: - - A4 - hardcoded + - Only tested with A4 and Letter paper - 600 dpi - hardcoded - Does not count dots -- 1132782 per page hardcoded diff --git a/pstoricohddst-gdi b/pstoricohddst-gdi index e30351d..a580350 100755 --- a/pstoricohddst-gdi +++ b/pstoricohddst-gdi @@ -33,6 +33,16 @@ user="$2" # Page title (not used at this time, "Document" instead) ptitle="$3" my="$0" +options="$5" + +pagesize="A4" +for opt in $options; do + case "$opt" in + PageSize=*) + pagesize="$(echo "${opt#PageSize=}" | tr a-z A-Z)" + ;; + esac +done # MS-style EOL e=$(echo -en "\r") @@ -92,7 +102,7 @@ EOF @PJL SET COPIES=1$e @PJL SET MEDIASOURCE=AUTO$e @PJL SET MEDIATYPE=PLAINRECYCLE$e -@PJL SET PAPER=A4$e +@PJL SET PAPER=$pagesize$e @PJL SET PAPERWIDTH=$xs$e @PJL SET PAPERLENGTH=$ys$e @PJL SET RESOLUTION=600$e @@ -157,7 +167,7 @@ EOF @PJL SET COPIES=1$e @PJL SET MEDIASOURCE=AUTO$e @PJL SET MEDIATYPE=PLAINRECYCLE$e -@PJL SET PAPER=A4$e +@PJL SET PAPER=pagesize$e @PJL SET PAPERWIDTH=$xs$e @PJL SET PAPERLENGTH=$ys$e @PJL SET RESOLUTION=600$e |