aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/mpdf/examples/example49_changelog.php
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-07-24 15:49:36 +0200
committertcit <tcit@tcit.fr>2014-07-24 15:49:36 +0200
commit4188f38ad56d7ba2ea46e94403f305243514f80c (patch)
treef357ddbd0d846ebae0ecf5d2ab00d6b7dd6eb8d5 /inc/3rdparty/libraries/mpdf/examples/example49_changelog.php
parent2b58426b2d4a7f1585d5d7667c0a4fbea4cd29dd (diff)
downloadwallabag-4188f38ad56d7ba2ea46e94403f305243514f80c.tar.gz
wallabag-4188f38ad56d7ba2ea46e94403f305243514f80c.tar.zst
wallabag-4188f38ad56d7ba2ea46e94403f305243514f80c.zip
add pdf and mobi libraries
Diffstat (limited to 'inc/3rdparty/libraries/mpdf/examples/example49_changelog.php')
-rw-r--r--inc/3rdparty/libraries/mpdf/examples/example49_changelog.php41
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
2ini_set("memory_limit","384M");
3
4// This is because changelog.txt contains over 100000 characters, and preg_* functions in mPDF won't work.
5ini_set("pcre.backtrack_limit","200000");
6
7include("../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>';
27foreach($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();
38exit;
39
40
41?> \ No newline at end of file