Example #1
0
 public function __construct(Agana_Print_Meta $metaReport, $theme_path, $watermark = '', $subject = 'System report')
 {
     parent::__construct($metaReport);
     $cssBootstrap = file_get_contents($theme_path . '/../vendor/twitter-bootstrap/css/bootstrap.min.css');
     $cssBootstrapResponsive = file_get_contents($theme_path . '/../vendor/twitter-bootstrap/css/bootstrap-responsive.min.css');
     $cssFontAwesome = file_get_contents($theme_path . '/../css/font-awesome.min.css');
     $cssAgana = file_get_contents($theme_path . '/../vendor/agana/css/agana.css');
     $cssAgana = file_get_contents($theme_path . '/../vendor/agana/css/agana.mpdf.css');
     $cssCustom = file_get_contents($theme_path . '/../css/custom.css');
     $this->mpdf = new mPDF('c', 'A4', '', '', 5, 5, 15, 10, 5, 5);
     $this->mpdf->SetTitle($this->meta->getTitle());
     $this->mpdf->SetAuthor('Winponta Software');
     $this->mpdf->SetCreator('Winponta Software');
     $this->mpdf->SetSubject($subject);
     //        $this->mpdf->simpleTables = true;
     $this->mpdf->useOnlyCoreFonts = true;
     $this->mpdf->SetDisplayMode('fullpage');
     $this->mpdf->defaultheaderfontsize = 7;
     $this->mpdf->SetHTMLHeader($this->getHeaderTemplate());
     $this->mpdf->SetHTMLFooter($this->getFooterTemplate());
     $this->mpdf->WriteHTML($cssBootstrap, 1);
     $this->mpdf->WriteHTML($cssBootstrapResponsive, 1);
     $this->mpdf->WriteHTML($cssFontAwesome, 1);
     $this->mpdf->WriteHTML($cssAgana, 1);
     $this->mpdf->WriteHTML($cssCustom, 1);
     $this->mpdf->SetWatermarkText($watermark);
     $this->mpdf->showWatermarkText = filter_var($watermark, FILTER_VALIDATE_BOOLEAN) ? true : false;
     $this->mpdf->AliasNbPageGroups('{PAGETOTAL}');
     // Create a new WKHtmlToPdf object with some global PDF options
     //$r = new Agana_Print_Report('TITULO', 'ACC NOME', 'SIS NOME', 'SIS URL');
     //        $this->wkpdf = new WkHtmlToPdf(array(
     //            'no-outline', // Make Chrome not complain
     //            'margin-top' => 0,
     //            'margin-right' => 0,
     //            'margin-bottom' => 0,
     //            'margin-left' => 0,
     //        ));
     //
     //        // Set default page options for all following pages
     //        $this->wkpdf->setPageOptions(array(
     //            'disable-smart-shrinking',
     //            'user-style-sheet' => 'pdf.css',
     //        ));
 }
Example #2
0
 public function __construct(Agana_Print_Meta $metaReport, $theme_path, $watermark = '', $subject = 'System report')
 {
     parent::__construct($metaReport);
 }