gsapi_set_stdio() and -OutputFile=-

Hartmut Goebel <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.devel
Organization crazy-compilers.com
Message-ID <[email protected]>
HI,

I'm the developer of python-ghostscript, an interface to use the
ghostscript api from Python. ATM I try to complete a test-suite. And I'm
failing to redirect stdout using gsapi_set_stdIO(). Unfortunatly
gsapi_set_stdIo is not well documented.

The output-device I'm using is bmp16.

If passing -OutputFile=-, the image data is written to the stdout
instead of being passed to the stdout-function I've set with
gsapi_set_stdio().

And when leaving -Outputfile away, I get the error:
   GPL Ghostscript 9.14: Could not open the file .
   GPL Ghostscript 9.14: Unrecoverable error, exit code 1


On IRC, Robin Watts already answered:

> That doesn't entirely surprise me.

> This is *not* my area really, but I thought that the purpose of the
stdout redirection was so you could redirect the backchannel stuff from
postscript.

> When you use -OutputFile=- that's an instruction to the device, so a
different kettle of monkeys.


So is there some way to make the bmp16-device to use the stdout_fn?
Or which other device should I use?
If this does not help, I'd need some other test, eg. a small postscript
file writing "Hello World" to stdout. Any idea for this?


-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | [email protected]               |
| www.crazy-compilers.com | compilers which you thought are impossible |
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.