You are here

public function FrxMPDF::output in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 docformats/FrxMPDF.inc \FrxMPDF::output()

Overrides FrxDocument::output

File

docformats/FrxMPDF.inc, line 78
FrxMPDF.inc PDF document via MPDF Library @author davidmetzler

Class

FrxMPDF
@file FrxMPDF.inc PDF document via MPDF Library @author davidmetzler

Code

public function output($pdf) {
  $http_headers = array(
    'Pragma' => 'no-cache',
    'Expires' => '0',
    'Cache-Control' => 'no-cache, must-revalidate',
    'Cache-Control' => 'private',
    'Content-Transfer-Encoding' => 'binary',
    'Content-Type' => 'application/pdf',
  );
  foreach ($http_headers as $name => $value) {
    $value = preg_replace('/\\r?\\n(?!\\t| )/', '', $value);
    drupal_add_http_header($name, $value);
  }
  return TRUE;
}