.*~ms'; $bodyrepl = <<

Serif

$lorem

Sans-Serif

$lorem

Monospace

$lorem

EOF; return preg_replace($bodystring, $bodyrepl, $html); } require __DIR__ . '/../Header.php'; $spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php'; $helper->log('Hide grid lines'); $spreadsheet->getActiveSheet()->setShowGridLines(false); $helper->log('Set orientation to landscape'); $spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE); $helper->log('Write to Dompdf'); $writer = new Dompdf($spreadsheet); $filename = $helper->getFileName('21b_Pdf_dompdf.xlsx', 'pdf'); $writer->setEditHtmlCallback('replaceBody'); $writer->save($filename); $helper->log('Write to Mpdf'); $writer = new Mpdf($spreadsheet); $filename = $helper->getFileName('21b_Pdf_mpdf.xlsx', 'pdf'); $writer->setEditHtmlCallback('replaceBody'); $writer->save($filename); $helper->log('Write to Tcpdf'); $writer = new Tcpdf($spreadsheet); $filename = $helper->getFileName('21b_Pdf_tcpdf.xlsx', 'pdf'); $writer->setEditHtmlCallback('replaceBody'); $writer->save($filename);