-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathconfiguration.php
314 lines (264 loc) · 10.1 KB
/
configuration.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<?php
/*
* Formidable Pro PDF Extended Configuration
*/
/*
* Users can assign defaults to forms that aren't configured below.
* Note: this will only work if the configuration option FPPDF_SET_DEFAULT_TEMPLATE is set to true (located at the bottom of this file).
*
* Users can use any configuration option like you would for a singular form, including:
* notifications, template, filename, pdf_size, orientation, security and rtl
*/
global $fp_pdf_default_configuration;
$fp_pdf_default_configuration = array(
'template' => 'default-template.php',
'pdf_size' => 'A4',
);
/*
* ------------------------------------------------------------
* Bare minimum configuration code
* Usage: Will generate PDF and send to all notifications
* Remove the comments around the code blocks below to use (/*)
* form_id Mixed - Integer or Array. Required. The Formidable Pro ID you are assigning the PDF to.
* notifications Mixed - Integer, Boolean or Array.
*
* Remove the comments around the code blocks below to use (/*)
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
);*/
/*
* ------------------------------------------------------------
* Default template specific configuration code
*
* Usage:
* 'default-show-html' - This option will display HTMl blocks in your default tempalte.
* 'default-show-empty' - All form fields will be displayed in the PDF, regardless of what the user input is.
*
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'template' => 'default-template.php',
'default-show-html' => true,
);*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'template' => 'default-template.php',
'default-show-empty' => true,
);*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'template' => 'default-template.php',
'default-show-html' => true,
'default-show-empty' => true,
);*/
/*
* ------------------------------------------------------------
* Notification Options
* notifications Mixed - String, Boolean or Array.
* Notifications can be a string like 'Admin Notifications', an array with multiple notification names or true to send to all.
* Notification IDs can be found to the very right of the From/Reply to field in the 'Emails' form setting section ( Forms -> Settings -> Emails )
* See http://formidablepropdfextended.com/faq/find-notification-id/ for a screenshot of the notification ID.
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => 1,
);*/
/*$fp_pdf_config[] = array(
'form_id' => '1',
'notifications' => array(1,3,5),
);*/
/*
* ------------------------------------------------------------
* Custom Template
* Don't want to use a default template? Just pass the custom template name to the configuration.
*
* template String. Default default-template.php. The name of your custom template that's placed in your active theme's FORMIDABLE_PDF_TEMPLATES folder.
*
* For more information about creating custom templates please see http://formidablepropdfextended.com/documentation-v1/templates/
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => 1,
'template' => 'example-float-and-positioning05.php',
);*/
/*$fp_pdf_config[] = array(
'form_id' => 2,
'notifications' => 1,
'template' => 'example-basic-html01.php',
);*/
/*
* ------------------------------------------------------------
* Multiple Forms
* If you have multiple forms that use the same PDF template then you can pass the form_id through as an array.
* WARNING: If using a custom template with this option, your secondary forms should be a duplicate of the original and you shouldn't delete any fields
* otherwise the custom template won't show correctly.
*/
/*$fp_pdf_config[] = array(
'form_id' => array(1,5,6),
'notifications' => true,
);*/
/*
* ------------------------------------------------------------
* Custom File Name
* Will change the filename of the PDF which is attached
* You are also able to use field ID/Keys in filename ([sitename], [ip], [id], [key], [20], [ltzq9])
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'filename' => 'New PDF Name.pdf',
);*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'filename' => 'New PDF Name [id].pdf' ,
);*/
/*
* ------------------------------------------------------------
* Custom PDF Size / Orientation
* PDF Size can be set to the following:
*
* A0 - A10, B0 - B10, C0 - C10
* 4A0, 2A0, RA0 - RA4, SRA0 - SRA4
* Letter, Legal, Executive, Folio
* Demy, Royal
*
* Default: A4
* You can also pass the PDF size as an array, represented in millimetres - array(width, height).
*
* NOTE: By default the orientation is portrait so you only need to add it for landscape PDFs
*/
/* Letter-sized Document */
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'pdf_size' => 'letter',
);*/
/* Custom PDF Size */
/* $fp_pdf_config[] = array(
'form_id' => 1,
'attachments' => true,
'pdf_size' => array(50, 200),
);*/
/* Change orientation */
/* $fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'pdf_size' => 'letter',
'orientation' => 'landscape',
);*/
/*
* ------------------------------------------------------------
* PDF Security
* Allows you to password protect your PDF document, place a master password on the document which prevents document tampering and restricts user behaviour.
*
* security Boolean. Default false. If true the security settings will be applied.
* pdf_password String. Default blank.
* pdf_privileges Array
* Assign user privileges to the document. Valid privileges include: copy, print, modify, annot-forms, fill-forms, extract, assemble, print-highres
* pdf_master_password String. Default random generated. Set a master password on the PDF which stops the PDF from being modified.
* NOTE: As the document is encrypted in 128-bit print will only allow users to print a low resolution copy.
* Use print-highres to print full resolution image.
* NOTE: The use of print will only allow low-resolution printing from the document; you must specify print-highres to allow full resolution printing.
* NOTE: If pdf_master_password is omitted a random one will be generated
* NOTE: Passing a blank array or not passing anything to pdf_privileges will deny all permissions to the user
*/
/*
* Setting security settings with all values
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'filename' => 'Test.pdf',
'orientation' => 'landscape',
'security' => true,
'pdf_password' => 'myPDFpass',
'pdf_privileges' => array('copy', 'print', 'modify', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-highres'),
'pdf_master_password' => 'admin password',
);*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'filename' => 'Test2.pdf',
'template' => 'example-template.php',
'orientation' => 'landscape',
'security' => true,
'pdf_password' => 'myPDFpass',
'pdf_privileges' => array('copy', 'print', 'modify', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-highres'),
'pdf_master_password' => 'admin password',
);*/
/*
* Set password to PDF.
* Deny all permissions to user
* Random master password will be generated
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'security' => true,
'pdf_password' => 'myPDFpass',
);*/
/*
* No password required to open PDF document.
* Deny all permissions to user
* Master password set
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'security' => true,
'pdf_master_password' => 'admin password',
);*/
/*
* No password required to open PDF document.
* User can copy, print and modify PDF
* Random master password will be generated
*
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'security' => true,
'pdf_privileges' => array('copy', 'print', 'modify', 'print-highres'),
);*/
/*
* ------------------------------------------------------------
* Right to Left Language Support
* We now support RTL languages.
* rtl Boolean. Default false.
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'notifications' => true,
'rtl' => true,
);*/
/*
* ------------------------------------------------------------
* Disable Notifications
* If you don't need to send notifications and just want a custom PDF generated
* via the admin area you can forgo the notifications attribute
*/
/*$fp_pdf_config[] = array(
'form_id' => 1,
'template' => 'example-template.php',
);*/
/* ---------------------------------------------------------------
* CUSTOM PDF SETUP BELOW.
* See http://formidablepropdfextended.com/documentation-v1/installation-and-configuration/#constants for more details
*/
/*
* By default, forms that don't have PDFs assigned through the above configuration
* will automatically use the default template in the admin area.
* Set to false to disable this feature.
*/
define('FPPDF_SET_DEFAULT_TEMPLATE', true);
/*
* MEMORY ISSUES?
* Try setting the options below to true to help reduce the memory footprint of the package.
*/
define('FP_PDF_ENABLE_MPDF_LITE', true); /* strip out advanced features like advanced table borders, terms and conditions, columns, index, bookmarks and barcodes. */
define('FP_PDF_ENABLE_MPDF_TINY', false); /* if your tried the lite version and are still having trouble the tiny version includes the bare minimum features. There's no positioning, float, watermark or form support */
define('FP_PDF_DISABLE_FONT_SUBSTITUTION', false); /* reduced memory by stopping font substitution */
define('FP_PDF_ENABLE_SIMPLE_TABLES', false); /* disable the advanced table feature and forces all cells to have the same border, background etc. */