-
Notifications
You must be signed in to change notification settings - Fork 148
/
example_test.php
1935 lines (1610 loc) · 113 KB
/
example_test.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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
set_time_limit(600);
ini_set("memory_limit","256M");
define('_MPDF_URI','../'); // must be a relative or absolute URI - not a file system path
define('_MPDF_PATH', '../');
define("_TTF_FONT_NORMAL", 'arial.ttf');
define("_TTF_FONT_BOLD", 'arialbd.ttf');
require_once __DIR__ . '/bootstrap.php';
$lorem = 'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec mattis lacus ac purus feugiat semper. Donec aliquet nunc odio, vitae pellentesque diam. Pellentesque sed velit lacus. Duis quis dui quis sem consectetur sollicitudin. Cras dolor quam, dapibus et pretium sit amet, elementum vel arcu. Duis rhoncus facilisis erat nec mattis. In hac habitasse platea dictumst. Vivamus hendrerit sem in justo aliquet a pellentesque lorem scelerisque. Suspendisse a augue sed urna rhoncus elementum. Aliquam erat volutpat. Sed et orci non massa venenatis venenatis sit amet non nulla. Fusce condimentum velit urna, sed convallis ligula. Aenean vehicula purus ac dui imperdiet varius. Curabitur justo lorem, vehicula in suscipit sit amet, pharetra ut mi. Ut nunc mauris, dapibus vitae elementum faucibus, posuere sed nisl. Vestibulum et turpis eu enim tempor iaculis. Ut venenatis mattis dolor, nec iaculis tellus malesuada vel. Curabitur eu nibh sit amet sem eleifend interdum ac eu lorem. Sed feugiat, nibh tempus porta pulvinar, nisl sem aliquet odio, idluctus augue eros eget lacus. ';
$mpdf = new \Mpdf\Mpdf();
/*
$mpdf->fonttrans = array_merge($mpdf->fonttrans, array(
'arial' => 'chelvetica',
'helvetica' => 'chelvetica',
'timesnewroman' => 'ctimes',
'times' => 'ctimes',
'couriernew' => 'ccourier',
'courier' => 'ccourier',
'sans' => 'chelvetica',
'sans-serif' => 'chelvetica',
'serif' => 'ctimes',
'mono' => 'ccourier',
));
*/
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
$header = array(
'L' => array(
),
'C' => array(
),
'R' => array(
'content' => '{PAGENO}{nbpg}',
'font-family' => 'sans',
'font-style' => '',
'font-size' => '9', /* gives default */
),
'line' => 1, /* 1 or 0 to include line above/below header/footer */
);
//$mpdf->SetHeader($header,'O');
//$mpdf->SetHTMLFooter($footer);
//==============================================================
//$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins (1 or 0)
//$mpdf->showImageErrors = true;
//$mpdf->SetDisplayMode('fullpage');
//$mpdf->useLang = false;
//$mpdf->useAutoFont = true;
//$mpdf->ignore_invalid_utf8 = true;
//$mpdf->keepColumns = true;
//$mpdf->use_kwt = true;
//$mpdf->hyphenate = true;
//$mpdf->SetProtection(array('copy','print','modify','annot-forms'));
//$mpdf->SetProtection(array('copy','print','modify','annot-forms'),'',null,128);
//$mpdf->SetProtection(array('copy','print','modify','annot-forms','fill-forms','extract','assemble','print-highres'),'',null);
//$mpdf->SetTitle("\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3");
//$mpdf->SetAuthor("\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3");
//$mpdf->SetWatermarkText("\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3");
//$mpdf->showWatermarkText = true;
//$mpdf->watermark_font = 'DejaVuSansCondensed';
//$mpdf->SetCompression(false);
//$mpdf->text_input_as_HTML = true;
//$mpdf->annotMargin = -8;
//$mpdf->title2annots = true;
//$mpdf->Annotation('An annotation', 145, 24, 'Comment', "Ian Back", "My Subject", 0.7, array(127, 127, 255));
//$mpdf->collapseBlockMargins = false; // mPDF 4.2 Allows top and bottom margins to collapse between block elements
//$mpdf->allow_charset_conversion = true;
//$mpdf->charset_in = 'win-1251';
//$mpdf->useSubstitutions = true;
//$mpdf->useActiveForms = true;
//$mpdf->simpleTables = true; // Forces all cells to have same border, background etc. Improves performance
//$mpdf->packTableData = true; // Reduce memory usage processing tables (but with increased processing time)
// Using disk to cache table data can reduce memory usage dramatically, but at a cost of increased
// executon time and disk access (read and write)
//$mpdf->cacheTables = true;
//==============================================================
//$mpdf->SetImportUse();
//$mpdf->SetSourceFile('example_all.pdf');
//$tplIdx = $mpdf->ImportPage(9);
//$mpdf->UseTemplate($tplIdx);
//==============================================================
//==============================================================
//$mpdf->debug = true;
//$mpdf->showStats = true;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
/*
// 4.3.003 TEST
$html = '<div style="width: 170mm; text-align: justify; border: 0.2mm solid #000000;">Browser doesn\'t justify text before a BR <br />Browser does justify text before an IMG <img src="assets/clematis.jpg" style="width:150mm; height: 5;" /></div>
<div style="width: 170mm; text-align: justify; border: 0.2mm solid #000000;">Browser doesn\'t justify text before a HR <hr width="80%"/>Browser does justify text before an IMG<img src="assets/clematis.jpg" style="width:150mm; height: 5;" /></div>
<div style="width: 170mm; text-align: justify; border: 0.2mm solid #000000;">Browser does justify text before a TEXTAREA <textarea name="authors" rows="5" cols="70" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea>
</div>
<div style="width: 170mm; text-align: justify; border: 0.2mm solid #000000;">Browser does justify text before a SELECT <select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending Incomplete record - pending Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> </div>';
//$html = '<div style="text-align: justify; border: 0.2mm solid #000000;">If you want a single line of text to justify you need to do this<br /></div>';
//$mpdf->justifyB4br = true;
//$mpdf->jSWord = 0.4; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
//$mpdf->jSmaxChar = 0.25; // Maximum spacing to allocate to character spacing. (0 = no maximum)
*/
//==============================================================
//==============================================================
//==============================================================
//==============================================================
/*
// CJK Fonts
$fonts = array(
array('gb', 'GB (Chinese Simpl. Adobe)'),
array('big5', 'BIG-5 (Chinese Trad. Adobe)'),
array('sjis', 'SJIS (Japanese Adobe)'),
array('arialunicodems', 'Arial Unicode MS'),
array('cyberbit', 'CyberBit'),
array('sun-exta', 'Sun-ExtA'),
array('hannoma', 'Han Nom A'),
array('mingliu', 'MingLiU'),
array('mingliu_hkscs', 'MingLiU_HKSCS'),
array('arplumingcn', 'AR PL Uming CN'),
array('arpluminghk', 'AR PL Uming HK'),
array('arplumingtw', 'AR PL Uming TW'),
);
$chars = array('34c7','4eca','4ede','4f3b','4fae','508e','50a6','50c7','517e','518f','51b2','5203','520f','5222','55c2','57d2','6b21','87a0','8880','8a03',
'4EE4',
'76F4',
'9AA8',
'9F31',
'2493F',
);
$html .= "
<div style=\"font-family:arialunicodems;\">
<table border=\"1\">
<thead>
<tr style=\"text-rotate:90\">
<th></th>
";
foreach($fonts AS $f) {
$html .= "<th style=\"vertical-align: bottom;font-family:".$f[0]." ;\">".$f[1]."</th>";
}
$html .= "
</tr>
</thead>
";
foreach($chars AS $char) {
$html .= "<tr><td>U+".strtoupper($char)."</td>";
foreach($fonts AS $f) {
$html .= "<td style=\"font-family:".$f[0].";\">&#x".$char.";</td>";
}
$html .= "</tr>
";
}
$html .= "</table>
</div>
";
*/
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
/*
$html = '
<style>
div.cjk {
font-family: GB;
border:1px solid #888888;
width: 40mm;
margin-bottom: 1em;
}
</style>
mPDF 5.6.40
Bug fix
';
$mpdf->WriteHTML($html);
$mpdf->allowCJKorphans = false; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$html = '
<div class="cjk" style="">部部部部部部部部部部</div>
CJKleading Leading characters - Not allowed at end of line 々<br />
<div class="cjk" style="">部部部部部部部部部々部</div>
CJKfollowing Following characters - Not allowed at start ォ<br />
<div class="cjk" style="">部部部部部部部部部部ォ</div>
';
$mpdf->WriteHTML($html);
//==============================================================
$mpdf->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$html = '
CJKfollowing Following characters - Not allowed at start ォ<br />
<div class="cjk" style="">部部部部部部部部部部ォ</div>
<hr />
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'left';
$mpdf->allowCJKorphans = false; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$html = '
CJKoverflow Characters which are allowed to overflow the right margin ,<br />
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'justify';
$mpdf->allowCJKorphans = false; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$html = '
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'left';
$mpdf->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = true; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$html = '
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'left';
$mpdf->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$html = '
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'justify';
$mpdf->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$html = '
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'justify';
$mpdf->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = true; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$html = '
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
// CJK Line-breaking
$align = 'justify';
$mpdf->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow [default true]
$mpdf->allowCJKoverflow = true; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables) [default false]
$mpdf->CJKforceend = true;
$html = '
text-align: '.$align.';
$mpdf->allowCJKorphans = '.$mpdf->allowCJKorphans.';
$mpdf->allowCJKoverflow = '.$mpdf->allowCJKoverflow.';
$mpdf->CJKforceend = '.$mpdf->CJKforceend .';
<div class="cjk" style="text-align: '.$align.'; ">部部部部部部部部部部,</div>
';
$mpdf->WriteHTML($html);
//==============================================================
*/
//==============================================================
//==============================================================
//==============================================================
// Tai Tham (Lanna script)
$htmlx = '
<div style="font-family:lannaalif">
<p>ᨢ᩶ᩣᨧᩮᩢ᩶ᩣᨸᩮᩢ᩠ᨶᩈᩣ᩠ᩅᨩ᩠ᨿᨦᩉ᩠ᨾᩲ᩵ ᩉ᩠ᨾᩯᨷᩴ᩵ᩬᨴᩮᩢ᩵ᩣᨯᩲᨠᩴ᩶ᩬᨧᩡᨸᩮᩢ᩠ᨶᩈᩣ᩠ᩅᩃᩯ᩠᩶ᩅ ᨲᩧ᩠ᨦᩅᩢ᩠ᨶᨾᩦᨷ᩵ᩤ᩠ᩅᨾᩣᩋᩯ᩠᩵ᩅ ᨾᩣᩋᩪ᩶ᨾᩣᨪᩯ᩠ᩅ ᨸᩮᩢ᩠ᨶᨤᩫ᩠ᨶᩃᨻᩪᩁ</p>
<p>ᨢ᩶ᩣᨧᩮᩢ᩶ᩣᨧᩡᩮᩃᩥᩬᨠᩋᩮᩢᩣᨹᩱ ᩋ᩶ᩣ᩠ᨿᨷ᩵ᩤ᩠ᩅᨩ᩠ᨿᨦᩁᩣ᩠ᨿᨩᩨ᩵ᨠᩯ᩠᩶ᩅᨾᩣᩃᩪᩁ ᩋ᩶ᩣ᩠ᨿᨠᩬᨦᨤᩫ᩠ᨶᨻᩯ᩵ᨢ᩠ᨿᩅᨨᩩᨶ ᩋ᩶ᩣ᩠ᨿᨤᩴᩣᩋ᩶ᩣ᩠ᨿᨾᩪᩁ ᩋ᩶ᩣ᩠ᨿᩈᩫ᩠ᨾᩋ᩶ᩣ᩠ᨿᨾᩦ</p>
<p>ᨻᩮᩥ᩠᩵ᨶᨷᩬᨠᩅ᩵ᩤᨧᩡᨾᩣᨢᩴᩬᨢ᩶ᩣᨧᩮᩢ᩶ᩣᨠᩴᩬᩁᩴᩬᨾᩣᩃᩯ᩠᩶ᩅᨸᩮᩢ᩠ᨶᨸᩦ ᨻᩴ᩵ᩬᨾᩯ᩵ᨳ᩶ᩣᨸᩪᩈᩁᩦᩋ᩶ᩣ᩠ᨿᨷ᩵ᩤ᩠ᩅᨲᩫ᩠ᩅᨯᩦᩉᩣ᩠ᨿᨪᩯ᩠ᨷᩉᩣ᩠ᨿᩈᩬ᩠ᨿ ᨢ᩶ᩣᨧᩮᩢ᩶ᩣᨷᩴ᩵ᩬᨩᩮᩥ᩵ᩬᩋᩉᩯ᩠ᨾᩃᩯ᩠᩶ᩅ ᨧᩡᨲᩯ᩠᩵ᨦᨠᩢ᩠ᨷᨾᩯ᩠᩶ᩅᨸᩱᩀᩪ᩵ᨸᩖᩣ᩠ᨿᨯᩬ᩠ᨿᨢᩣ᩠ᨿᨹ᩶ᩣ ᨢᩣ᩠ᨿᨻᩮᨩ᩠ᩁ᩺ ᨢᩣ᩠ᨿᨻᩖᩬ᩠ᨿᨢᩣ᩠ᨿᩉ᩠ᩅᩯᩁᨢᩣ᩠ᨿᩈᩕᩬ᩠ᨿᩀᩪ᩵ᨷᩫ᩠ᨶᨯᩬ᩠ᨿᨸᩩᨿ</p>
</div>
';
//==============================================================
//==============================================================
//==============================================================
//==============================================================
// TEST DOUBLE BORDER
//$mpdf->SetColumns(3);
$htmlx = '
<div style="background-color:#ddddff; padding: 10px;">
<div style="border-left:#ff0000 solid 16pt; border-right: #0000ff double 46pt; border-top: #00ff00 double 26pt; border-bottom: #880088 double 26pt; margin-bottom: 1em;">
Hallo World
</div>
<div style="border-left:#ff0000 double 16pt; border-right: #0000ff solid 16pt; border-top: #00ff00 solid 26pt; border-bottom: #880088 dotted 16pt; margin-bottom: 1em;">
Hallo World
</div>
<div style="border-left:#ff0000 solid 16pt; border-right: #0000ff solid 16pt; border-top: #00ff00 solid 26pt; border-bottom: #880088 solid 26pt; margin-bottom: 1em;">
Hallo World
</div>
<div style="border-left:#ff0000 solid 16pt; border-right: #0000ff solid 16pt; border-top: #00ff00 solid 26pt; border-bottom: none; margin-bottom: 1em;">
Hallo World
</div>
<br />
<div style="border-left:#ff0000 double 16pt; border-right: #0000ff double 16pt; border-top: #00ff00 double 26pt; border-bottom: #880088 solid 26pt; margin-bottom: 1em;">
Hallo World
</div>
<div style="border-left:#ff0000 double 16pt; border-right: #0000ff solid 16pt; border-top: #00ff00 double 26pt; border-bottom: #880088 solid 26pt; margin-bottom: 1em;">
Hallo World
</div>
<div style="border-radius: 35pt; padding: 1em; border-left:#ff0000 double 16pt; border-right: #0000ff double 16pt; border-top: #00ff00 double 26pt; border-bottom: #880088 double 26pt; margin-bottom: 1em;">
Hallo World
</div>
<div style="border-radius: 35pt; padding: 1em; border-left:#ff0000 solid 16pt; border-right: #0000ff solid 16pt; border-top: #00ff00 solid 26pt; border-bottom: #880088 solid 26pt; margin-bottom: 1em;">
Hallo World
</div>
</div>
<div style="background-color:#ffdddd; padding: 0;">
<div style="padding: 1em; margin-bottom: 1em; font-family: arial; border-bottom: 42px double #666; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 36px double #00F; ">Hallo World</div>
<div style="padding: 1em; margin-bottom: 1em; font-family: arial; border-bottom: 42px double #666; border-left: 16px solid #F00; border-top: 28px solid #0F0; border-right: 36px double #00F; ">Hallo World</div>
<div style="padding: 1em; margin-bottom: 1em; font-family: arial; border-bottom: 42px solid #666; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 36px solid #00F; ">Hallo World</div>
</div>
<table style="border-collapse: collapse;"><tr>
<td style="font-family: arial; border-bottom: 42px double #0FF; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 16px double #00F; "> A whole new world </td>
</tr>
</table>
<table style="border-collapse: none;"><tr>
<td style="font-family: arial; border-bottom: 42px double #0FF; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 16px double #00F; "> A whole new world </td>
</tr>
</table>
<table style="border-collapse: none;"><tr>
<td style="font-family: arial; border: 16px double #F00; border-top: 16px double #0F0;"> A whole new world </td>
</tr>
</table>
<div style="background-color:#ffdddd">
<table style="border-collapse: collapse;">
<tr>
<td style="font-family: arial; border-bottom: 42px double #0FF; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 16px double #00F; "> A whole new world </td>
</tr>
<tr>
<td style="font-family: arial; border-bottom: 42px double #0FF; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 16px double #00F; "> A whole new world </td>
</tr>
</table>
<table style="border-collapse: none;"><tr>
<td style="font-family: arial; border-bottom: 42px double #0FF; border-left: 16px double #F00; border-top: 28px double #0F0; border-right: 16px double #00F; "> A whole new world </td>
</tr>
</table>
<table style="border-collapse: none;"><tr>
<td style="font-family: arial; border: 16px double #F00; border-top: 16px double #0F0;"> A whole new world </td>
</tr>
</table>
</div>
<form>
<fieldset style="border: 4px double red; border-radius: 5px; padding-left: 15px; border-right-color: green;">
<legend>Fieldset and legend</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
</fieldset>
</form>
<form>
<fieldset style="border: 4px solid red; border-radius: 5px; padding-left: 15px; border-right-color: green;">
<legend>Fieldset and legend</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
</fieldset>
</form>
<form>
<fieldset style="border: 4px dashed red; border-radius: 5px; padding-left: 15px; border-right-color: green;">
<legend>Fieldset and legend</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
</fieldset>
</form>
<form>
<fieldset style="border: 4px solid red; padding-left: 15px; border-right-color: green;">
<legend style="font-family:dejavusanscondensed; font-kerning:normal">AWAY To War</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
</fieldset>
</form>
<form>
<fieldset style="border: 4px double red; padding-left: 15px; border-right-color: green;">
<legend>Fieldset and legend</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
</fieldset>
</form>
<form>
<fieldset style="border: 4px dashed red; padding-left: 15px; border-right-color: green;">
<legend style="font-family:dejavusanscondensed; font-kerning:normal">AWAY To War</legend>
<p>Support for fieldset and legend was introduced in mPDF v5.5. Consider it experimental!</p>
</fieldset>
</form>
';
$mpdf->useKerning = true;
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
function SVGarcpath($start, $end, $cx = 50, $cy = 50, $r = 48) {
$start = deg2rad($start);
$end = deg2rad($end);
while ($end < $start) { $end += (M_PI*2); }
if (($end - $start) > M_PI) { $largearcflag = 1; }
else { $largearcflag = 0; }
$start = $start-(M_PI/2); // Adjust to start from the top=0 degrees
while ($start < 0) { $start += (M_PI*2); }
$end = $end-(M_PI/2);
while ($end < 0) { $end += (M_PI*2); }
$commands = array('M', $cx, $cy,
'l', $r * cos($start), $r * sin($start),
'A', $r, $r, 0, $largearcflag, 1, $cx + ($r * cos($end)), $cy + ($r * sin($end)),
"z");
$c = implode(' ', $commands);
return $c;
}
function SVGpie($segs, $w=30, $backgroundcolor="none", $linecolor="none", $linewidth=0, $seglinecolor="none", $seglinewidth=0) {
// $w is a number (? pixels)
// $seglinewidth is a number (? pixels)
$os = (max($seglinewidth,$linewidth))/2;
$svg = '<svg width="'.$w.'" height="'.$w.'" viewBox="0,0,'.$w.','.$w.'" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'."\n";
if ($backgroundcolor != "none") {
$svg .= '<g stroke="none" fill="'.$backgroundcolor.'"><circle cx="'.($w/2).'" cy="'.($w/2).'" r="'.(($w/2)-$os).'" /></g>'."\n";
}
foreach($segs AS $arc) {
$path = SVGarcpath($arc[0], $arc[1], ($w/2), ($w/2), ($w/2)-$os);
$svg .= '<g stroke="'.$seglinecolor.'" stroke-width="'.$seglinewidth.'" fill="'.$arc[2].'"><path d="'.$path.'" /></g>'."\n";
}
if ($linecolor != "none") {
$svg .= '<g stroke="'.$linecolor.'" stroke-width="'.$linewidth.'" fill="none"><circle cx="'.($w/2).'" cy="'.($w/2).'" r="'.(($w/2)-$os).'" /></g>'."\n";
}
$svg .= '</svg>'."\n";
return $svg;
}
$segs = array(
array(0, 90, "blue"),
);
$segs2 = array(
array(0, intval(0.65*360), "blue"),
);
$svg = SVGpie($segs, 30, "wheat", "none", 0, "none", 0);
$svg2 = SVGpie($segs2, 30, "wheat", "none", 0, "none", 0);
$html_SVG = '<html><body>
<table>
<tr><td style="vertical-align: middle">Normal (25%): </td><td style="vertical-align: middle">'.$svg.'</td></tr>
<tr><td style="vertical-align: middle">Large (65%): </td><td style="vertical-align: middle">'.$svg2.'</td></tr>
</table>
</body></html>';
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
// Test In-line font characteristics
$htmlx = '
<div style="font-size: 12pt; font-family:Times">
Normal <span style="font-family:Arial">Arial <span style="font-size:16pt">font-size 16 <span style="color: red">red <span style="font-weight:bold">bold <span style="font-style:italic">italic <span style="font-variant:small-caps">Small Caps <span style="text-decoration:underline">underline <span style="text-shadow: 2px 2px #ff0000;">shadow</span> not shadow; </span> not underline; </span> not small-caps; </span> not italic; </span> not bold; </span> not red; </span> not font-size-16; </span> not Arial-font-family; normal
</div>
<table style="border: 1px solid #888888"><tr><td style="font-size: 12pt; font-family:Times">
Normal <span style="font-family:Arial">Arial <span style="font-size:16pt">font-size 16 <span style="color: red">red <span style="font-weight:bold">bold <span style="font-style:italic">italic <span style="font-variant:small-caps">Small Caps <span style="text-decoration:underline">underline <span style="text-shadow: 2px 2px #ff0000;">shadow</span> not shadow; </span> not underline; </span> not small-caps; </span> not italic; </span> not bold; </span> not red; </span> not font-size-16; </span> not Arial-font-family; normal
</td></tr></table>
<div style="font-size: 16pt; font-family:DejaVuSansCondensed">
Normal <span style="font-kerning:normal">kern AWAY To <span style="font-kerning:none">nokern AWAY To </span> not nokern AWAY To; </span> not kern AWAY To; normal <span style="text-outline: 0.03em green">green <span style="text-outline-color: blue">blue </span> not blue; </span> not green; normal
</div>
<table style="border: 1px solid #888888"><tr><td style="font-size: 16pt; font-family:DejaVuSansCondensed">
Normal <span style="font-kerning:normal">kern AWAY To <span style="font-kerning:none">nokern AWAY To </span> not nokern AWAY To; </span> not kern AWAY To; normal <span style="text-outline: 0.03em green">green <span style="text-outline-color: blue">blue </span> not blue; </span> not green; normal
</td></tr></table>
';
//==============================================================
//==============================================================
// Test In-line font-feature characteristics
$htmlx = '
<table style="border: 1px solid #888888"><tr><td style="font-size: 15pt; font-family:Calibri">
Calibri normal: <br />
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">pnum</span> <span style="font-feature-settings:\'pnum\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span>
<br />
<span style="color:#8888DD;">ordn</span> <span style="font-feature-settings:\'ordn\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span>
<br />
<span style="color:#8888DD;">onum</span> <span style="font-feature-settings:\'onum\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">lnum</span> <span style="font-feature-settings:\'lnum\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">case</span> <span style="font-feature-settings:\'case\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">salt</span> <span style="font-feature-settings:\'salt\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">dlig</span> <span style="font-feature-settings:\'dlig\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">c2sc</span> <span style="font-feature-settings:\'c2sc\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">smcp</span> <span style="font-feature-settings:\'smcp\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check <br />
<span style="color:#8888DD;">sups</span> <span style="font-feature-settings:\'sups\' on">
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">sups off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">smcp off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">c2sc off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">dlig off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">salt off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">case off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">lnum off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</span> <br /><span style="color:#DD8888;">onum off:</span>
£123450 (case32) 1st 3rd [CASE] g& CaSeMeNt traffic check
</td></tr></table>
';
//==============================================================
//==============================================================
//==============================================================
//==============================================================
//==============================================================
$mpdf->jSmaxChar = 5; // Maximum spacing to allocate to character spacing. (0 = no maximum)
// Test GPOS
$html = '
<div style="font-family:Garuda; font-size: 28pt; font-feature-settings:\'ccmp\' off, \'mark\' 0, \'mkmk\' 0;">
ผู้ คู่
</div>
<div style="font-family:Garuda; font-size: 28pt;">
ผู้ คู่
</div>
// GSUB 5.2
<div style="font-family:arialunicodems; font-size: 28pt;">
ಶಿಕ್ಷೆ ವಿಧಿಸಿದೆ
</div>
// GSUB 7.2
<div style="font-family: arialunicodems; font-size: 36pt; font-feature-settings:\'dist\' 0;">
ಕ್ರೌ Kannada
</div>
<div style="font-family: arialunicodems; font-size: 36pt;">
ಕ್ರೌ
</div>
<div dir="rtl" style="font-family: \'DejaVu Sans\'; font-size: 36pt; font-feature-settings:\'mark\' off;">
זֵּיְּשֳׂךָ
</div>
<div dir="rtl" style="font-family: \'DejaVu Sans\'; font-size: 36pt">
זֵּיְּשֳׂךָ
</div>
<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 36pt;">
<div style="font-family:\'Dejavu Sans Condensed\';">Á á Ȧ ȧ Ä ä ï fi (DejaVu Sans Condensed)
traffic
insufflate</div>
<div style="font-family:\'Arial\';">Á á Ȧ ȧ Ä ä ï fi traffic insufflate (Arial)</div>
<div style="font-family:\'Times New Roman\';">Á á Ȧ ȧ Ä ä ï fi (Times New Roman)</div>
</div>
// Test GPOS 2
<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 36pt;font-feature-settings:\'kern\';">
<div style="font-family:\'Arial\'; font-size: 36pt;font-feature-settings:\'kern\';">To Á á Ȧ ȧ Ä ä ï fi Wö Ẅ Ta Tu Tö (Arial)<br />
AWAY To WAR</div>
<div style="font-family:\'Dejavu Sans Condensed\';font-feature-settings:\'kern\';">Ta To Á á Ȧ ȧ Ä ä ï fi (DejaVu Sans Condensed)
traffic
insufflate Ta Tu
<br />
AWAY To WAR</div>
<div style="font-family:\'Dejavu Sans Condensed\'; font-size: 16pt;font-feature-settings:\'kern\';">To Á á Ȧ ȧ Ä ä ï fi Wö Ẅ Ta Tu Tö (DejaVu Sans Condensed)
traffic
insufflate</div>
<div style="font-family:\'Times New Roman\';font-feature-settings:\'kern\';">To Á á Ȧ ȧ Ä ä ï fi Wö Ta Tu Tö (Times New Roman)<br />
AWAY To WAR</div>
</div>
<div style="font-family:\'Arial\'; font-size: 36pt;font-feature-settings:\'kern\';">To Ta D̏ Ḍ ả Á á Ȧ ȧ Ä ä ï fi Wö Ta Tu Tö (Arial)<br />
AWAY To WAR</div>
<div style="font-family:\'Arial\'; font-size: 16pt;font-feature-settings:\'kern\';">To D̏ Ḍ ả Á á Ȧ ȧ Ä ä ï fi Wö Ta Tu Tö (Arial)<br />
AWAY To WAR</div>
Kerning = GPOS Lookup Type 2; Mark to base = GOS Lookup Type 4
<div style="font-family:\'Arial\'; font-size: 36pt;">Ä̃̕ ä̃̕ ä̃̕ ã̈̕ ã̈̕ (GPOS Lookup Type 6)</div>
<div style="font-family:DejavuSansCondensed; font-size: 36pt;font-feature-settings:\'mark\' off, \'mkmk\' off;">ç̥ (GPOS Lookup Type 5)</div>
<div style="font-family:DejavuSansCondensed; font-size: 36pt;">ç̥ (GPOS Lookup Type 5)</div>
<div style="font-family:ArabicTypesetting; font-size: 46pt;">اثمكحه
(Cursive GPOS Lookup Type 3)</div>
<div style="font-family:Arial; font-size: 16pt;">Ä ä ä ã a̕</div>
<div style="font-family:Arial; font-size: 16pt;">Ä̕ ä̕ ä̃ ã̈ ã̕</div>
<div style="font-family:Arial; font-size: 16pt;">Ä̃̕ ä̃̕ ä̃̕ ã̈̕ ã̈̕</div>
<div style="font-family:arabictypesetting; font-size: 28pt;" dir="rtl">اٙٙه اه ه وٙه وه ه </div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">trÄ̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic AWAY To </div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">trÄ̃̕ffic AWAY To <span>trä̃̕ffic AWAY To</span> trä̃̕ffic AWAY To <span>trä̃̕ffic AWAY To</span> </div>
// TEST GPOS Ligature Position
<div style="font-family:arabictypesetting; font-size: 46pt; font-feature-settings:\'kern\';" dir="rtl">
يَـٰٓأَيُّهَا يَنتُم لَىٰٓ ۚ
وَلَا كَمَا
ٱللَّهُ ٱللَّهَ وَلَا
لَا
رِّجَالِكُمْ ۖ
خْرَىٰ ۚ وَلَا يَأْبَۚ
وَلَا تَسْـَٔمُوٓا۟ أَوْ كَبِيرًا إِلَىٰٓ
ٱللَّهِ وَأَدْنَىٰٓ أَلَّا إِلَّآ
بَيْنَكُمْ عَلَيْكُمْ أَلَّا
يَعْتُمْ ۚ وَلَا كَاتِبٌۭ
</div>
// TEST GPOS Ligature Position - TABLES
<table dir="rtl" style="font-family:me_quran; font-size: 26pt;line-height: 2em; "><tr><td style="border:1px solid #888888;text-align:justify; font-feature-settings:\'kern\'; word-spacing: 0.3em;">
يَـٰٓأَيُّهَا يَنتُم لَىٰٓ ۚ
وَلَا كَمَا
ٱللَّهُ ٱللَّهَ وَلَا
لَا
رِّجَالِكُمْ ۖ
خْرَىٰ ۚ وَلَا يَأْبَۚ
وَلَا تَسْـَٔمُوٓا۟ أَوْ كَبِيرًا إِلَىٰٓ
ٱللَّهِ وَأَدْنَىٰٓ أَلَّا إِلَّآ
بَيْنَكُمْ عَلَيْكُمْ أَلَّا
يَعْتُمْ ۚ وَلَا كَاتِبٌۭ
</td></tr></table>
// TEST \'curs\' GPOS
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'curs\' off;">
ـىݦـ
ﺌﺌﺌﺌﺌﺌﺌﺌﺌﺌ
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt;">
ـىݦـ
ﺌﺌﺌﺌﺌﺌﺌﺌﺌﺌ
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'curs\' off;">
سْتَشْهِدُ
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'curs\';">
سْتَشْهِدُ
</div>
// TEST LINE-BREAKING
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">
trÄ̃̕ff AWAY 1a) trä̃̕ffic AWAY To in<b>suff-er</b>able
trä̃̕ffic ÄWAY</div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;font-kerning:normal;">
trÄ̃̕ffic AWAY 1b) trä̃̕ffic AWAY To
in­suffer­able frä̃̕ffic ÄWAY To </div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;font-kerning:normal;">
tr<i>Ä̃̕ff</i>icAWAYinsufferable<b>Togrä̃̕ffic</b>AWAYToträ̃̕ffic2e)i)AWAYToträ̃̕fficAWAYToträ̃̕fficÄWAYTo</div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">
trÄ̃̕ffic2e)ii)A)withSHY­suf­ableToträ̃̕ffic<b>AWAYTo</b>trä̃̕ffic AWAY To hrä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic ÄWAY To </div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;font-kerning:normal">
trÄ̃̕ffic AW 2e)ii)A) trä̃̕ffic AWAY To
in<b>suffer</b>able trä̃̕ffic AWAY 3.) trä̃̕ffic
ÄWAY To trä̃̕ffic</div>
<div style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">
trÄ̃̕ffic2e)ii)B)sufferableToträ̃̕ffic<b>AWAYToträ̃̕ffic</b> AWAY To hrä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic ÄWAY To </div>
// TEST LINE-BREAKING - TABLES
<table><tr><td style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">
trÄ̃̕ff AWAY 1a) trä̃̕ffic AWAY To in<b>suff-er</b>able
trä̃̕ffic ÄWAY</td></tr></table>
<table><tr><td style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;font-kerning:normal;">
trÄ̃̕ffic AWAY 1b) trä̃̕ffic AWAY To
in­suffer­able frä̃̕ffic ÄWAY To </td></tr></table>
<table><tr><td style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;font-kerning:normal;">
tr<i>Ä̃̕ff</i>icAWAYinsufferable<b>Togrä̃̕ffic</b>AWAYToträ̃̕ffic2e)i)AWAYToträ̃̕fficAWAYToträ̃̕fficÄWAYTo</td></tr></table>
<table><tr><td style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">
trÄ̃̕ffic2e)ii)A)withSHY­suf­ableToträ̃̕ffic<b>AWAYTo</b>trä̃̕ffic AWAY To hrä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic ÄWAY To </td></tr></table>
<table><tr><td style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;font-kerning:normal">
trÄ̃̕ffic AW 2e)ii)A) trä̃̕ffic AWAY To
in<b>suffer</b>able trä̃̕ffic AWAY 3.) trä̃̕ffic
ÄWAY To trä̃̕ffic</td></tr></table>
<table><tr><td style="font-family:Arial; font-size: 28pt;border:1px solid #888888;text-align:justify;">
trÄ̃̕ffic2e)ii)B)sufferableToträ̃̕ffic<b>AWAYToträ̃̕ffic</b> AWAY To hrä̃̕ffic AWAY To trä̃̕ffic AWAY To trä̃̕ffic ÄWAY To </td></tr></table>
// CSS control of features
<div style="font-family:DejavuSansCondensed; font-size: 28pt;border:1px solid #888888;text-align:justify;font-feature-settings:\'salt\';">all <span style="font-feature-settings:\'salt\' 0;">all</span> all</div>
<div style="font-family:Trebuchet MS; font-size: 28pt;border:1px solid #888888;text-align:justify;font-variant:small-caps">Small Caps. 1,278 and More.</div>
<div style="font-family:DejavuSansCondensed; font-size: 28pt;border:1px solid #888888;text-align:justify;font-variant:small-caps">Small Caps. 1,278 and More.</div>
<div style="font-family:DejavuSansCondensed; font-size: 28pt;border:1px solid #888888;text-align:justify; ">1st 100 1/2 traffic AWAY feast To</div>
<div style="font-family:DejavuSansCondensed; font-size: 28pt;border:1px solid #888888;text-align:justify; font-feature-settings:\'salt\', \'aalt\', \'dlig\', \'hlig\', \'kern\';">1st 100 1/2 traffic AWAY feast To β θ φ</div>
<div style="font-family:CambriaMath; font-size: 28pt;border:1px solid #888888;text-align:justify; font-feature-settings:\'frac\', \'zero\', \'ordn\', \'salt\', \'dlig\', \'hist\', \'kern\';">1st 100 1/2 traffic AWAY feast To β θ φ</div>
<div style="font-family:CambriaMath; font-size: 28pt;border:1px solid #888888;text-align:justify; font-feature-settings:\'sinf\';">C10H16N5O13P3</div>
Cambria:
\'salt\'
\'c2sc\'
\'smcp\'
\'sups\'
\'sinf\'
\'case\'
\'calt\'
\'tnum\'
\'pnum\'
\'onum\'
\'lnum\'
\'numr\'
\'dnom\'
<div style="font-family:Calibri; font-size: 28pt;border:1px solid #888888;text-align:justify; font-feature-settings:\'frac\', \'zero\', \'ordn\', \'salt\', \'aalt\', \'dlig\', \'hist\', \'kern\';">1st 100 1/2 traffic AWAY feast To β θ φ</div>
Calibri:
\'case\'
\'calt\'
\'numr\'
\'dnom\'
\'subs\'
\'tnum\'
\'pnum\'
\'onum\'
\'lnum\'
\'salt\'
\'c2sc\'
\'smcp\'
\'sups\'
\'ordn\'
\'liga\'
\'dlig\'
<div style="font-family:XBRiyaz; font-size: 28pt;border:1px solid #888888;text-align:justify; font-feature-settings:\'frac\';">1st 100 1/2 traffic AWAY feast To</div>
<div style="font-family:\'Arial Unicode MS\'; font-size: 28pt;border:1px solid #888888; ">1st 100 1/2 traffic AWAY feast To</div>
// TEST GPOS Type 2 Format 1 (abvm)
<div style="font-family:Mangal; font-size: 18pt;">र्वे॑</div>
// TEST \'kern\' GPOS in Arabic Typesetting
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
۝٣٤٥
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
؀٣٤
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
؁٣٤٥
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
؁٣٤
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
؂٣٤
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
؃٣٤
</div>
This test for reversal of chunks in flowing block, preserving consecutive chunks of LTR in an RTL line
<div dir="rtl" style="font-family:arial; font-size: 18pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
الحمد <span>These</span> <b>English</b> words and <img src="assets/goto.gif" /> <span style="color:red">not reversed</span> ٣٤٥ لله
</div>
<div dir="rtl" class="mpdf_toc" id="mpdf_toc_0" style="font-family:arial; font-size: 18pt">
<div class="mpdf_toc_level_0"><a class="mpdf_toc_a" href="#__mpdfinternallink_1"><span class="mpdf_toc_t_level_0">الق 1</span></a> .... <a class="mpdf_toc_a" href="#__mpdfinternallink_1"><span class="mpdf_toc_p_level_0">3</span></a></div>
<div class="mpdf_toc_level_0"><a class="mpdf_toc_a" href="#__mpdfinternallink_2"><span class="mpdf_toc_t_level_0">القسم 2</span></a> <dottab outdent="0" /> <a class="mpdf_toc_a" href="#__mpdfinternallink_2"><span class="mpdf_toc_p_level_0">3</span></a></div>
</div>
<div dir="rtl" style="font-family:\'arabic typesetting\'; font-size: 48pt; font-feature-settings:\'ccmp\', \'curs\', \'kern\';">
الحمد ۝٣٤٥ ٣٤٥ لله
</div>
<div style="font-family:arial; font-size: 22pt; direction: rtl;">
בדיקה באנגלית Latin Text - (ניסיון A)
<br />
בדיקה באנגלית Latin Text - (ניסיון 2)
<br />
בנק: 12, סניף: 11, מס\' חשבון: 111, מס\' המחאה: 1112
<br />
קיזוז ימים בגין תחילת עבודה מתאריך 08/01/2013
<br />
שירותי Cloud Computing
</div>
<div style="font-family:arial; font-size: 30pt; ">
(ٱللَّهَ) Ä̕ ä̕
</div>
<div style="font-family:arial; font-size: 30pt; ">
Ä̃̕ Ä̕ä̕ä̃ (ٱللَّهَ) Ä̕ ä̕
</div>
GPOS Type 2 Format 1 "kern"
<div style="direction: rtl; font-family: \'arabic typesetting\'; line-height: 1.8; font-size: 42pt; font-feature-settings:\'curs\', \'kern\'; border: 1px solid #888888;">
كَبِيرًا إِلَىٰٓ
</div>
';
//==============================================================
//==============================================================
//==============================================================
$mpdf->debug = true;
//==============================================================
//==============================================================
$htmlx ='