New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
diagnostic output interferes with stdout redirection #464
Comments
Could you test using quiet mode ? echo "test" | xhtml2pdf -q - - >/tmp/test.pdf 2>/dev/null ; head -2 /tmp/test.pdf |
-q eliminates all output to stdout, so the generated file (/tmp/test.pdf) is empty
|
Hmm, perversely however, it's now also generating an empty file even without |
I see what happened now. xhtml2pdf was the python2 version, but python-xhtml2pdf has just been removed from Debian, leaving only the python3-xhtml2pdf package with The behaviour between the python3 and python3 versions seems quite different. But the
|
xhtml2pdf allows for stdout redirection, so
xhtml2pdf - -
receives input from stdout and sends output to stdout rather than to file.But it also generates diagnostic messages during processing so these also get sent to stdout, putting meaningless data into the pdf data stream.
e.g.
So the generated pdf is prefixed with a line "Converting - to -...".
This line should probably be sent to stderr instead of stdout.
This bug was reported at Debian Bug#592500, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=592500
The text was updated successfully, but these errors were encountered: