HTTP header for sending PDF, problem in Firefox

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-05-13T13:54:36Z Indexed on 2010/05/13 14:04 UTC
Read the original article Hit count: 361

Filed under:
|

In windows when i save a pdf with firefox adobe reader plugin ocurs this problem. The file saved is: http://www.example.com/opendocument.php_doc=._docs_doc01

My headers are:

header('Content-type: application/pdf');
//header('Content-Disposition: inline; filename=doc01.pdf');
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($pdf));

Original call is:

http://www.example.com/opendocument.php?doc=./docs/doc01.pdf

I'm not interest on attachment header. I must open into the website, not download o external window.

Any idea?

© Stack Overflow or respective owner

Related posts about php

Related posts about http-header-fields