コード例 #1
0
ファイル: Pdf.php プロジェクト: josl/CGE-File-Sharing
 public function sendToBrowserInline($filename)
 {
     $filename = ReportRenderer::appendExtension($filename, self::PDF_CONTENT_TYPE);
     $this->TCPDF->Output($filename, 'I');
 }
コード例 #2
0
 protected static function sendToBrowser($filename, $extension, $contentType, $content)
 {
     $filename = ReportRenderer::appendExtension($filename, $extension);
     ProxyHttp::overrideCacheControlHeaders();
     header('Content-Description: File Transfer');
     header('Content-Type: ' . $contentType);
     header('Content-Disposition: attachment; filename="' . str_replace('"', '\'', basename($filename)) . '";');
     header('Content-Length: ' . strlen($content));
     echo $content;
 }