|Just another Perl shrine|
Problem converting HTML to PDFby ehdonhon (Curate)
|on Jan 29, 2003 at 21:05 UTC||Need Help??|
ehdonhon has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks,
I'm having some difficulty with the following chunk of code, from a cgi which is intended to take whatever my web page looks like at the moment, convert it to a pdf and serve that pdf to the client:
From my debugging, I know that Image::Magick does actually read in the postscript file correctly. I also know that the $status value returned by both Read() and Write() is empty (I think that means success). Also I know that the second Write() call which outputs to STDERR does output a valid pdf file.
My problem, is that the first Write() call which should be sending output to STDOUT isn't doing anything at all! In fact, here is all the output that the web server returns from this cgi:
HTTP/1.1 200 OK Connection: close Date: Wed, 29 Jan 2003 20:50:01 GMT Server: Apache/1.3.26 (Unix) mod_perl/1.27 mod_ssl/2.8.9 OpenSSL/0.9.6e Content-Type: application/pdf Client-Date: Wed, 29 Jan 2003 20:50:48 GMT Client-Peer: 126.96.36.199:80
All its returning back are the headers. No output from the Write(). Can anybody tell me what I'm doing wrong?