Laravel Cashier Invoice: A4 format

Posted 1 year ago by marin246

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 sign in or create an account to participate in this conversation.