X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/756b55bbffedb6e5fde91f9fbc61f5a382f20705..refs/pull/3333/head:/app/Config/dompdf.php diff --git a/app/Config/dompdf.php b/app/Config/dompdf.php index cf07312e8..a8728852c 100644 --- a/app/Config/dompdf.php +++ b/app/Config/dompdf.php @@ -7,6 +7,10 @@ * Configuration should be altered via the `.env` file or environment variables. * Do not edit this file unless you're happy to maintain any changes yourself. */ +$dompdfPaperSizeMap = [ + 'a4' => 'a4', + 'letter' => 'letter', +]; return [ @@ -70,7 +74,7 @@ return [ * direct class use like: * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output(); */ - 'chroot' => realpath(base_path()), + 'chroot' => realpath(public_path()), /** * Whether to use Unicode fonts or not. @@ -150,7 +154,7 @@ return [ * * @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.) */ - 'default_paper_size' => 'a4', + 'default_paper_size' => $dompdfPaperSizeMap[env('EXPORT_PAGE_SIZE', 'a4')] ?? 'a4', /** * The default font family.