I am generating a PDF on the fly, this take upto several seconds, what I would like to do is get the browser to start the download before the pdf is generated so the user isn't sitting around wondering if it is working.
Idea I had is to flush the headers then generate and output the pdf, however I can't flush without something to flush.
So would a space at the beginning affect/invalidate the pdf file. ie " %PDF-1.4" instead of "%PDF-1.4"
Its PHP5.2 using the Zend pdf generator.
Update
As far as I can tell it does not affect the readability of the pdf, but it also doesn't make any difference to IE.
So the best solution would be to do a download site style holding page which just meta-refeshes or js-redirected to the actual pdf generation script.
Or perhaps This nice little hack