Jump to content

Problem W/ PDF Downloads In IE


refiking

Recommended Posts

So what does happen ?

try this

<?php
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/pdf" );
header("Content-Disposition: attachment; filename=\"".$file."\";");
header("Content-Transfer-Encoding:­ binary");
$filesize = filesize(newfilelocation);
header("Content-Length: ".$filesize);
readfile($newfilelocation);
exit;
?> 

works for me

[sCRIPT] http://madtechiesupport.com/freaks/downloadpdf.php

[PDF] http://madtechiesupport.com/freaks/test.pdf

 

 

<?php
$file = "test.pdf";
$newfilelocation = "test.pdf";

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header ("Content-Type: application/pdf" );
header("Content-Disposition: attachment; filename=\"".$file."\";");
header("Content-Transfer-Encoding:­ binary");
$filesize = filesize($newfilelocation);
header("Content-Length: ".$filesize);
readfile($newfilelocation);
exit;
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.