forked from TFMM/silent-auction
fix: set tempDir via getMpdf to bypass problematic loadView config array
This commit is contained in:
@@ -289,16 +289,9 @@ class PagesController extends Controller
|
||||
mkdir($writableTemp, 0755, true);
|
||||
}
|
||||
|
||||
$config = [
|
||||
'tempDir' => $writableTemp,
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'letter',
|
||||
'author' => 'St John Church',
|
||||
'creator' => 'St John Church',
|
||||
'display_mode' => 'fullpage',
|
||||
];
|
||||
$pdf = PDF::loadView('receiptpdf', $checkout_data);
|
||||
$pdf->getMpdf()->tempDir = $writableTemp;
|
||||
|
||||
$pdf = PDF::loadView('receiptpdf', $checkout_data, [], $config);
|
||||
return $pdf->download('receipt-'.$checkoutid.'.pdf');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user