X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/fff5bbcee458992443e3732fbcbbbe34f765fcc3..refs/pull/262/head:/app/Services/ExportService.php diff --git a/app/Services/ExportService.php b/app/Services/ExportService.php index 14084d320..50ba75c17 100644 --- a/app/Services/ExportService.php +++ b/app/Services/ExportService.php @@ -1,6 +1,5 @@ $page, 'css' => $cssContent])->render(); + $useWKHTML = config('snappy.pdf.binary') !== false; $containedHtml = $this->containHtml($pageHtml); - $pdf = \PDF::loadHTML($containedHtml); + if ($useWKHTML) { + $pdf = \SnappyPDF::loadHTML($containedHtml); + } else { + $pdf = \PDF::loadHTML($containedHtml); + } return $pdf->output(); }