X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/6fa093d9d0a2073e872ce545b87ef2eb1b35a99b..refs/pull/2902/head:/app/Config/dompdf.php
diff --git a/app/Config/dompdf.php b/app/Config/dompdf.php
index 77f0cff9c..71ea716f3 100644
--- a/app/Config/dompdf.php
+++ b/app/Config/dompdf.php
@@ -10,12 +10,11 @@
return [
-
'show_warnings' => false, // Throw an Exception on warnings from dompdf
- 'orientation' => 'portrait',
- 'defines' => [
+ 'orientation' => 'portrait',
+ 'defines' => [
/**
- * The location of the DOMPDF font directory
+ * The location of the DOMPDF font directory.
*
* The location of the directory where DOMPDF will store fonts and font metrics
* Note: This directory must exist and be writable by the webserver process.
@@ -38,17 +37,17 @@ return [
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
* Symbol, ZapfDingbats.
*/
- "DOMPDF_FONT_DIR" => app_path('vendor/dompdf/dompdf/lib/fonts/'), //storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
+ 'DOMPDF_FONT_DIR' => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
/**
- * The location of the DOMPDF font cache directory
+ * The location of the DOMPDF font cache directory.
*
* This directory contains the cached font metrics for the fonts used by DOMPDF.
* This directory can be the same as DOMPDF_FONT_DIR
*
* Note: This directory must exist and be writable by the webserver process.
*/
- "DOMPDF_FONT_CACHE" => storage_path('fonts/'),
+ 'DOMPDF_FONT_CACHE' => storage_path('fonts/'),
/**
* The location of a temporary directory.
@@ -57,10 +56,10 @@ return [
* The temporary directory is required to download remote images and when
* using the PFDLib back end.
*/
- "DOMPDF_TEMP_DIR" => sys_get_temp_dir(),
+ 'DOMPDF_TEMP_DIR' => sys_get_temp_dir(),
/**
- * ==== IMPORTANT ====
+ * ==== IMPORTANT ====.
*
* dompdf's "chroot": Prevents dompdf from accessing system files or other
* files on the webserver. All local files opened by dompdf must be in a
@@ -69,9 +68,9 @@ return [
* should be an absolute path.
* This is only checked on command line call by dompdf.php, but not by
* direct class use like:
- * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
+ * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
*/
- "DOMPDF_CHROOT" => realpath(base_path()),
+ 'DOMPDF_CHROOT' => realpath(base_path()),
/**
* Whether to use Unicode fonts or not.
@@ -82,20 +81,19 @@ return [
* When enabled, dompdf can support all Unicode glyphs. Any glyphs used in a
* document must be present in your fonts, however.
*/
- "DOMPDF_UNICODE_ENABLED" => true,
+ 'DOMPDF_UNICODE_ENABLED' => true,
/**
* Whether to enable font subsetting or not.
*/
- "DOMPDF_ENABLE_FONTSUBSETTING" => false,
+ 'DOMPDF_ENABLE_FONTSUBSETTING' => false,
/**
- * The PDF rendering backend to use
+ * The PDF rendering backend to use.
*
* Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
* 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
- * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link
- * Canvas_Factory} ultimately determines which rendering class to instantiate
+ * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link * Canvas_Factory} ultimately determines which rendering class to instantiate
* based on this setting.
*
* Both PDFLib & CPDF rendering backends provide sufficient rendering
@@ -117,10 +115,10 @@ return [
* @link http://www.ros.co.nz/pdf
* @link http://www.php.net/image
*/
- "DOMPDF_PDF_BACKEND" => "CPDF",
+ 'DOMPDF_PDF_BACKEND' => 'CPDF',
/**
- * PDFlib license key
+ * PDFlib license key.
*
* If you are using a licensed, commercial version of PDFlib, specify
* your license key here. If you are using PDFlib-Lite or are evaluating
@@ -143,7 +141,7 @@ return [
* the desired content might be different (e.g. screen or projection view of html file).
* Therefore allow specification of content here.
*/
- "DOMPDF_DEFAULT_MEDIA_TYPE" => "print",
+ 'DOMPDF_DEFAULT_MEDIA_TYPE' => 'print',
/**
* The default paper size.
@@ -152,18 +150,19 @@ return [
*
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
*/
- "DOMPDF_DEFAULT_PAPER_SIZE" => "a4",
+ 'DOMPDF_DEFAULT_PAPER_SIZE' => 'a4',
/**
- * The default font family
+ * The default font family.
*
* Used if no suitable fonts can be found. This must exist in the font folder.
+ *
* @var string
*/
- "DOMPDF_DEFAULT_FONT" => "dejavu sans",
+ 'DOMPDF_DEFAULT_FONT' => 'dejavu sans',
/**
- * Image DPI setting
+ * Image DPI setting.
*
* This setting determines the default DPI setting for images and fonts. The
* DPI may be overridden for inline images by explictly setting the
@@ -195,10 +194,10 @@ return [
*
* @var int
*/
- "DOMPDF_DPI" => 96,
+ 'DOMPDF_DPI' => 96,
/**
- * Enable inline PHP
+ * Enable inline PHP.
*
* If this setting is set to true then DOMPDF will automatically evaluate
* inline PHP contained within tags.
@@ -209,20 +208,20 @@ return [
*
* @var bool
*/
- "DOMPDF_ENABLE_PHP" => false,
+ 'DOMPDF_ENABLE_PHP' => false,
/**
- * Enable inline Javascript
+ * Enable inline Javascript.
*
* If this setting is set to true then DOMPDF will automatically insert
* JavaScript code contained within tags.
*
* @var bool
*/
- "DOMPDF_ENABLE_JAVASCRIPT" => true,
+ 'DOMPDF_ENABLE_JAVASCRIPT' => false,
/**
- * Enable remote file access
+ * Enable remote file access.
*
* If this setting is set to true, DOMPDF will access remote sites for
* images and CSS files as required.
@@ -238,29 +237,27 @@ return [
*
* @var bool
*/
- "DOMPDF_ENABLE_REMOTE" => true,
+ 'DOMPDF_ENABLE_REMOTE' => true,
/**
- * A ratio applied to the fonts height to be more like browsers' line height
+ * A ratio applied to the fonts height to be more like browsers' line height.
*/
- "DOMPDF_FONT_HEIGHT_RATIO" => 1.1,
+ 'DOMPDF_FONT_HEIGHT_RATIO' => 1.1,
/**
- * Enable CSS float
+ * Enable CSS float.
*
* Allows people to disabled CSS float support
+ *
* @var bool
*/
- "DOMPDF_ENABLE_CSS_FLOAT" => true,
-
+ 'DOMPDF_ENABLE_CSS_FLOAT' => true,
/**
- * Use the more-than-experimental HTML5 Lib parser
+ * Use the more-than-experimental HTML5 Lib parser.
*/
- "DOMPDF_ENABLE_HTML5PARSER" => true,
-
+ 'DOMPDF_ENABLE_HTML5PARSER' => true,
],
-
];