public function FrxMPDF::__construct in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 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() {
$tmp = file_directory_temp();
// To do - use config variable of path to mpdf libs
if (!file_exists("{$tmp}/mpdf")) {
mkdir("{$tmp}/mpdf");
}
define('_MPDF_PATH', 'sites/all/libraries/mpdf/');
define("_MPDF_TEMP_PATH", "{$tmp}/mpdf/");
include_once 'sites/all/libraries/mpdf/mpdf.php';
$this->content_type = 'application/pdf';
}