1<?php if (!defined('BASEPATH')) { 2 exit('No direct script access allowed'); 3} 4 /* 5 * LimeSurvey 6 * Copyright (C) 2007-2011 The LimeSurvey Project Team / Carsten Schmitz 7 * All rights reserved. 8 * License: GNU/GPL License v2 or later, see LICENSE.php 9 * LimeSurvey is free software. This version may have been modified pursuant 10 * to the GNU General Public License, and as distributed it includes or 11 * is derivative of works licensed under the GNU General Public License or 12 * other free or open source software licenses. 13 * See COPYRIGHT.php for copyright notices and details. 14 * 15 */ 16 17 18 /** 19 * TCPDF configuration file 20 * 21 * @package configuration 22 */ 23 24 25 /*************************************************************************** 26 * PATH CONFIGURATION PARAMETERS 27 **************************************************************************/ 28 29 30 /************************************************************ 31 * TCPDF installation directory 32 * ---------------------------------------------------------- 33 * This is the base installation directory for your TCPDF 34 * package (the folder that contains tcpdf.php). 35 * 36 * ADD TRAILING SLASH! 37 ***********************************************************/ 38 39 $tcpdf['base_directory'] = APPPATH.'third_party'.DIRECTORY_SEPARATOR.'tcpdf'.DIRECTORY_SEPARATOR; 40 41 42 /************************************************************ 43 * TCPDF installation directory URL 44 * ---------------------------------------------------------- 45 * This is the URL path to the TCPDF base installation 46 * directory (the URL equivalent to the 'base_directory' 47 * option above). 48 * 49 * ADD TRAILING SLASH! 50 ***********************************************************/ 51 52 $tcpdf['base_url'] = 'dummy'; // If empty and debug === 2, "empty needle" occurs 53 54 55 /************************************************************ 56 * TCPDF fonts directory 57 * ---------------------------------------------------------- 58 * This is the directory of the TCPDF fonts folder. 59 * Use $tcpdf['base_directory'].'fonts/old/' for old non-UTF8 60 * fonts. 61 * 62 * ADD TRAILING SLASH! 63 ***********************************************************/ 64 65 $tcpdf['fonts_directory'] = $tcpdf['base_directory'].'fonts'.DIRECTORY_SEPARATOR; 66 67 68 /************************************************************ 69 * TCPDF disk cache settings 70 * ---------------------------------------------------------- 71 * Enable caching; Cache directory for TCPDF (make sure that 72 * it is writable by the webserver). 73 * 74 * ADD TRAILING SLASH! 75 ***********************************************************/ 76 77 $tcpdf['enable_disk_cache'] = false; 78 $tcpdf['cache_directory'] = Yii::app()->getConfig('tempdir').DIRECTORY_SEPARATOR; 79 80 81 /************************************************************ 82 * TCPDF image directory 83 * ---------------------------------------------------------- 84 * This is the image directory for TCPDF. This is where you 85 * can store images to use in your PDF files. 86 * 87 * ADD TRAILING SLASH! 88 ***********************************************************/ 89 90 //$tcpdf['image_directory'] = Yii::app()->getConfig('styledir').DIRECTORY_SEPARATOR.Yii::app()->getConfig('admintheme').DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR; 91 $tcpdf['image_directory'] = AdminTheme::getInstance()->path . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR; 92 93 /************************************************************ 94 * TCPDF default (blank) image 95 * ---------------------------------------------------------- 96 * This is the path and filename to the default (blank) 97 * image. 98 ***********************************************************/ 99 100 $tcpdf['blank_image'] = $tcpdf['image_directory'].'_blank.png'; 101 102 103 104 /*************************************************************************** 105 * DOCUMENT CONFIGURATION PARAMETERS 106 **************************************************************************/ 107 108 109 /************************************************************ 110 * TCPDF default page format 111 * ---------------------------------------------------------- 112 * This is the default page size. Supported formats include: 113 * 114 * 4A0, 2A0, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B0, 115 * B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, C0, C1, C2, C3, 116 * C4, C5, C6, C7, C8, C9, C10, RA0, RA1, RA2, RA3, RA4, 117 * SRA0, SRA1, SRA2, SRA3, SRA4, LETTER, LEGAL, EXECUTIVE, 118 * FOLIO 119 * 120 * Or, you can optionally specify a custom format in the form 121 * of a two-element array containing the width and the height. 122 ************************************************************/ 123 124 $tcpdf['page_format'] = 'A4'; 125 126 127 /************************************************************ 128 * TCPDF default page orientation 129 * ---------------------------------------------------------- 130 * Default page layout. 131 * P = portrait, L = landscape 132 ***********************************************************/ 133 134 $tcpdf['page_orientation'] = 'P'; 135 136 137 /************************************************************ 138 * TCPDF default unit of measure 139 * ---------------------------------------------------------- 140 * Unit of measure. 141 * mm = millimeters, cm = centimeters, 142 * pt = points, in = inches 143 * 144 * 1 point = 1/72 in = ~0.35 mm 145 * 1 inch = 2.54 cm 146 ***********************************************************/ 147 148 $tcpdf['page_unit'] = 'mm'; 149 150 151 /************************************************************ 152 * TCPDF auto page break 153 * ---------------------------------------------------------- 154 * Enables automatic flowing of content to the next page if 155 * you run out of room on the current page. 156 ***********************************************************/ 157 158 $tcpdf['page_break_auto'] = true; 159 160 161 /************************************************************ 162 * TCPDF text encoding 163 * ---------------------------------------------------------- 164 * Specify TRUE if the input text you will be using is 165 * unicode, and specify the default encoding. 166 ***********************************************************/ 167 168 $tcpdf['unicode'] = true; 169 $tcpdf['encoding'] = 'UTF-8'; 170 171 172 /************************************************************ 173 * TCPDF default document creator and author strings 174 ***********************************************************/ 175 176 $tcpdf['creator'] = 'TCPDF'; 177 $tcpdf['author'] = 'TCPDF'; 178 179 180 /************************************************************ 181 * TCPDF default page margin 182 * ---------------------------------------------------------- 183 * Top, bottom, left, right, header, and footer margin 184 * settings in the default unit of measure. 185 ***********************************************************/ 186 187 $tcpdf['margin_top'] = 27; 188 $tcpdf['margin_bottom'] = 27; 189 $tcpdf['margin_left'] = 15; 190 $tcpdf['margin_right'] = 15; 191 192 193 /************************************************************ 194 * TCPDF default font settings 195 * ---------------------------------------------------------- 196 * Page font, font size, header and footer fonts, 197 * HTML <small> font size ratio 198 ***********************************************************/ 199 200 $tcpdf['page_font'] = 'freesans'; 201 $tcpdf['page_font_size'] = 9; 202 $tcpdf['data_font'] = 'freesans'; 203 $tcpdf['data_font_size'] = 8; 204 $tcpdf['mono_font'] = 'freemono'; 205 206 $tcpdf['small_font_ratio'] = 2 / 3; 207 208 209 /************************************************************ 210 * TCPDF header settings 211 * ---------------------------------------------------------- 212 * Enable the header, set the font, default text, margin, 213 * description string, and logo 214 ***********************************************************/ 215 216 $tcpdf['header_on'] = true; 217 $tcpdf['header_font'] = $tcpdf['page_font']; 218 $tcpdf['header_font_size'] = 10; 219 $tcpdf['header_margin'] = 5; 220 //$tcpdf['header_title'] = 'TCPDF Example'; 221 //$tcpdf['header_string'] = "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org"; 222 $tcpdf['header_title'] = ''; 223 $tcpdf['header_string'] = ""; 224 //$tcpdf['header_logo'] = 'tcpdf_logo.jpg'; 225 $tcpdf['header_logo'] = ''; 226 $tcpdf['header_logo_width'] = 30; 227 228 229 /************************************************************ 230 * TCPDF footer settings 231 * ---------------------------------------------------------- 232 * Enable the header, set the font, default text, and margin 233 ***********************************************************/ 234 235 $tcpdf['footer_on'] = true; 236 $tcpdf['footer_font'] = $tcpdf['page_font']; 237 $tcpdf['footer_font_size'] = 8; 238 $tcpdf['footer_margin'] = 10; 239 240 241 /************************************************************ 242 * TCPDF image scale ratio 243 * ---------------------------------------------------------- 244 * Image scale ratio (decimal format). 245 ***********************************************************/ 246 247 $tcpdf['image_scale'] = 4; 248 249 250 /************************************************************ 251 * TCPDF cell settings 252 * ---------------------------------------------------------- 253 * Fontsize-to-height ratio, cell padding 254 ***********************************************************/ 255 256 $tcpdf['cell_height_ratio'] = 1.25; 257 $tcpdf['cell_padding'] = 0; 258 259 return $tcpdf; 260