aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/mpdf/examples/example20_justify.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/3rdparty/libraries/mpdf/examples/example20_justify.php')
-rw-r--r--inc/3rdparty/libraries/mpdf/examples/example20_justify.php130
1 files changed, 0 insertions, 130 deletions
diff --git a/inc/3rdparty/libraries/mpdf/examples/example20_justify.php b/inc/3rdparty/libraries/mpdf/examples/example20_justify.php
deleted file mode 100644
index 7e9f8962..00000000
--- a/inc/3rdparty/libraries/mpdf/examples/example20_justify.php
+++ /dev/null
@@ -1,130 +0,0 @@
1<?php
2
3
4$html = '
5<h1>mPDF</h1>
6<h2>Justification</h2>
7
8<h4>Tables</h4>
9<p>Text can be justified in table cells using in-line or stylesheet CSS. (Note that &lt;p&gt; tags are removed within cells along with any style definition or attributes.)</p>
10<table class="bpmTopnTailC"><thead>
11<tr class="headerrow"><th>Col/Row Header</th>
12<td>
13<p>Second column header p</p>
14</td>
15<td>Third column header</td>
16</tr>
17</thead><tbody>
18<tr class="oddrow"><th>Row header 1</th>
19<td>This is data</td>
20<td>This is data</td>
21</tr>
22<tr class="evenrow"><th>Row header 2</th>
23<td>
24<p>This is data p</p>
25</td>
26<td>
27<p>This is data</p>
28</td>
29</tr>
30<tr class="oddrow"><th>
31<p>Row header 3</p>
32</th>
33<td>
34<p>This is long data</p>
35</td>
36<td>This is data</td>
37</tr>
38<tr class="evenrow"><th>
39<p>Row header 4</p>
40<p>&lt;th&gt; cell acting as header</p>
41</th>
42<td style="text-align:justify;"><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p></td>
43<td>
44<p>This is data</p>
45</td>
46</tr>
47<tr class="oddrow"><th>Row header 5</th>
48<td>Also data</td>
49<td>Also data</td>
50</tr>
51<tr class="evenrow"><th>Row header 6</th>
52<td>Also data</td>
53<td>Also data</td>
54</tr>
55<tr class="oddrow"><th>Row header 7</th>
56<td>Also data</td>
57<td>Also data</td>
58</tr>
59<tr class="evenrow"><th>Row header 8</th>
60<td>Also data</td>
61<td>Also data</td>
62</tr>
63</tbody></table>
64<p>&nbsp;</p>
65
66<h4>Testing Justification with Long Words</h4>
67<p>http://www-950.ibm.com/software/globalization/icu/demo/converters?s=ALL&amp;snd=4356&amp;dnd=4356</p>
68<h5>Should not split</h5>
69<p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplit</i> neque sit amet erat</p>
70<p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend et <i>verylongwordthatwontsplit</i> neque sit amet erat</p>
71
72<h5>Non-breaking Space &amp;nbsp;</h5><p>The next example has a non-breaking space between <i>eleifend</i> and the very long word.</p><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend&nbsp;verylongwordthatwontsplitanywhere neque sit amet erat</p><p>Nbsp will only work in fonts that have a glyph to represent the character i.e. not in the CJK languages nor some Unicode fonts.</p>
73
74
75
76<h4>Testing Justification with mixed Styles</h4>
77<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
78<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s> and then more text.
79</p>
80<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big>
81</p>
82<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small>
83</p>
84
85<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p>
86<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s> then more text.
87</p>
88<p></p>
89<p style="font-size:7pt;">
90<big>Repeated in BIG: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big>
91</p>
92';
93
94//==============================================================
95//==============================================================
96//==============================================================
97include("../mpdf.php");
98
99$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13);
100
101$mpdf->SetDisplayMode('fullpage');
102
103// LOAD a stylesheet
104$stylesheet = file_get_contents('mpdfstyletables.css');
105$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
106
107$mpdf->WriteHTML($html);
108
109// SPACING
110$mpdf->WriteHTML("<h4>Spacing</h4><p>mPDF uses both letter- and word-spacing for text justification. The default is a mixture of both, set by the configurable values jSWord and jSmaxChar. (Only word spacing is used when cursive languages such as Arabic or Indic are detected.) </p>");
111
112$mpdf->jSWord = 0; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
113$mpdf->jSmaxChar = 0; // Maximum spacing to allocate to character spacing. (0 = no maximum)
114$mpdf->WriteHTML("<h5>Character spacing</h5><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>");
115
116// Back to default settings
117$mpdf->jSWord = 0.4;
118$mpdf->jSmaxChar = 2;
119$mpdf->WriteHTML("<h5>Word spacing</h5><p style=\"letter-spacing:0\">Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>");
120
121$mpdf->WriteHTML("<h5>Mixed Character and Word spacing</h5><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>");
122
123
124
125
126$mpdf->Output();
127exit;
128
129
130?> \ No newline at end of file