Код: Выделить всё
// Generate the PDF from the HTML content
$pdf = PDF::loadHTML($contract_document)->setPaper('a4', 'landscape')
->setOption('zoom', 1.2)
->setOption('footer-center', '')
->setOption('footer-font-size', 5);
return $pdf->download($ad_id . '.pdf');
Код: Выделить всё
Invalid or corrupted PDF file.
PDF.js v4.7.18 (build: 9735a840a)
Message: Invalid PDF structure. viewer.mjs:12184:13
Uncaught (in promise)
Object { message: "Invalid PDF structure.", name: "InvalidPDFException", stack: "BaseExceptionClosure@resource://pdf.js/build/pdf.mjs:453:29\n@resource://pdf.js/build/pdf.mjs:456:2\n" }
Подробнее здесь: https://stackoverflow.com/questions/790 ... file-corru