|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -return array( |
| 3 | +return [ |
4 | 4 |
|
5 | 5 | /*
|
6 | 6 | |--------------------------------------------------------------------------
|
|
20 | 20 | */
|
21 | 21 | 'convert_entities' => true,
|
22 | 22 |
|
23 |
| - 'options' => array( |
| 23 | + 'options' => [ |
24 | 24 | /**
|
25 | 25 | * The location of the DOMPDF font directory
|
26 | 26 | *
|
|
45 | 45 | * Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
|
46 | 46 | * Symbol, ZapfDingbats.
|
47 | 47 | */
|
48 |
| - "font_dir" => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782) |
| 48 | + 'font_dir' => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782) |
49 | 49 |
|
50 | 50 | /**
|
51 | 51 | * The location of the DOMPDF font cache directory
|
|
55 | 55 | *
|
56 | 56 | * Note: This directory must exist and be writable by the webserver process.
|
57 | 57 | */
|
58 |
| - "font_cache" => storage_path('fonts'), |
| 58 | + 'font_cache' => storage_path('fonts'), |
59 | 59 |
|
60 | 60 | /**
|
61 | 61 | * The location of a temporary directory.
|
|
64 | 64 | * The temporary directory is required to download remote images and when
|
65 | 65 | * using the PDFLib back end.
|
66 | 66 | */
|
67 |
| - "temp_dir" => sys_get_temp_dir(), |
| 67 | + 'temp_dir' => sys_get_temp_dir(), |
68 | 68 |
|
69 | 69 | /**
|
70 | 70 | * ==== IMPORTANT ====
|
|
78 | 78 | * direct class use like:
|
79 | 79 | * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
|
80 | 80 | */
|
81 |
| - "chroot" => realpath(base_path()), |
| 81 | + 'chroot' => realpath(base_path()), |
82 | 82 |
|
83 | 83 | /**
|
84 | 84 | * Protocol whitelist
|
|
91 | 91 | * @var array
|
92 | 92 | */
|
93 | 93 | 'allowed_protocols' => [
|
94 |
| - "file://" => ["rules" => []], |
95 |
| - "http://" => ["rules" => []], |
96 |
| - "https://" => ["rules" => []] |
| 94 | + 'file://' => ['rules' => []], |
| 95 | + 'http://' => ['rules' => []], |
| 96 | + 'https://' => ['rules' => []], |
97 | 97 | ],
|
98 | 98 |
|
99 | 99 | /**
|
100 | 100 | * Operational artifact (log files, temporary files) path validation
|
101 | 101 | */
|
102 |
| - 'artifactPathValidation' => null, |
| 102 | + 'artifactPathValidation' => null, |
103 | 103 |
|
104 |
| - /** |
105 |
| - * @var string |
106 |
| - */ |
| 104 | + /** |
| 105 | + * @var string |
| 106 | + */ |
107 | 107 | 'log_output_file' => null,
|
108 | 108 |
|
109 | 109 | /**
|
110 | 110 | * Whether to enable font subsetting or not.
|
111 | 111 | */
|
112 |
| - "enable_font_subsetting" => false, |
| 112 | + 'enable_font_subsetting' => false, |
113 | 113 |
|
114 | 114 | /**
|
115 | 115 | * The PDF rendering backend to use
|
116 | 116 | *
|
117 | 117 | * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
|
118 | 118 | * 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
|
119 |
| - * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link |
120 |
| - * Canvas_Factory} ultimately determines which rendering class to instantiate |
121 |
| - * based on this setting. |
| 119 | + * fall back on CPDF. 'GD' renders PDFs to graphic files. |
| 120 | + * {@link * Canvas_Factory} ultimately determines which rendering class to |
| 121 | + * instantiate based on this setting. |
122 | 122 | *
|
123 | 123 | * Both PDFLib & CPDF rendering backends provide sufficient rendering
|
124 | 124 | * capabilities for dompdf, however additional features (e.g. object,
|
|
139 | 139 | * @link http://www.ros.co.nz/pdf
|
140 | 140 | * @link http://www.php.net/image
|
141 | 141 | */
|
142 |
| - "pdf_backend" => "CPDF", |
| 142 | + 'pdf_backend' => 'CPDF', |
143 | 143 |
|
144 | 144 | /**
|
145 | 145 | * html target media view which should be rendered into pdf.
|
|
151 | 151 | * the desired content might be different (e.g. screen or projection view of html file).
|
152 | 152 | * Therefore allow specification of content here.
|
153 | 153 | */
|
154 |
| - "default_media_type" => "screen", |
| 154 | + 'default_media_type' => 'screen', |
155 | 155 |
|
156 | 156 | /**
|
157 | 157 | * The default paper size.
|
|
160 | 160 | *
|
161 | 161 | * @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
|
162 | 162 | */
|
163 |
| - "default_paper_size" => "a4", |
| 163 | + 'default_paper_size' => 'a4', |
164 | 164 |
|
165 |
| - /** |
166 |
| - * The default paper orientation. |
167 |
| - * |
168 |
| - * The orientation of the page (portrait or landscape). |
169 |
| - * |
170 |
| - * @var string |
171 |
| - */ |
172 |
| - 'default_paper_orientation' => "portrait", |
| 165 | + /** |
| 166 | + * The default paper orientation. |
| 167 | + * |
| 168 | + * The orientation of the page (portrait or landscape). |
| 169 | + * |
| 170 | + * @var string |
| 171 | + */ |
| 172 | + 'default_paper_orientation' => 'portrait', |
173 | 173 |
|
174 | 174 | /**
|
175 | 175 | * The default font family
|
176 | 176 | *
|
177 | 177 | * Used if no suitable fonts can be found. This must exist in the font folder.
|
| 178 | + * |
178 | 179 | * @var string
|
179 | 180 | */
|
180 |
| - "default_font" => "serif", |
| 181 | + 'default_font' => 'serif', |
181 | 182 |
|
182 | 183 | /**
|
183 | 184 | * Image DPI setting
|
|
212 | 213 | *
|
213 | 214 | * @var int
|
214 | 215 | */
|
215 |
| - "dpi" => 96, |
| 216 | + 'dpi' => 96, |
216 | 217 |
|
217 | 218 | /**
|
218 | 219 | * Enable embedded PHP
|
|
231 | 232 | *
|
232 | 233 | * @var bool
|
233 | 234 | */
|
234 |
| - "enable_php" => false, |
| 235 | + 'enable_php' => false, |
235 | 236 |
|
236 | 237 | /**
|
237 | 238 | * Rnable inline JavaScript
|
|
243 | 244 | *
|
244 | 245 | * @var bool
|
245 | 246 | */
|
246 |
| - "enable_javascript" => true, |
| 247 | + 'enable_javascript' => true, |
247 | 248 |
|
248 | 249 | /**
|
249 | 250 | * Enable remote file access
|
|
265 | 266 | *
|
266 | 267 | * @var bool
|
267 | 268 | */
|
268 |
| - "enable_remote" => false, |
| 269 | + 'enable_remote' => false, |
269 | 270 |
|
270 | 271 | /**
|
271 | 272 | * List of allowed remote hosts
|
|
284 | 285 | /**
|
285 | 286 | * A ratio applied to the fonts height to be more like browsers' line height
|
286 | 287 | */
|
287 |
| - "font_height_ratio" => 1.1, |
| 288 | + 'font_height_ratio' => 1.1, |
288 | 289 |
|
289 | 290 | /**
|
290 | 291 | * Use the HTML5 Lib parser
|
291 | 292 | *
|
292 | 293 | * @deprecated This feature is now always on in dompdf 2.x
|
| 294 | + * |
293 | 295 | * @var bool
|
294 | 296 | */
|
295 |
| - "enable_html5_parser" => true, |
296 |
| - ), |
297 |
| - |
| 297 | + 'enable_html5_parser' => true, |
| 298 | + ], |
298 | 299 |
|
299 |
| -); |
| 300 | +]; |
0 commit comments