$dompdf->setPaper('A4');
Dec 21, 2017
8
Level 2
Laravel Cashier Invoice: A4 format
Hi, how can i change the paper format of an invoice generated by Cashier to A4?
I found the following relevant code in the Cashier package but I can't figure out, how I am supposed to do customizations with it:
public function pdf(array $data)
{
if (! defined('DOMPDF_ENABLE_AUTOLOAD')) {
define('DOMPDF_ENABLE_AUTOLOAD', false);
}
if (file_exists($configPath = base_path().'/vendor/dompdf/dompdf/dompdf_config.inc.php')) {
require_once $configPath;
}
$dompdf = new Dompdf;
$dompdf->loadHtml($this->view($data)->render());
$dompdf->render();
return $dompdf->output();
}
Thanks very much in advance for any help, Simon
Please or to participate in this conversation.