Hello, IM now using cloud export to generate PDF files, the problem I have is that my PDF keeps geting portrait mode when I have landscape enabled.
index.php
<?php
require_once "MyReport.php";
$mes = isset($_GET['fecha']) ? $_GET['fecha'] : date('M Y');
$mes = date("M Y",strtotime($mes));
$settings = array(
'useLocalTempFolder' => true,
'pageWaiting' => 'networkidle2', //load, domcontentloaded, networkidle0, networkidle2
'autoDeleteLocalTempFile' => false,
);
$pdfOptions = array(
'format'=>"A4",
'landscape'=>true,
'noRepeatTableFooter' => true,
'scale' => 0.83,
'printBackground' => false,
'margin' => [
'top' => '50px',
'bottom' => '50px',
'right' => '20px',
'left' => '20px'
],
);
$report = new MyReport;
$report->run();
$report->cloudExport("MyReport")
->chromeHeadlessio("XXX")
->settings($settings)
->pdf($pdfOptions)
->toBrowser("Reporte RAV LINDE " . $mes . ".pdf");
Thanks