Skip to content

Commit 3425ced

Browse files
burlapbarryvdh
authored andcommitted
changed options format (barryvdh#384)
UNICODE and CSS_FLOAT options removed, don’t seem to exist in dompdf src/Options.php
1 parent 0dcaa3c commit 3425ced

File tree

1 file changed

+15
-37
lines changed

1 file changed

+15
-37
lines changed

config/dompdf.php

+15-37
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
3939
* Symbol, ZapfDingbats.
4040
*/
41-
"DOMPDF_FONT_DIR" => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
41+
"font_dir" => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
4242

4343
/**
4444
* The location of the DOMPDF font cache directory
@@ -48,7 +48,7 @@
4848
*
4949
* Note: This directory must exist and be writable by the webserver process.
5050
*/
51-
"DOMPDF_FONT_CACHE" => storage_path('fonts/'),
51+
"font_cache" => storage_path('fonts/'),
5252

5353
/**
5454
* The location of a temporary directory.
@@ -57,7 +57,7 @@
5757
* The temporary directory is required to download remote images and when
5858
* using the PFDLib back end.
5959
*/
60-
"DOMPDF_TEMP_DIR" => sys_get_temp_dir(),
60+
"temp_dir" => sys_get_temp_dir(),
6161

6262
/**
6363
* ==== IMPORTANT ====
@@ -71,23 +71,12 @@
7171
* direct class use like:
7272
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
7373
*/
74-
"DOMPDF_CHROOT" => realpath(base_path()),
75-
76-
/**
77-
* Whether to use Unicode fonts or not.
78-
*
79-
* When set to true the PDF backend must be set to "CPDF" and fonts must be
80-
* loaded via load_font.php.
81-
*
82-
* When enabled, dompdf can support all Unicode glyphs. Any glyphs used in a
83-
* document must be present in your fonts, however.
84-
*/
85-
"DOMPDF_UNICODE_ENABLED" => true,
74+
"chroot" => realpath(base_path()),
8675

8776
/**
8877
* Whether to enable font subsetting or not.
8978
*/
90-
"DOMPDF_ENABLE_FONT_SUBSETTING" => false,
79+
"enable_font_subsetting" => false,
9180

9281
/**
9382
* The PDF rendering backend to use
@@ -117,7 +106,7 @@
117106
* @link http://www.ros.co.nz/pdf
118107
* @link http://www.php.net/image
119108
*/
120-
"DOMPDF_PDF_BACKEND" => "CPDF",
109+
"pdf_backend" => "CPDF",
121110

122111
/**
123112
* PDFlib license key
@@ -143,7 +132,7 @@
143132
* the desired content might be different (e.g. screen or projection view of html file).
144133
* Therefore allow specification of content here.
145134
*/
146-
"DOMPDF_DEFAULT_MEDIA_TYPE" => "screen",
135+
"default_media_type" => "screen",
147136

148137
/**
149138
* The default paper size.
@@ -152,15 +141,15 @@
152141
*
153142
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
154143
*/
155-
"DOMPDF_DEFAULT_PAPER_SIZE" => "a4",
144+
"default_paper_size" => "a4",
156145

157146
/**
158147
* The default font family
159148
*
160149
* Used if no suitable fonts can be found. This must exist in the font folder.
161150
* @var string
162151
*/
163-
"DOMPDF_DEFAULT_FONT" => "serif",
152+
"default_font" => "serif",
164153

165154
/**
166155
* Image DPI setting
@@ -195,7 +184,7 @@
195184
*
196185
* @var int
197186
*/
198-
"DOMPDF_DPI" => 96,
187+
"dpi" => 96,
199188

200189
/**
201190
* Enable inline PHP
@@ -209,7 +198,7 @@
209198
*
210199
* @var bool
211200
*/
212-
"DOMPDF_ENABLE_PHP" => false,
201+
"enable_php" => false,
213202

214203
/**
215204
* Enable inline Javascript
@@ -219,7 +208,7 @@
219208
*
220209
* @var bool
221210
*/
222-
"DOMPDF_ENABLE_JAVASCRIPT" => true,
211+
"enable_javascript" => true,
223212

224213
/**
225214
* Enable remote file access
@@ -238,28 +227,17 @@
238227
*
239228
* @var bool
240229
*/
241-
"DOMPDF_ENABLE_REMOTE" => true,
230+
"enable_remote" => true,
242231

243232
/**
244233
* A ratio applied to the fonts height to be more like browsers' line height
245234
*/
246-
"DOMPDF_FONT_HEIGHT_RATIO" => 1.1,
247-
248-
/**
249-
* Enable CSS float
250-
*
251-
* Allows people to disabled CSS float support
252-
* @var bool
253-
*/
254-
"DOMPDF_ENABLE_CSS_FLOAT" => false,
255-
235+
"font_height_ratio" => 1.1,
256236

257237
/**
258238
* Use the more-than-experimental HTML5 Lib parser
259239
*/
260-
"DOMPDF_ENABLE_HTML5_PARSER" => false,
261-
262-
240+
"enable_html5_parser" => false,
263241
),
264242

265243

0 commit comments

Comments
 (0)