From 4188f38ad56d7ba2ea46e94403f305243514f80c Mon Sep 17 00:00:00 2001 From: tcit Date: Thu, 24 Jul 2014 15:49:36 +0200 Subject: add pdf and mobi libraries --- .../example57_new_mPDF_v5-3_active_forms_b.php | 234 +++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 inc/3rdparty/libraries/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php (limited to 'inc/3rdparty/libraries/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php') diff --git a/inc/3rdparty/libraries/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php b/inc/3rdparty/libraries/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php new file mode 100644 index 00000000..0d652227 --- /dev/null +++ b/inc/3rdparty/libraries/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php @@ -0,0 +1,234 @@ + +textarea { +} +input { +} +select { + font-family: arialunicodems +} + + +

Active Forms

+ +
+Input Text + +

+ +Readonly + +

+ +Disabled + +

+ +Required + +

+ +Hidden + +

+ +Input Password + +

+ +Calculations + + + = + +

+ + +Textarea + +

+ + +First language + +     + +You have selected: + +

+ + +
+Spoken language(s)
+ +
+

+ + + +How many languages do you speak?      + One      + Two      + Three      + Four      + Five + + +

+ + + Please send me regular information by e-mail
+ Please phone me (not available at present)
+ Please subscribe me to the Newsletter +

+ +

+ +Click this button to see Javascript in action: + + +

+ + + + + + + + + + +

+ + +
+'; + + +//============================================================== +if ($_REQUEST['html']) { echo $html; exit; } +if ($_REQUEST['source']) { + $file = __FILE__; + header("Content-Type: text/plain"); + header("Content-Length: ". filesize($file)); + header("Content-Disposition: attachment; filename='".$file."'"); + readfile($file); + exit; +} + +//============================================================== +$mpdf->useActiveForms = true; +$mpdf->formUseZapD = false; + +/* +// Try playing around with these (these are also in config.php) +$mpdf->formUseZapD = false; +$mpdf->formSubmitNoValueFields = true; + +$mpdf->formExportType = 'xfdf'; // 'html' or 'xfdf' +$mpdf->formSelectDefaultOption = true; // for Select drop down box; if no option is explicitly maked as selected, + // this determines whether to select 1st option (as per browser) + // - affects whether "required" attribute is relevant +$mpdf->form_border_color = '0.0 0.820 0.0'; +$mpdf->form_background_color = '0.941 0.941 0.941'; +$mpdf->form_border_width = '1'; +$mpdf->form_border_style = 'S'; + +$mpdf->form_radio_color = '0.0 0.820 0.0'; +$mpdf->form_radio_background_color = '0.941 0.5 0.5'; + +$mpdf->form_button_border_color = '0.0 0.820 0.0'; +$mpdf->form_button_background_color = '0.941 0.941 0.941'; +$mpdf->form_button_border_width = '1'; +$mpdf->form_button_border_style = 'S'; +*/ + +$mpdf->WriteHTML($html); + +//============================================================== +// JAVASCRIPT FOR WHOLE DOCUMENT +$mpdf->SetJS(' +var dialogTitle = "Enter details"; +var defaultAnswer = ""; +var reply = app.response("This is javascript set to run when the document opens. Enter value for first field", dialogTitle, defaultAnswer); +if (reply != null) { +this.getField("inputfield").value = reply; +} +'); +//============================================================== +// OUTPUT +$mpdf->Output(); exit; + + +//============================================================== +//============================================================== +//============================================================== +//============================================================== + + +?> \ No newline at end of file -- cgit v1.2.3