1 <?php
include("head.inc"); ?
>
7 <li style
="list-style-image: url('images/star_02.gif');"><a href
="#system">System Configuration
</a
></li
>
8 <li style
="list-style-image: url('images/star_02.gif');"><a href
="#dompdf-config">DOMPDF Configuration
</a
></li
>
11 <h3 id
="system">System Configuration
</h3
>
14 require_once("../dompdf_config.inc.php");
16 $server_configs = array(
17 "PHP Version" => array(
19 "value" => phpversion(),
20 "result" => version_compare(phpversion(), "5.0"),
22 "DOMDocument extension" => array(
24 "value" => phpversion("DOM"),
25 "result" => class_exists("DOMDocument"),
29 "value" => phpversion("pcre"),
30 "result" => function_exists("preg_match") && @preg_match
("/./u", "a"),
31 "failure" => "PCRE is required with Unicode support (the \"u\" modifier)",
35 "value" => phpversion("zlib"),
36 "result" => function_exists("gzcompress"),
37 "fallback" => "Recommended to compress PDF documents",
39 "MBString extension" => array(
41 "value" => phpversion("mbstring"),
42 "result" => function_exists("mb_send_mail"), // Should never be reimplemented in dompdf
43 "fallback" => "Recommended, will use fallback functions",
47 "value" => phpversion("gd"),
48 "result" => function_exists("imagecreate"),
49 "fallback" => "Required if you have images in your documents",
52 "required" => "For better performances",
55 "fallback" => "Recommended for better performances",
57 "GMagick or IMagick" => array(
58 "required" => "Better with transparent PNG images",
60 "result" => extension_loaded("gmagick") ||
extension_loaded("imagick"),
61 "fallback" => "Recommended for better performances",
65 if (($xc = extension_loaded("xcache")) ||
($apc = extension_loaded("apc")) ||
($zop = extension_loaded("Zend OPcache")) ||
($op = extension_loaded("opcache"))) {
66 $server_configs["opcache"]["result"] = true;
67 $server_configs["opcache"]["value"] = (
68 $xc ?
"XCache ".phpversion("xcache") : (
69 $apc ?
"APC ".phpversion("apc") : (
70 $zop ?
"Zend OPCache ".phpversion("Zend OPcache") : "PHP OPCache ".phpversion("opcache")
75 if (($gm = extension_loaded("gmagick")) ||
($im = extension_loaded("imagick"))) {
76 $server_configs["GMagick or IMagick"]["value"] = ($im ?
"IMagick ".phpversion("imagick") : "GMagick ".phpversion("gmagick"));
88 <?php
foreach($server_configs as $label => $server_config) { ?
>
90 <td
class="title"><?php
echo $label; ?
></td
>
91 <td
><?php
echo ($server_config["required"] === true ?
"Yes" : $server_config["required"]); ?
></td
>
92 <td
class="<?php echo ($server_config["result
"] ? "ok
" : (isset($server_config["fallback
"]) ? "warning
" : "failed
")); ?>">
94 echo $server_config["value"];
95 if ($server_config["result"] && !$server_config["value"]) echo "Yes";
96 if (!$server_config["result"]) {
97 if (isset($server_config["fallback"])) {
98 echo "<div>No. ".$server_config["fallback"]."</div>";
100 if (isset($server_config["failure"])) {
101 echo "<div>".$server_config["failure"]."</div>";
111 <h3 id
="dompdf-config">DOMPDF Configuration
</h3
>
114 $dompdf_constants = array();
115 $defined_constants = get_defined_constants(true);
118 "DOMPDF_DIR" => array(
119 "desc" => "Root directory of DOMPDF",
122 "DOMPDF_INC_DIR" => array(
123 "desc" => "Include directory of DOMPDF",
126 "DOMPDF_LIB_DIR" => array(
127 "desc" => "Third-party libraries directory of DOMPDF",
130 "DOMPDF_FONT_DIR" => array(
131 "desc" => "Directory containing fonts loaded into DOMPDF",
132 "success" => "write",
134 "DOMPDF_FONT_CACHE" => array(
135 "desc" => "Font metrics cache (used mainly by CPDF)",
136 "success" => "write",
138 "DOMPDF_TEMP_DIR" => array(
139 "desc" => "Temporary folder",
140 "success" => "write",
142 "DOMPDF_CHROOT" => array(
143 "desc" => "Restricted path",
146 "DOMPDF_UNICODE_ENABLED" => array(
147 "desc" => "Unicode support (with supporting fonts)",
149 "DOMPDF_ENABLE_FONTSUBSETTING" => array(
150 "desc" => "Enable font subsetting, will make smaller documents when using Unicode fonts",
152 "DOMPDF_PDF_BACKEND" => array(
153 "desc" => "Backend library that renders the output (PDF, image)",
154 "success" => "backend",
156 "DOMPDF_DEFAULT_MEDIA_TYPE" => array(
157 "desc" => "Default media type (print, screen, ...)",
159 "DOMPDF_DEFAULT_PAPER_SIZE" => array(
160 "desc" => "Default paper size (A4, letter, ...)",
162 "DOMPDF_DEFAULT_FONT" => array(
163 "desc" => "Default font, used if the specified font in the CSS stylesheet was not found",
165 "DOMPDF_DPI" => array(
166 "desc" => "DPI scale of the document",
168 "DOMPDF_ENABLE_PHP" => array(
169 "desc" => "Inline PHP support",
171 "DOMPDF_ENABLE_JAVASCRIPT" => array(
172 "desc" => "Inline JavaScript support",
174 "DOMPDF_ENABLE_REMOTE" => array(
175 "desc" => "Allow remote stylesheets and images",
176 "success" => "remote",
178 "DOMPDF_ENABLE_CSS_FLOAT" => array(
179 "desc" => "Enable CSS float support (experimental)",
181 "DOMPDF_ENABLE_HTML5PARSER" => array(
182 "desc" => "Enable the HTML5 parser (experimental)",
185 "desc" => "Debug PNG images",
187 "DEBUGKEEPTEMP" => array(
188 "desc" => "Keep temporary image files",
191 "desc" => "Debug CSS",
193 "DEBUG_LAYOUT" => array(
194 "desc" => "Debug layout",
196 "DEBUG_LAYOUT_LINES" => array(
197 "desc" => "Debug text lines layout",
199 "DEBUG_LAYOUT_BLOCKS" => array(
200 "desc" => "Debug block elements layout",
202 "DEBUG_LAYOUT_INLINE" => array(
203 "desc" => "Debug inline elements layout",
205 "DEBUG_LAYOUT_PADDINGBOX" => array(
206 "desc" => "Debug padding boxes layout",
208 "DOMPDF_LOG_OUTPUT_FILE" => array(
209 "desc" => "The file in which dompdf will write warnings and messages",
210 "success" => "write",
212 "DOMPDF_FONT_HEIGHT_RATIO" => array(
213 "desc" => "The line height ratio to apply to get a render like web browsers",
215 "DOMPDF_ENABLE_AUTOLOAD" => array(
216 "desc" => "Enable the DOMPDF autoloader",
218 "DOMPDF_AUTOLOAD_PREPEND" => array(
219 "desc" => "Prepend the dompdf autoload function to the SPL autoload functions already registered instead of appending it",
221 "DOMPDF_ADMIN_USERNAME" => array(
222 "desc" => "The username required to access restricted sections",
225 "DOMPDF_ADMIN_PASSWORD" => array(
226 "desc" => "The password required to access restricted sections",
233 <table
class="setup">
241 <?php
foreach($defined_constants["user"] as $const => $value) { ?
>
243 <td
class="title"><?php
echo $const; ?
></td
>
246 if (isset($constants[$const]["secret"])) {
254 <td
><?php
if (isset($constants[$const]["desc"])) echo $constants[$const]["desc"]; ?
></td
>
257 if (isset($constants[$const]["success"])) {
258 switch($constants[$const]["success"]) {
260 $success = is_readable($value);
261 $message = ($success ?
"Readable" : "Not readable");
264 $success = is_writable($value);
265 $message = ($success ?
"Writable" : "Not writable");
268 $success = ini_get("allow_url_fopen");
269 $message = ($success ?
"allow_url_fopen enabled" : "allow_url_fopen disabled");
272 switch (strtolower($value)) {
277 $success = function_exists("PDF_begin_document");
278 $message = "The PDFLib backend needs the PDF PECL extension";
281 $success = function_exists("imagecreate");
282 $message = "The GD backend requires GD2";
287 $success = !in_array($value, array("admin", "password"));
288 $message = ($success ?
"OK" : "Password should be changed");
291 echo 'class="' . ($success ?
"ok" : "failed") . '"';
293 ?
>><?php
echo $message; ?
></td
>
300 <?php
include("foot.inc"); ?
>