I'm generating a pdf with 41 and it's taking about 3 minutes, would it be possible to generate this file faster?
follow the code:
$pdf = new Pdf([
// set to use core fonts only
'mode' => Pdf::MODE_CORE,
// A4 paper format
'format' => Pdf::FORMAT_A4,
// portrait orientation
'orientation' => Pdf::ORIENT_PORTRAIT,
// stream to browser inline
'destination' => Pdf::DEST_BROWSER,
// your html content input
'content' => $content,
// format content from your own css file if needed or use the
// enhanced bootstrap css built by Krajee for mPDF formatting
'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css',
// any css to be embedded if required
'cssInline' => '.kv-heading-1{font-size:14px}',
// set mPDF properties on the fly
'options' => ['title' => 'Relatório de plano de contas'],
'defaultFontSize' => 3,
'marginLeft' => 10,
'marginRight' => 10,
'marginTop' => 30,
'marginBottom' => 11,
'marginHeader' => 6,
'marginFooter' => 6,
// call mPDF methods on the fly
'methods' => [
'SetHeader' => [$header],
'SetFooter' => ['<p style="text-align: center;font-size: 8px;">Documento emitido pelo Mono Sistemas Gestão Empresarial. Todos os Direitos Reservados © www.monosistemas.com.br</p>'],
]
]);
$pdfName = 'PLANO_DE_CONTAS-_' . date('d-m-Y') . '.pdf';
Yii::$app->response->format = Response::FORMAT_HTML;
Yii::$app->response->setDownloadHeaders($pdfName, 'application/pdf');
return $pdf->render();
}