source: sandbox/filemanager/tp/dompdf/dompdf_config.inc.php @ 1575

Revision 1575, 6.7 KB checked in by amuller, 14 years ago (diff)

Ticket #597 - Implentação, melhorias do modulo gerenciador de arquivos

Line 
1<?php
2/**
3 * DOMPDF - PHP5 HTML to PDF renderer
4 *
5 * File: $RCSfile: dompdf_config.inc.php,v $
6 * Created on: 2004-08-04
7 *
8 * Copyright (c) 2004 - Benj Carson <benjcarson@digitaljunkies.ca>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library in the file LICENSE.LGPL; if not, write to the
22 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 * 02111-1307 USA
24 *
25 * Alternatively, you may distribute this software under the terms of the
26 * PHP License, version 3.0 or later.  A copy of this license should have
27 * been distributed with this file in the file LICENSE.PHP .  If this is not
28 * the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
29 *
30 * The latest version of DOMPDF might be available at:
31 * http://www.digitaljunkies.ca/dompdf
32 *
33 * @link http://www.digitaljunkies.ca/dompdf
34 * @copyright 2004 Benj Carson
35 * @author Benj Carson <benjcarson@digitaljunkies.ca>
36 * @package dompdf
37 * @version 0.5.1
38 */
39
40/* $Id: dompdf_config.inc.php,v 1.19 2006/07/07 21:31:02 benjcarson Exp $ */
41
42error_reporting(E_STRICT | E_ALL);
43
44/**
45 * The root of your DOMPDF installation
46 */
47define("DOMPDF_DIR", realpath(dirname(__FILE__)));
48
49/**
50 * The location of the DOMPDF include directory
51 */
52define("DOMPDF_INC_DIR", DOMPDF_DIR . "/include");
53
54/**
55 * The location of the DOMPDF lib directory
56 */
57define("DOMPDF_LIB_DIR", DOMPDF_DIR . "/lib");
58
59/**
60 * The location of the DOMPDF font directory
61 *
62 * Note this directory must be writable by the webserver process (or user
63 * executing DOMPDF from the CLI).  *Please note the trailing slash.*
64 */
65define("DOMPDF_FONT_DIR", DOMPDF_DIR . "/lib/fonts/");
66
67/**
68 * The location of the system's temporary directory.
69 *
70 * This directory must be writeable by the webserver process.
71 * It is used to download remote images.
72 */
73define("DOMPDF_TEMP_DIR", "/tmp");
74
75/**
76 * The path to the tt2pt1 utility (used to convert ttf to afm)
77 *
78 * Not strictly necessary, but useful if you would like to install
79 * additional fonts using the {@link load_font.php} utility.
80 *
81 * @link http://ttf2pt1.sourceforge.net/
82 */
83define("TTF2AFM", "/usr/bin/ttf2pt1");
84
85/**
86 * The PDF rendering backend to use
87 *
88 * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class),
89 * 'GD' and 'auto'.  'auto' will look for PDFLib and use it if found,
90 * or if not it will fall back on CPDF.  'GD' renders PDFs to graphic
91 * files.  {@link Canvas_Factory} ultimately determines which
92 * rendering class to instantiate based on this setting.
93 *
94 * Both PDFLib & CPDF rendering backends provide sufficient rendering
95 * capabilities for dompdf, however additional features (e.g. object,
96 * image and font support, etc.) differ between backends.  Please see
97 * {@link PDFLib_Adapter} for more information on the PDFLib backend
98 * and {@link CPDF_Adapter} and lib/class.pdf.php for more information
99 * on CPDF.  Also see the documentation for each backend at the links
100 * below.
101 *
102 * The GD rendering backend is a little different than PDFLib and
103 * CPDF.  Several features of CPDF and PDFLib are not supported or do
104 * not make any sense when creating image files.  For example,
105 * multiple pages are not supported, nor are PDF 'objects'.  Have a
106 * look at {@link GD_Adapter} for more information.  GD support is new
107 * and experimental, so use it at your own risk.
108 *
109 * @link http://www.pdflib.com
110 * @link http://www.ros.co.nz/pdf
111 * @link http://www.php.net/image
112 */
113define("DOMPDF_PDF_BACKEND", "auto");
114
115/**
116 * PDFlib license key
117 *
118 * If you are using a licensed, commercial version of PDFlib, specify
119 * your license key here.  If you are using PDFlib-Lite or are evaluating
120 * the commercial version of PDFlib, comment out this setting.
121 *
122 * @link http://www.pdflib.com
123 */
124#define("DOMPDF_PDFLIB_LICENSE", "your license key here");
125
126/**
127 * The default paper size.
128 *
129 * If you live outside of North America, feel free to change this ;)
130 *
131 * @see CPDF_Adapter::PAPER_SIZES for valid sizes
132 */
133define("DOMPDF_DEFAULT_PAPER_SIZE", "letter");
134
135
136/**
137 * The default font family
138 *
139 * Used if no suitable fonts can be found
140 * @var string
141 */
142define("DOMPDF_DEFAULT_FONT", "serif");
143
144/**
145 * Image DPI setting
146 *
147 * This setting determines the default DPI setting for images.  The
148 * DPI may be overridden for inline images by explictly setting the
149 * image's width & height style attributes (i.e. if the image's native
150 * width is 600 pixels and you specify the image's width as 72 points,
151 * the image will have a DPI of 600 in the rendered PDF.  The DPI of
152 * background images can not be overridden and is controlled entirely
153 * via this parameter.
154 *
155 * @var int
156 */
157define("DOMPDF_DPI", "150");
158
159/**
160 * Enable inline PHP
161 *
162 * If this setting is set to true then DOMPDF will automatically evaluate
163 * inline PHP contained within <script type="text/php"> ... </script> tags.
164 *
165 * Enabling this for documents you do not trust (e.g. arbitrary remote html
166 * pages) is a security risk.  Set this option to false if you wish to process
167 * untrusted documents.
168 *
169 * @var bool
170 */
171define("DOMPDF_ENABLE_PHP", true);
172
173
174/**
175 * Enable remote file access
176 *
177 * If this setting is set to true, DOMPDF will access remote sites for
178 * images and CSS files as required.
179 *
180 * @var bool
181 */
182define("DOMPDF_ENABLE_REMOTE", true);
183 
184/**
185 * DOMPDF autoload function
186 *
187 * If you have an existing autoload function, add a call to this function
188 * from your existing __autoload() implementation.
189 *
190 * @param string $class
191 */
192function DOMPDF_autoload($class) {
193  $filename = mb_strtolower($class) . ".cls.php";
194  require_once(DOMPDF_INC_DIR . "/$filename");
195}
196
197if ( !function_exists("__autoload") ) {
198  /**
199   * Default __autoload() function
200   *
201   * @param string $class
202   */
203  function __autoload($class) {
204    DOMPDF_autoload($class);
205  }
206}
207
208// ### End of user-configurable options ###
209
210
211/**
212 * Global array of warnings generated by DomDocument parser and
213 * stylesheet class
214 *
215 * @var array
216 */
217$_dompdf_warnings = array();
218
219/**
220 * If true, $_dompdf_warnings is dumped on script termination.
221 *
222 * @var bool
223 */
224$_dompdf_show_warnings = false;
225
226/**
227 * If true, the entire tree is dumped to stdout in dompdf.cls.php
228 *
229 * @var bool
230 */
231$_dompdf_debug = false;
232
233require_once(DOMPDF_INC_DIR . "/functions.inc.php");
234
235?>
Note: See TracBrowser for help on using the repository browser.