diff options
author | Didier Raboud <didier@raboud.com> | 2010-05-23 00:07:10 +0200 |
---|---|---|
committer | Didier Raboud <didier@raboud.com> | 2010-05-23 00:07:10 +0200 |
commit | f56211f0ff4ddf9371ebc4c31e8f95df1fc81a5c (patch) | |
tree | a24f15ea2fc96e0688e96c58e35dde7adeaef3fb /test/foomatic-test-renderer | |
parent | b834bd56528993fa05a5645da808227aee3e9de7 (diff) | |
parent | 014f0e14a3c6a044d99a67c8f4e1c4065452479e (diff) |
Merge branch 'upstream'
Conflicts:
debian/README.Debian
debian/changelog
debian/control
debian/copyright
debian/foomatic-filters.config
debian/foomatic-filters.postinst
debian/foomatic-filters.postrm
debian/foomatic-filters.templates
debian/parseconfig.pl
debian/po/de.po
debian/po/fr.po
debian/po/ja.po
debian/po/nl.po
debian/po/pt_BR.po
debian/po/templates.pot
debian/po/tr.po
debian/rules
Diffstat (limited to 'test/foomatic-test-renderer')
-rwxr-xr-x | test/foomatic-test-renderer | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/foomatic-test-renderer b/test/foomatic-test-renderer new file mode 100755 index 0000000..de3401e --- /dev/null +++ b/test/foomatic-test-renderer @@ -0,0 +1,53 @@ +#!/bin/sh + +# This is foomatic-test-renderer, a dummy renderer executable for testing +# and debugging foomatic-rip. + +# To use it, create a test PPD file with lines like +# +# *cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip" +# *FoomaticRIPCommandLine: "foomatic-test-renderer%A%B%C%Z" +# +# and use foomatic-rip with this PPD file. If you do this via a print queue +# point the output of the queue into a file +# +# This program does nothing more than outputting the unchanged input data +# and after that the command line with which it was called in a PostScript +# comment (so one can still display the output as PostScript if the input +# was PostScript). +# +# With the option "-p OPTION=VALUE" supplied one or more times, a PJL +# header with appropriate options and also PJL to close the job will be added +# Supply "-p" in the end of the command line to generate a PJL header +# without option settings + +commandline=$* + +output="`cat` +% $0 $commandline" + +pjl=0 +while [ -n "$*" ]; do + arg=$1 + shift + if [ "$arg" = "-p" ]; then + if [ "$pjl" = "0" ]; then + pjl=1 + printf "\033%%-12345X" + #printf "@PJL\r\n" + fi + if [ -n "$1" ]; then + printf "@PJL SET $1\r\n" + shift + fi + fi +done +if [ "$pjl" = "1" ]; then + printf "@PJL ENTER LANGUAGE=POSTSCRIPT\r\n" +fi + +echo "$output" + +if [ "$pjl" = "1" ]; then + printf "\033%%-12345X@PJL EOJ\r\n" +fi |