Merge pull request #18 from knuta/master
Add support for other paper sizes
This commit is contained in:
commit
d9f55de89e
|
@ -1,6 +1,6 @@
|
||||||
Driver and CUPS filter for Ricoh Aficio SP-100 family laser printers
|
Driver and CUPS filter for Ricoh Aficio SP-100 family laser printers
|
||||||
|
|
||||||
Current restrictions:
|
Current restrictions:
|
||||||
- A4 - hardcoded
|
- Only tested with A4 and Letter paper
|
||||||
- 600 dpi - hardcoded
|
- 600 dpi - hardcoded
|
||||||
- Does not count dots -- 1132782 per page hardcoded
|
- Does not count dots -- 1132782 per page hardcoded
|
||||||
|
|
|
@ -33,6 +33,16 @@ user="$2"
|
||||||
# Page title (not used at this time, "Document" instead)
|
# Page title (not used at this time, "Document" instead)
|
||||||
ptitle="$3"
|
ptitle="$3"
|
||||||
my="$0"
|
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
|
# MS-style EOL
|
||||||
e=$(echo -en "\r")
|
e=$(echo -en "\r")
|
||||||
|
@ -92,7 +102,7 @@ EOF
|
||||||
@PJL SET COPIES=1$e
|
@PJL SET COPIES=1$e
|
||||||
@PJL SET MEDIASOURCE=AUTO$e
|
@PJL SET MEDIASOURCE=AUTO$e
|
||||||
@PJL SET MEDIATYPE=PLAINRECYCLE$e
|
@PJL SET MEDIATYPE=PLAINRECYCLE$e
|
||||||
@PJL SET PAPER=A4$e
|
@PJL SET PAPER=$pagesize$e
|
||||||
@PJL SET PAPERWIDTH=$xs$e
|
@PJL SET PAPERWIDTH=$xs$e
|
||||||
@PJL SET PAPERLENGTH=$ys$e
|
@PJL SET PAPERLENGTH=$ys$e
|
||||||
@PJL SET RESOLUTION=600$e
|
@PJL SET RESOLUTION=600$e
|
||||||
|
@ -157,7 +167,7 @@ EOF
|
||||||
@PJL SET COPIES=1$e
|
@PJL SET COPIES=1$e
|
||||||
@PJL SET MEDIASOURCE=AUTO$e
|
@PJL SET MEDIASOURCE=AUTO$e
|
||||||
@PJL SET MEDIATYPE=PLAINRECYCLE$e
|
@PJL SET MEDIATYPE=PLAINRECYCLE$e
|
||||||
@PJL SET PAPER=A4$e
|
@PJL SET PAPER=pagesize$e
|
||||||
@PJL SET PAPERWIDTH=$xs$e
|
@PJL SET PAPERWIDTH=$xs$e
|
||||||
@PJL SET PAPERLENGTH=$ys$e
|
@PJL SET PAPERLENGTH=$ys$e
|
||||||
@PJL SET RESOLUTION=600$e
|
@PJL SET RESOLUTION=600$e
|
||||||
|
|
Loading…
Reference in a new issue