You are here

public function PrincePDF::__construct in Forena Reports 8

File

forena_pdf/src/FrxPlugin/Document/PrincePDF.php, line 24
PrincePDF

Class

PrincePDF
Provides PDF file exports using Prince XML

Namespace

Drupal\forena_pdf\FrxPlugin\Document

Code

public function __construct() {
  include_once 'libraries/prince/prince.php';
  $this->content_type = 'application/pdf';
  $prince_path = \Drupal::config('forena_pdf.settings')
    ->get('prince_path');
  if (class_exists('\\Prince') && forena_library_file('prince')) {
    $this->p = new \Prince($prince_path);
  }
}