Oh yes, I see what you think about: I should have realized that, although what I seemed, if the PDF is at least sometimes delivered, it means that dompdf DID work!
From this, and from other tests, I actually conclude that surely dompdf is never concerned, in render() nor in stream() methods.
Let me explain all that make me think so.
First, about IE itself, thanks to a remote job partner I'm sometimes working with, and who accepted to test for me, on its local system (Win7, like me):
. he primarily observed the same "infinite loop"
. then he realized that its IE version was only 9 (yes, we don't like IE very much :-), and updated to IE10: immediately, all worked fine for him!
. in other words, only MY OWN IE10 version fails, and only with MY OWN Apache server (remember: the application works fine with my IE10 on a Linux server)
Second, about IE too:
. in the application, preceding steps include user choices which cause a search process, and leads to invoke the dompdf-concerned page to PDFy the search results
. now I sometimes get IE10 hanging during this search process: kill it and launch anew make it work fine at this step, but the problem randomly appears anew (obviously, this never happens with FF)
Then, about dompdf:
. as you suggested, I tried commenting out the header("Content-length... line in class.pdf.php (BTW, note that for me it is located at line 3071, not 3083): did not change anything
. from your suggestion I had another idea and also tried adding the option 'compress'=>0 in the stream() method: same
Now, about both IE and dompdf:
. looking deeper at the doc, I tried a completely separate test, usig a direct invocation by an url: dompdf.php?input_file=..., and it works fine
So definitely, I consider dompdf is never concerned, and all is due to IE10; more precisely to MY OWN configuration of IE10.
The only thing I plan to do else is to compare the exact version of my IE with my partner's one: I bet they are not same...
This time, really, let us stop investigating this. I'm sorry to have bothered you with it.
Thanks a lot for your effort.
On Friday, May 10, 2013 2:02:30 AM UTC+2, BrianS wrote:
On Thursday, May 9, 2013 12:22:08 PM UTC-4, Frédéric Barboteu wrote:I must confess I don't understand why you think this post relates to my
issue: in my case headers are not concerned, since nothing at all is
sent to the browser.
I was thinking maybe the headers were finding their way to the browser and that was causing some confusion on the browser's part. What you describe (below) with your new tests may point to this being the case, though really I'm not sure. The fact that reloading shows the PDF could indicate that content was received and cached and that reloading stopped the download process and loaded the cached content.
One way to test this would be to disable the CPDF-determined file size header. You won't get a nice download time estimate, but otherwise it should be fine. And if , not your server is doing some compression behind-the-scenes there could be a conflict between the stated size and the delivered. Would that cause this kind of problem ... I dunno. But anyway, the test: go into dompdf/lib/class.pdf.php and comment out line 3083 (should be header("Content-Length: " . mb_strlen($tmp, '8bit'));) and see what happens.