Could @KennethNielsen try to see if this fixes #1089?
Fix writing pdf on stdout
Writing on file-like objects broke object cross-references if
anything else had been written on the same stream before. On Linux
writing on sys.stdout failed because sys.stdout.tell() raises
an error; this is worked around by using a BytesIO object.
This looks like a good solution.
Hallo @jkseppan and thank you very much for working on this (must admit that I didn't feel too positive about being able to do it myself after opening the ~2500 lines pdf backend file ;) ). I will try to get around to test it tomorrow or in the weekend.
@jkseppan I have now tested this by saving a simple figure to stdout and piping the output to a file. I have done this on both a Debian and Red Hat based linux distribution (Ubuntu 12.04 and Fedora 16 respective) and it works like a charm. Thanks once again.
Great! I'm going to merge this.