Skip to content

Commit

Permalink
Fixed issue #5432: Option to export responses to PDF by participant f…
Browse files Browse the repository at this point in the history
…ails when using IE

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@10924 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Sep 2, 2011
1 parent daffb71 commit 66a1a34
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions application/controllers/printanswers.php
Expand Up @@ -281,32 +281,7 @@ function view($surveyid,$printableexport=FALSE)
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

$sExportFileName=sanitize_filename($surveyname);
if (preg_match("/MSIE/i", $_SERVER["HTTP_USER_AGENT"]))
{
/*
* $dateiname = $InternalReferenceNumber.'.pdf';
$pdf->Output($dateiname, 'F');
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="'.basename($dateiname).'"');
readfile($dateiname);
*/

header("Content-type: application/pdf");
header("Content-Transfer-Encoding: binary");


header("Content-Disposition: Attachment; filename=\"". $sExportFileName ."-".$surveyid.".pdf\"");

$this->pdf->Output($this->config->item('tempdir').'/'.$clang->gT($surveyname)."-".$surveyid.".pdf", "F");
header("Content-Length: ". filesize($this->config->item('tempdir').'/'.$sExportFileName."-".$surveyid.".pdf"));
readfile($this->config->item('tempdir').'/'.$sExportFileName."-".$surveyid.".pdf");
unlink($this->config->item('tempdir').'/'.$sExportFileName."-".$surveyid.".pdf");

}
else
{
$this->pdf->Output($sExportFileName."-".$surveyid.".pdf","D");
}
$this->pdf->Output($sExportFileName."-".$surveyid.".pdf","D");
}


Expand Down

0 comments on commit 66a1a34

Please sign in to comment.