skip to Main Content

How to make TCPDF fit content from PhpSpreadsheet

I need to fill the existing Excel sheet regularly and export it to PDF. But I can't do it so that the content fits the page. $spreadsheet = IOFactory::load(Storage::path('Time&Attendance Template.xltx')); $sheet = $spreadsheet->getActiveSheet(); $pdfWriter = new Tcpdf($spreadsheet); $sheet->getCell('A1')->setValue(Str::random()); $pdfWriter->setPaperSize(PageSetup::PAPERSIZE_A4); $pdfWriter->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);…

VIEW QUESTION
Back To Top
Search