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