You are here

public function FrxMPDF::__construct in Forena Reports 7.3

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

File

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

Class

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

Code

public function __construct() {

  // To do - use config variable of path to mpdf libs
  $tmp = file_directory_temp();
  if (!file_exists("{$tmp}/mpdf")) {
    mkdir("{$tmp}/mpdf");
  }
  define("_MPDF_TEMP_PATH", "{$tmp}/mpdf/");
  define('_MPDF_PATH', 'sites/all/libraries/mpdf/');
  include_once 'sites/all/libraries/mpdf/mpdf.php';
  $this->content_type = 'application/pdf';
}