diff options
Diffstat (limited to 'inc/3rdparty/libraries/mpdf/examples/example49_changelog.php')
-rw-r--r-- | inc/3rdparty/libraries/mpdf/examples/example49_changelog.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/inc/3rdparty/libraries/mpdf/examples/example49_changelog.php b/inc/3rdparty/libraries/mpdf/examples/example49_changelog.php new file mode 100644 index 00000000..279979db --- /dev/null +++ b/inc/3rdparty/libraries/mpdf/examples/example49_changelog.php | |||
@@ -0,0 +1,41 @@ | |||
1 | <?php | ||
2 | ini_set("memory_limit","384M"); | ||
3 | |||
4 | // This is because changelog.txt contains over 100000 characters, and preg_* functions in mPDF won't work. | ||
5 | ini_set("pcre.backtrack_limit","200000"); | ||
6 | |||
7 | include("../mpdf.php"); | ||
8 | |||
9 | $mpdf=new mPDF(); | ||
10 | |||
11 | $mpdf->tabSpaces = 6; | ||
12 | |||
13 | $mpdf->allow_charset_conversion=true; | ||
14 | $mpdf->charset_in='windows-1252'; | ||
15 | |||
16 | |||
17 | //============================================================== | ||
18 | |||
19 | $html = ' | ||
20 | <h1>mPDF</h1> | ||
21 | <h2>ChangeLog</h2> | ||
22 | <div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;"> | ||
23 | '; | ||
24 | $lines = file('../CHANGELOG.txt'); | ||
25 | |||
26 | $html .= '<pre>'; | ||
27 | foreach($lines AS $line) { | ||
28 | $html .= htmlspecialchars($line); | ||
29 | } | ||
30 | $html .= '</pre>'; | ||
31 | $html .= '</div>'; | ||
32 | |||
33 | //============================================================== | ||
34 | |||
35 | $mpdf->WriteHTML($html); | ||
36 | |||
37 | $mpdf->Output(); | ||
38 | exit; | ||
39 | |||
40 | |||
41 | ?> \ No newline at end of file | ||