example26_RTL.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <?php
  2. $html = '
  3. <style>
  4. div.mpdf_index_main {
  5. font-family: xbriyaz;
  6. }
  7. div.mpdf_index_entry {
  8. font-family: xbriyaz;
  9. }
  10. div.mpdf_index_letter {
  11. font-family: xbriyaz;
  12. }
  13. </style>
  14. <body dir="rtl">
  15. <h1>mPDF</h1>
  16. <h2>RTL Languages</h2>
  17. <h4>English</h4>
  18. <p>Please note that I do not understand any of the scripts below. The texts are borrowed from News websites, and I have used words and bits of phrases just to demonstrate the program.&#x200E;</p>
  19. <h4>Hebrew (pangram)&#x200E;</h4>
  20. <p lang="he">&#x5d3;&#x5d2; &#x5e1;&#x5e7;&#x5e8;&#x5df; &#x5e9;&#x5d8; &#x5d1;&#x5d9;&#x5dd; &#x5de;&#x5d0;&#x5d5;&#x5db;&#x5d6;&#x5d1; &#x5d5;&#x5dc;&#x5e4;&#x5ea;&#x5e2; &#x5de;&#x5e6;&#x5d0; &#x5d7;&#x5d1;&#x5e8;&#x5d4; </p>
  21. <p lang="he">&#x5d0;&#x5d5; &#x5d4;&#x5e0;&#x5e1;&#x5d4; &#x5d0;&#x5dc;&#x5d4;&#x5d9;&#x5dd;, &#x5dc;&#x5d1;&#x5d5;&#x5d0; &#x5dc;&#x5e7;&#x5d7;&#x5ea; &#x5dc;&#x5d5; &#x5d2;&#x5d5;&#x5d9; &#x5de;&#x5e7;&#x5e8;&#x5d1; &#x5d2;&#x5d5;&#x5d9;, &#x5d1;&#x5de;&#x5e1;&#x5ea; &#x5d1;&#x5d0;&#x5ea;&#x5ea; &#x5d5;&#x5d1;&#x5de;&#x5d5;&#x5e4;&#x5ea;&#x5d9;&#x5dd; &#x5d5;&#x5d1;&#x5de;&#x5dc;&#x5d7;&#x5de;&#x5d4; &#x5d5;&#x5d1;&#x5d9;&#x5d3; &#x5d7;&#x5d6;&#x5e7;&#x5d4; &#x5d5;&#x5d1;&#x5d6;&#x5e8;&#x5d5;&#x5e2; &#x5e0;&#x5d8;&#x5d5;&#x5d9;&#x5d4;, &#x5d5;&#x5d1;&#x5de;&#x5d5;&#x5e8;&#x5d0;&#x5d9;&#x5dd; &#x5d2;&#x5d3;&#x5dc;&#x5d9;&#x5dd;: &#x5db;&#x5db;&#x5dc; &#x5d0;&#x5e9;&#x5e8;-&#x5e2;&#x5e9;&#x5d4; &#x5dc;&#x5db;&#x5dd; &#x5d9;&#x5d4;&#x5d5;&#x5d4; &#x5d0;&#x5dc;&#x5d4;&#x5d9;&#x5db;&#x5dd;, &#x5d1;&#x5de;&#x5e6;&#x5e8;&#x5d9;&#x5dd;--&#x5dc;&#x5e2;&#x5d9;&#x5e0;&#x5d9;&#x5da; </p>
  22. <p lang="he">&#x5dc;&#x5db;&#x5df; &#x5d7;&#x5db;&#x5d5; &#x5dc;&#x5d9; &#x5e0;&#x5d0;&#x5dd; &#x5d9;&#x5d4;&#x5d5;&#x5d4; &#x5dc;&#x5d9;&#x5d5;&#x5dd; &#x5e7;&#x5d5;&#x5de;&#x5d9; &#x5dc;&#x5e2;&#x5d3;, &#x5db;&#x5d9; &#x5de;&#x5e9;&#x5e4;&#x5d8;&#x5d9; &#x5dc;&#x5d0;&#x5e1;&#x5e3; &#x5d2;&#x5d5;&#x5d9;&#x5dd; &#x5dc;&#x5e7;&#x5d1;&#x5e6;&#x5d9; &#x5de;&#x5de;&#x5dc;&#x5db;&#x5d5;&#x5ea;, &#x5dc;&#x5e9;&#x5e4;&#x5da; &#x5e2;&#x5dc;&#x5d9;&#x5d4;&#x5dd; &#x5d6;&#x5e2;&#x5de;&#x5d9; &#x5db;&#x5dc; &#x5d7;&#x5e8;&#x5d5;&#x5df; &#x5d0;&#x5e4;&#x5d9;, &#x5db;&#x5d9; &#x5d1;&#x5d0;&#x5e9; &#x5e7;&#x5e0;&#x5d0;&#x5ea;&#x5d9; &#x5ea;&#x5d0;&#x5db;&#x5dc; &#x5db;&#x5dc; &#x5d4;&#x5d0;&#x5e8;&#x5e5; </p>
  23. <p lang="he">&#x5e9;&#x5e4;&#x5df; &#x5d0;&#x5db;&#x5dc; &#x5e7;&#x5e6;&#x5ea; &#x5d2;&#x5d6;&#x5e8; &#x5d1;&#x5d8;&#x5e2;&#x5dd; &#x5d7;&#x5e1;&#x5d4;, &#x5d5;&#x5d3;&#x5d9;. </p>
  24. <h4>Arabic</h4>
  25. <p lang="ar">&#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62d;&#x62f;&#x64a;&#x62b; &#x645;&#x62a;&#x644;&#x641;&#x632;<annotation content="&#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a; &#x62c;&#x648;&#x631;&#x62c;" subject="&#x62c;&#x648;&#x631;&#x62c;" icon="Comment" color="#FE88EF" author="&#x62c;&#x648;&#x631;&#x62c;" />
  26. &#x641;&#x64a; &#x627;&#x644;&#x630;&#x643;&#x631;&#x649; &#x627;&#x644;&#x631;&#x627;&#x628;&#x639;&#x629; &#x644;&#x644;&#x63a;&#x632;&#x648; &#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a; &#x644;&#x644;&#x639;&#x631;&#x627;&#x642; &#x627;&#x646; &#x627;&#x644;&#x627;&#x648;&#x644;&#x648;&#x64a;&#x629; &#x62d;&#x627;&#x644;&#x64a;&#x627; &#x644;&#x627;&#x639;&#x627;&#x62f;&#x629; &#x627;&#x644;&#x627;&#x645;&#x646; &#x644;&#x644;&#x639;&#x631;&#x627;&#x642;.</p>
  27. <p lang="ar">&#x647;&#x644; &#x633;&#x62a;&#x633;&#x641;&#x631; &#x627;&#x644;&#x62c;&#x647;&#x648;&#x62f; &#x627;&#x644;&#x62f;&#x628;&#x644;&#x648;&#x645;&#x627;&#x633;&#x64a;&#x629; &#x627;&#x644;&#x62c;&#x627;&#x631;&#x64a;&#x629; &#x639;&#x646; &#x62d;&#x644;&#x648;&#x644;&#x61f; &#x648;&#x643;&#x64a;&#x641; &#x62a;&#x646;&#x638;&#x631; &#x644;&#x644;&#x627;&#x62a;&#x647;&#x627;&#x645;&#x627;&#x62a; &#x644;&#x628;&#x639;&#x636; &#x647;&#x630;&#x647; &#x627;&#x644;&#x62f;&#x648;&#x644; &#x628;&#x627;&#x644;&#x62a;&#x62f;&#x62e;&#x644; &#x641;&#x64a; &#x627;&#x644;&#x634;&#x623;&#x646; &#x627;&#x644;&#x639;&#x631;&#x627;&#x642;&#x64a;&#x60c; &#x648;&#x627;&#x644;&#x62a;&#x648;&#x631;&#x637; &#x641;&#x64a; &#x62f;&#x639;&#x645; &#x639;&#x645;&#x644;&#x64a;&#x627;&#x62a; &#x627;&#x644;&#x639;&#x646;&#x641;&#x61f; &#x648;&#x627;&#x644;&#x649; &#x627;&#x64a; &#x645;&#x62f;&#x649; &#x64a;&#x628;&#x62f;&#x648; &#x627;&#x644;&#x648;&#x636;&#x639; &#x641;&#x64a; &#x627;&#x644;&#x639;&#x631;&#x627;&#x642; &#x627;&#x646;&#x639;&#x643;&#x627;&#x633;&#x627; &#x644;&#x644;&#x635;&#x631;&#x627;&#x639;&#x627;&#x62a; &#x627;&#x644;&#x625;&#x642;&#x644;&#x64a;&#x645;&#x64a;&#x629; &#x641;&#x64a; &#x627;&#x644;&#x645;&#x646;&#x637;&#x642;&#x629;&#x61f;</p>
  28. <p lang="ar">&#x648;&#x627;&#x62f;&#x627;&#x646; &#x627;&#x644;&#x628;&#x64a;&#x62a; &#x627;&#x644;&#x627;&#x628;&#x64a;&#x636; &quot;&#x628;&#x634;&#x62f;&#x629;&quot; &#x62a;&#x641;&#x62c;&#x64a;&#x631; &#x627;&#x64a;&#x644;&#x627;&#x62a; &#x641;&#x64a;&#x645;&#x627; &#x627;&#x639;&#x631;&#x628;&#x62a; &#x648;&#x632;&#x627;&#x631;&#x629; &#x627;&#x644;&#x62e;&#x627;&#x631;&#x62c;&#x64a;&#x629; &#x627;&#x644;&#x631;&#x648;&#x633;&#x64a;&#x629; &#x639;&#x646; &quot;&#x627;&#x62f;&#x627;&#x646;&#x62a;&#x647;&#x627; &#x627;&#x644;&#x634;&#x62f;&#x64a;&#x62f;&#x629;&quot; &#x644;&#x644;&#x62d;&#x627;&#x62f;&#x62b;&quot; &#x648;&#x627;&#x635;&#x641;&#x629; &#x627;&#x64a;&#x627;&#x647; &#x628;&#x640;&quot;&#x627;&#x644;&#x645;&#x62a;&#x637;&#x631;&#x641;&quot; &#x627;&#x644;&#x630;&#x64a; &#x627;&#x633;&#x62a;&#x647;&#x62f;&#x641; &quot;&#x645;&#x62f;&#x646;&#x64a;&#x64a;&#x646; &#x645;&#x633;&#x627;&#x644;&#x645;&#x64a;&#x646;&quot;.</p>
  29. <p lang="ar">&#x648;&#x627;&#x636;&#x627;&#x641;&#x62a; &#x648;&#x632;&#x627;&#x631;&#x629; &#x627;&#x644;&#x62e;&#x627;&#x631;&#x62c;&#x64a;&#x629; &#x627;&#x644;&#x631;&#x648;&#x633;&#x64a;&#x629; &#x641;&#x64a; &#x628;&#x64a;&#x627;&#x646;&#x647;&#x627;: &quot;&#x645;&#x646; &#x627;&#x644;&#x645;&#x624;&#x633;&#x641; &#x627;&#x646; &#x64a;&#x623;&#x62a;&#x64a; &#x647;&#x630;&#x627; &#x627;&#x644;&#x62d;&#x627;&#x62f;&#x62b; &#x628;&#x64a;&#x646;&#x645;&#x627; &#x62a;&#x628;&#x630;&#x644; &#x627;&#x644;&#x62c;&#x647;&#x648;&#x62f; &#x644;&#x62a;&#x62e;&#x637;&#x64a; &#x627;&#x644;&#x627;&#x632;&#x645;&#x629; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a;&#x629; &#x627;&#x644;&#x62f;&#x627;&#x62e;&#x644;&#x64a;&#x629;&quot;.</p>
  30. <p lang="ar">&#x648;&#x62f;&#x639;&#x62a; &#x645;&#x648;&#x633;&#x643;&#x648; &#x627;&#x644;&#x633;&#x644;&#x637;&#x627;&#x62a; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a;&#x629; &#x627;&#x644;&#x649; &quot;&#x628;&#x630;&#x644; &#x643;&#x644; &#x645;&#x627; &#x64a;&#x645;&#x643;&#x646; &#x645;&#x646; &#x627;&#x62c;&#x644; &#x627;&#x62d;&#x62a;&#x648;&#x627;&#x621; &#x645;&#x638;&#x627;&#x647;&#x631; &#x627;&#x644;&#x62a;&#x637;&#x631;&#x641; &#x627;&#x644;&#x62a;&#x64a; &#x644;&#x627; &#x645;&#x628;&#x631;&#x631; &#x644;&#x647;&#x627; &#x648;&#x627;&#x644;&#x62a;&#x64a; &#x644;&#x627; &#x62a;&#x641;&#x64a;&#x62f; &#x645;&#x635;&#x627;&#x644;&#x62d; &#x627;&#x644;&#x634;&#x639;&#x628; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a; &#x639;&#x644;&#x649; &#x627;&#x644;&#x627;&#x645;&#x62f; &#x627;&#x644;&#x637;&#x648;&#x64a;&#x644;&quot;.</p>
  31. <p lang="ar">&#x648;&#x62f;&#x639;&#x62a; &#x645;&#x648;&#x633;&#x643;&#x648; &#x627;&#x644;&#x633;&#x644;&#x637;&#x627;&#x62a; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a;&#x629; &#x627;&#x644;&#x649; &quot;&#x628;&#x630;&#x644; &#x643;&#x644; &#x645;&#x627; &#x648;&#x62f;&#x639;&#x62a; &#x645;&#x648;&#x633;&#x643;&#x648; &#x627;&#x644;&#x633;&#x644;&#x637;&#x627;&#x62a; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a;&#x629; &#x627;&#x644;&#x649; &quot;&#x628;&#x630;&#x644; &#x643;&#x644; </p>
  32. <p lang="ar">
  33. &#x648;&#x62f;&#x639;&#x62a; &#x645;&#x648;&#x633;&#x643;&#x648; &#x627;&#x644;&#x633;&#x644;&#x637;&#x627;&#x62a; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a;&#x629; &#x627;&#x644;&#x649; &#x648;&#x62f;&#x639;&#x62a; &#x645;&#x648;&#x633;&#x643;&#x648; &#x627;&#x644;&#x633;&#x644;&#x637;&#x627;&#x62a; &#x627;&#x644;&#x641;&#x644;&#x633;&#x637;&#x64a;&#x646;&#x64a;&#x629; &#x627;&#x644;&#x649; &quot;&#x628;&#x630;&#x644; &#x643;&#x644; &#x645;&#x627; &#x64a;&#x645;&#x643;&#x646; &#x645;&#x646; &#x627;&#x62c;&#x644;</p>
  34. <p lang="ar">&#x643;&#x645;&#x627; &#x627;&#x62f;&#x627;&#x646; &#x627;&#x644;&#x641;&#x627;&#x631;&#x648; &#x62f;&#x64a; &#x633;&#x648;&#x62a;&#x648; &#x645;&#x628;&#x639;&#x648;&#x62b; &#x627;&#x644;&#x627;&#x645;&#x645; &#x627;&#x644;&#x645;&#x62a;&#x62d;&#x62f;&#x629; &#x627;&#x644;&#x62e;&#x627;&#x635; &#x627;&#x644;&#x649; &#x627;&#x644;&#x634;&#x631;&#x642; &#x627;&#x644;&#x627;&#x648;&#x633;&#x637; &#x627;&#x644;&#x639;&#x645;&#x644;&#x64a;&#x629; &#x648;&#x642;&#x627;&#x644; &quot;&#x627;&#x646;&#x647; &#x643;&#x627;&#x646; &#x647;&#x62c;&#x648;&#x645;&#x627; &#x639;&#x644;&#x649; &#x627;&#x634;&#x62e;&#x627;&#x635; &#x639;&#x627;&#x62f;&#x64a;&#x64a;&#x646; &#x643;&#x627;&#x646;&#x648;&#x627; &#x64a;&#x642;&#x648;&#x645;&#x648;&#x646; &#x628;&#x646;&#x634;&#x627;&#x637;&#x647;&#x645; &#x627;&#x644;&#x64a;&#x648;&#x645;&#x64a; &#x648;&#x647;&#x630;&#x627; &#x627;&#x645;&#x631; &#x644;&#x627; &#x64a;&#x645;&#x643;&#x646; &#x62a;&#x628;&#x631;&#x64a;&#x631;&#x647;&quot;.</p>
  35. <h4>Farsi / Persian (fa)&#x200E;</h4>
  36. <p lang="fa">&#x645;&#x62d;&#x645;&#x62f; &#x627;&#x644;&#x628;&#x631;&#x627;&#x62f;&#x639;&#x6cc; &#x631;&#x626;&#x64a;&#x633; &#x622;&#x698;&#x627;&#x646;&#x633; &#x628;&#x64a;&#x646; &#x627;&#x644;&#x645;&#x644;&#x644;&#x6cc; &#x627;&#x646;&#x631;&#x698;&#x6cc; &#x627;&#x62a;&#x645;&#x6cc; &#x67e;&#x64a;&#x634;&#x646;&#x647;&#x627;&#x62f; &#x6a9;&#x631;&#x62f;&#x647; &#x627;&#x633;&#x62a; &#x62a;&#x647;&#x631;&#x627;&#x646; &#x628;&#x631;&#x646;&#x627;&#x645;&#x647; &#x62c;&#x646;&#x62c;&#x627;&#x644;&#x6cc; &#x63a;&#x646;&#x6cc; &#x633;&#x627;&#x632;&#x6cc; &#x627;&#x648;&#x631;&#x627;&#x646;&#x64a;&#x648;&#x645; &#x631;&#x627; &#x645;&#x62a;&#x648;&#x642;&#x641; &#x6a9;&#x646;&#x62f; &#x648; &#x63a;&#x631;&#x628; &#x646;&#x64a;&#x632; &#x627;&#x62c;&#x631;&#x627;&#x6cc; &#x62a;&#x62d;&#x631;&#x64a;&#x645; &#x647;&#x627;&#x6cc; &#x62a;&#x646;&#x628;&#x64a;&#x647;&#x6cc; &#x645;&#x648;&#x631;&#x62f; &#x62a;&#x627;&#x626;&#x64a;&#x62f; &#x633;&#x627;&#x632;&#x645;&#x627;&#x646; &#x645;&#x644;&#x644; &#x645;&#x62a;&#x62d;&#x62f; &#x631;&#x627; &#x628;&#x647; &#x62a;&#x639;&#x648;&#x64a;&#x642; &#x628;&#x64a;&#x627;&#x646;&#x62f;&#x627;&#x632;&#x62f;.</p>
  37. <p lang="fa">&#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634;&#x60c; &#x62f;&#x631; &#x686;&#x647;&#x627;&#x631;&#x645;&#x6cc;&#x646; &#x633;&#x627;&#x644;&#x6af;&#x631;&#x62f; &#x627;&#x634;&#x63a;&#x627;&#x644; &#x639;&#x631;&#x627;&#x642; &#x645;&#x6cc; &#x6af;&#x648;&#x6cc;&#x62f; &#x627;&#x633;&#x62a;&#x631;&#x627;&#x62a;&#x698;&#x6cc; &#x627;&#x633;&#x62a;&#x642;&#x631;&#x627;&#x631; &#x646;&#x6cc;&#x631;&#x648;&#x647;&#x627;&#x6cc; &#x622;&#x645;&#x631;&#x6cc;&#x6a9;&#x627;&#x6cc;&#x6cc; &#x628;&#x6cc;&#x634;&#x62a;&#x631;&#x6cc; &#x62f;&#x631; &#x628;&#x63a;&#x62f;&#x627;&#x62f;&#x60c; &#x645;&#x62f;&#x62a;&#x6cc; &#x637;&#x648;&#x644; &#x62e;&#x648;&#x627;&#x647;&#x62f; &#x6a9;&#x634;&#x6cc;&#x62f;.</p>
  38. <p lang="fa">&#x622;&#x645;&#x631;&#x6cc;&#x6a9;&#x627; &#x648;&#x6cc;&#x632;&#x627;&#x6cc; &#x631;&#x626;&#x6cc;&#x633; &#x62c;&#x645;&#x647;&#x648;&#x631; &#x627;&#x6cc;&#x631;&#x627;&#x646; &#x631;&#x627; &#x628;&#x647; &#x645;&#x646;&#x638;&#x648;&#x631; &#x62d;&#x636;&#x648;&#x631; &#x648;&#x6cc; &#x62f;&#x631; &#x62c;&#x644;&#x633;&#x647; &#x631;&#x627;&#x6cc; &#x6af;&#x6cc;&#x631;&#x6cc; &#x634;&#x648;&#x631;&#x627;&#x6cc; &#x627;&#x645;&#x646;&#x6cc;&#x62a; &#x628;&#x631;&#x627;&#x6cc; &#x642;&#x637;&#x639;&#x646;&#x627;&#x645;&#x647; &#x62a;&#x627;&#x632;&#x647; &#x639;&#x644;&#x6cc;&#x647; &#x627;&#x6cc;&#x646; &#x6a9;&#x634;&#x648;&#x631; &#x635;&#x627;&#x62f;&#x631; &#x6a9;&#x631;&#x62f;.</p>
  39. <h4>Urdu</h4>
  40. <p lang="ur">&#x62c;&#x633;&#x679;&#x633; &#x627;&#x641;&#x62a;&#x62e;&#x627;&#x631; &#x6a9;&#x6cc; &#x62c;&#x628;&#x631;&#x6cc; &#x631;&#x62e;&#x635;&#x62a; &#x67e;&#x631; &#x644;&#x627;&#x6c1;&#x648;&#x631;&#x6c1;&#x627;&#x626;&#x6cc; &#x6a9;&#x648;&#x631;&#x679; &#x6a9;&#x6d2; &#x627;&#x6cc;&#x6a9; &#x627;&#x648;&#x631; &#x633;&#x646;&#x62f;&#x6be; &#x645;&#x6cc;&#x6ba; &#x6a9;&#x626;&#x6cc; &#x633;&#x648;&#x644; &#x62c;&#x62c; &#x645;&#x633;&#x62a;&#x639;&#x641;&#x6cc; &#x6c1;&#x648;&#x6af;&#x626;&#x6d2; &#x6c1;&#x6cc;&#x6ba;&#x6d4;</p>
  41. <p lang="ur">&#x686;&#x6cc;&#x641; &#x62c;&#x633;&#x679;&#x633; &#x6a9;&#x6cc; &#x633;&#x631;&#x6af;&#x631;&#x645;&#x6cc;&#x627;&#x6ba; &#x645;&#x62d;&#x62f;&#x648;&#x62f; &#x6a9;&#x631;&#x646;&#x6d2; &#x627;&#x648;&#x631; &#x67e;&#x648;&#x644;&#x6cc;&#x633; &#x62a;&#x639;&#x6cc;&#x646;&#x627;&#x62a;&#x6cc; &#x6a9;&#x6d2; &#x62d;&#x6a9;&#x645; &#x646;&#x627;&#x645;&#x6d2; &#x67e;&#x631; &#x62f;&#x633;&#x62a;&#x62e;&#x637; &#x6a9;&#x631;&#x6a9;&#x6d2; &#x63a;&#x644;&#x637; &#x6a9;&#x6cc;&#x627;: &#x62c;&#x646;&#x631;&#x644; &#x645;&#x634;&#x631;&#x641;</p>
  42. <h4>&#x202a;Pashto (ps)&#x202c;</h4>
  43. <p lang="ps">&#x67e;&#x647; &#x6a9;&#x627;&#x628;&#x644; &#x627;&#x648; &#x6a9;&#x646;&#x62f;&#x647;&#x627;&#x631; &#x6a9;&#x6d0; &#x62f;&#x648;&#x648; &#x681;&#x627;&#x646;&#x645;&#x631;&#x6af;&#x648; &#x628;&#x631;&#x64a;&#x62f;&#x648;&#x646;&#x648; &#x644;&#x696; &#x62a;&#x631; &#x644;&#x696;&#x647; &#x64a;&#x648; &#x645;&#x627;&#x634;&#x648;&#x645; &#x648;&#x698;&#x644;&#x649; &#x627;&#x648; &#x627;&#x62a;&#x647; &#x62a;&#x646;&#x647; &#x646;&#x648;&#x631; &#x649;&#x6d0; &#x67c;&#x67e;&#x64a;&#x627;&#x646; &#x6a9;&#x693;&#x64a;.</p>
  44. <p lang="ps">&#x647; &#x639;&#x631;&#x627;&#x642; &#x6a9;&#x6d0; &#x64a;&#x648;&#x647; &#x62a;&#x627;&#x632;&#x647; &#x646;&#x638;&#x631; &#x634;&#x645;&#x6d0;&#x631;&#x646;&#x647; &#x69a;&#x64a;&#x64a; &#x686;&#x6d0; &#x639;&#x631;&#x627;&#x642;&#x64a;&#x627;&#x646; &#x67e;&#x647; &#x632;&#x64a;&#x627;&#x62a;&#x6d0;&#x62f;&#x648;&#x646;&#x6a9;&#x64a; &#x62a;&#x648;&#x6af;&#x647; &#x62f; &#x62d;&#x627;&#x644;&#x627;&#x62a;&#x648; &#x67e;&#x647; &#x627;&#x693;&#x647; &#x628;&#x62f;&#x628;&#x64a;&#x646;&#x647; &#x62f;&#x64a; &#x627;&#x648; &#x62f; &#x628;&#x6d0; &#x628;&#x627;&#x648;&#x631;&#x64a; &#x627;&#x62d;&#x633;&#x627;&#x633; &#x6a9;&#x648;&#x64a;&#x60c; &#x62e;&#x648; &#x62e;&#x67e;&#x644; &#x647;&#x64a;&#x648;&#x627;&#x62f; &#x64a;&#x648;&#x645;&#x648;&#x67c;&#x649; &#x63a;&#x648;&#x627;&#x693;&#x64a;.</p>
  45. <h4>Symbols</h4>
  46. <p>&#xa9;&#xae;&#x2122;&#xb5;&#x2022;&#x2026;&#x2032;&#x2033;&#xa7;&lt;&gt;&#x2264;&#x2265;&#xb0;&#x2212;&#xb1;&#xf7;&#x2044;&#xd7;&#x192;&#x222b;&#x2211;&#x221e;&#x221a;&#x2248;&#x2260;&#x2261;&#x220f;&#xac;&#x2229;&#x2202;</p>
  47. <p>&#x392;&#x393;&#x394;&#x395;&#x396;&#x397;&#x398;&#x399;&#x39a;&#x39b;&#x39c;&#x39d;&#x39e;&#x39f;&#x3a0;&#x3a1;&#x3a3;&#x3a4;&#x3a5;&#x3a6;&#x3a7;&#x3a8;&#x3a9;</p>
  48. <p>&#x3b1;&#x3b2;&#x3b3;&#x3b4;&#x3b5;&#x3b6;&#x3b7;&#x3b8;&#x3b9;&#x3ba;&#x3bb;&#x3bc;&#x3bd;&#x3be;&#x3bf;&#x3c0;&#x3c1;&#x3c2;&#x3c3;&#x3c4;&#x3c5;&#x3c6;&#x3c7;&#x3c8;&#x3c9;</p>
  49. <p>&#x2190;&#x2191;&#x2192;&#x2193;&#x2194;&#x25ca;&#x2663;&#x2665;&#x2666;</p>
  50. <h4>Dingbats</h4>
  51. <p>&#xa7;&lt;&gt;&#x2192;&#x2194;&#x2663;&#x2665;&#x2666;</p>
  52. <h4>win-1252 </h4>
  53. <p>&#xa2;&#x20ac;&#xa9;&#xae;&#x2122;&#x2030;&#xb5;&#xb7;&#x2022;&#x2026;&#xa7;&#xdf;&#x2039;&#x203a;&#xab;&#xbb;&#x2018;&#x2019;&#x201c;&#x201d;&#x201a;&#x201e;&lt;&gt;&#x2013;&#x2014;&#x2c6;&#x2dc;&#xb0;&#xb1;&#xf7;&#xd7;&#xbc;&#xbd;&#xbe;&#x192;&#xac;&#x2020;&#x2021;</p>
  54. <p>&#xc0;&#xc1;&#xc2;&#xc3;&#xc4;&#xc5;&#xc6;&#xc7;&#xc8;&#xc9;&#xca;&#xcb;&#xcc;&#xcd;&#xce;&#xcf;&#xd0;&#xd1;&#xd2;&#xd3;&#xd4;&#xd5;&#xd6;&#xd8;&#x152;&#x160;&#xd9;&#xda;&#xdb;&#xdc;&#xdd;&#x178;</p>
  55. <p>&#xe0;&#xe1;&#xe2;&#xe3;&#xe4;&#xe5;&#xe6;&#xe7;&#xe8;&#xe9;&#xea;&#xeb;&#xec;&#xed;&#xee;&#xef;&#xf0;&#xf1;&#xf2;&#xf4;&#xf5;&#xf6;&#xf8;&#x153;&#x161;&#xf9;&#xfa;&#xfb;&#xfc;&#xfd;&#xfe;&#xff;</p>
  56. <h3>Bidirectional text</h3>
  57. <div style="direction: ltr;">
  58. <p>Text alignment, unless specified, is neutral and therefore dictated by the \'direction\' of the paragraph.</p>
  59. <p>Ttext is analysed at the end of every block element (div, p, td). If the text contains RTL characters, those characters and words are reversed according to the Unicode BiDirectional algorithm e.g.</p>
  60. <p lang="ar" style="direction: rtl;">&#x648;&#x627;&#x62f;&#x627;&#x646; &#x627;&#x644;&#x628;&#x64a;&#x62a; &#x627;&#x644;&#x627;&#x628;&#x64a;&#x636; &quot;&#x628;&#x634;&#x62f;&#x629;&quot; &#x62a;&#x641;&#x62c;&#x64a;&#x631; with some english in the middle &#x627;&#x64a;&#x644;&#x627;&#x62a; &#x641;&#x64a;&#x645;&#x627; &#x627;&#x639;&#x631;&#x628;&#x62a; &#x648;&#x632;&#x627;&#x631;&#x629;</p>
  61. <p>To set the \'directionality\' of the whole document e.g. to reverse default alignment, tables, lists etc. you can set the dir attribute or the direction CSS property on the HTML or BODY tag to \'rtl\' e.g.</p>
  62. <p>&lt;body style="direction: rtl"&gt;</p>
  63. <p>&lt;body dir="rtl"&gt;</p>
  64. <p>or you can use $mpdf->SetDirectionality(\'rtl\');</p>
  65. </div>
  66. <pre style="direction: ltr; background-color: #DDFFFF; page-break-inside: avoid;">
  67. The document now has a baseline direction; this determines the:
  68. - text-alignment in blocks for which text-align has not been specifically set
  69. - layout of mirrored page-margins, columns, ToC and Indexes, headers and footers
  70. - base direction can be set by any of:
  71. - $mpdf-&gt;SetDirectionality(\'rtl\');
  72. - &lt;html dir="rtl" or style="direction: rtl;"&gt;
  73. - &lt;body dir="rtl" or style="direction: rtl;"&gt;
  74. Base direction is an inherited CSS property, so will affect all content, unless...
  75. - direction can be set for all HTML block elements e.g.
  76. &lt;DIV&gt;&lt;P&gt;&lt;TABLE&gt;&lt;TD&gt;&lt;UL&gt;&lt;LI&gt; etc using
  77. - CSS property &lt; style="direction: rtl;"&gt;
  78. NOTE
  79. - block/table margins/paddings are NOT reversed by direction
  80. NB mPDF &lt;5.1 reversed the margins/paddings for blocks when RTL set.
  81. - language (either CSS "lang", using Autofont, or through initial set-up e.g. $mpdf = new mPDF(\'ar\') )
  82. no longer affects direction in any way.
  83. - config_cp.php has been changed as a result; any values of "dir" set here are now ineffective
  84. - default text-align is now as per CSS spec: "a nameless value which is dependent on direction"
  85. NB default text-align removed from default stylesheet in config.php
  86. - once text-align is specified, it is respected and inherited
  87. NB mPDF &lt;5.1 reversed the text-align property for all blocks when RTL set.
  88. - the configurable value is depracated, as it is no longer required
  89. - the algorithm for handling bidirectioal text was substantially re-written/improved in mPDF v 6.0
  90. </pre>
  91. <pagebreak />
  92. <h3>Tables</h3>
  93. <p>Tables are automatically transposed when the direction is rtl:&#x200E;</p>
  94. <table lang="ar" class="bpmTopicC"><thead>
  95. <tr class="headerrow"><th>&#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a;</th>
  96. <td>
  97. <p>&#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a;</p>
  98. </td>
  99. <td>&#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a;</td>
  100. </tr>
  101. </thead><tbody>
  102. <tr class="oddrow"><th>&#x642;&#x627;&#x644;</th>
  103. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  104. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  105. </tr>
  106. <tr class="evenrow"><th>&#x642;&#x627;&#x644;</th>
  107. <td>
  108. <p>&#x642;&#x627;&#x644; &#x627;&#x644;&#x631;&#x626;&#x64a;&#x633; &#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62d;&#x62f;&#x64a;&#x62b; &#x645;&#x62a;&#x644;&#x641;&#x632;</p>
  109. </td>
  110. <td>
  111. <p>&#x642;&#x627;&#x644; &#x627;&#x644;&#x631;&#x626;&#x64a;&#x633; &#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62d;&#x62f;&#x64a;&#x62b; &#x645;&#x62a;&#x644;&#x641;&#x632;</p>
  112. </td>
  113. </tr>
  114. <tr class="oddrow"><th>
  115. <p>&#x642;&#x627;&#x644;</p>
  116. </th>
  117. <td>
  118. <p>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</p>
  119. </td>
  120. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  121. </tr>
  122. <tr class="evenrow"><th>
  123. <p>&#x642;&#x627;&#x644;</p>
  124. <p>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</p>
  125. </th>
  126. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  127. <td>
  128. <p>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</p>
  129. </td>
  130. </tr>
  131. <tr class="oddrow"><th>&#x642;&#x627;&#x644;</th>
  132. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  133. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  134. </tr>
  135. <tr class="evenrow"><th>&#x642;&#x627;&#x644;</th>
  136. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  137. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  138. </tr>
  139. <tr class="oddrow"><th>&#x642;&#x627;&#x644;</th>
  140. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  141. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  142. </tr>
  143. <tr class="evenrow"><th>&#x642;&#x627;&#x644;</th>
  144. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  145. <td>&#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</td>
  146. </tr>
  147. </tbody></table>
  148. <p>&nbsp;</p>
  149. <h3>Lists</h3>
  150. <p>Lists will automatically reverse as well (note the use of list-style to set numbering):&#x200E;</p>
  151. <div style="background-color:#ddccff; padding:5pt;">
  152. <ol lang="ar" style="list-style-type: arabic-indic;">
  153. <li>&#x642;&#x627;&#x644; &#x627;&#x644;&#x631;&#x626;&#x64a;&#x633;</li>
  154. <li>&#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a;
  155. <ul><li>&#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62c;&#x648;&#x631;&#x62c; &#x628;&#x648;&#x634; &#x641;&#x64a; &#x62c;&#x648;&#x631;&#x62c; </li>
  156. <li>&#x62d;&#x62f;&#x64a;&#x62b; &#x645;&#x62a;&#x644;&#x641;&#x632;
  157. <ul>
  158. <li>&#x641;&#x64a; &#x627;&#x644;&#x630;&#x643;&#x631;&#x649; &#x627;&#x644;&#x631;&#x627;&#x628;&#x639;&#x629;</li>
  159. <li>&#x644;&#x644;&#x63a;&#x632;&#x648; &#x627;&#x644;&#x627;&#x645;&#x631;&#x64a;&#x643;&#x64a;</li>
  160. </ul>
  161. </li>
  162. </ul></li>
  163. <li>&#x644;&#x644;&#x639;&#x631;&#x627;&#x642; &#x627;&#x646; &#x627;&#x644;&#x627;&#x648;&#x644;&#x648;&#x64a;&#x629; &#x62d;&#x627;&#x644;&#x64a;&#x627;</li>
  164. <li>&#x644;&#x627;&#x639;&#x627;&#x62f;&#x629; &#x627;&#x644;&#x627;&#x645;&#x646; &#x644;&#x644;&#x639;&#x631;&#x627;&#x642;</li>
  165. </ol>
  166. </div>
  167. ';
  168. //==============================================================
  169. // Set Header and Footer
  170. $h = array (
  171. 'odd' =>
  172. array (
  173. 'R' =>
  174. array (
  175. 'content' => '{PAGENO}',
  176. 'font-size' => 8,
  177. 'font-style' => 'B',
  178. ),
  179. 'L' =>
  180. array (
  181. 'content' => "\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
  182. 'font-size' => 8,
  183. 'font-style' => 'B',
  184. ),
  185. 'line' => 1,
  186. ),
  187. 'even' =>
  188. array (
  189. 'L' =>
  190. array (
  191. 'content' => '{PAGENO}',
  192. 'font-size' => 8,
  193. 'font-style' => 'B',
  194. ),
  195. 'R' =>
  196. array (
  197. 'content' => "\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
  198. 'font-size' => 8,
  199. 'font-style' => 'B',
  200. ),
  201. 'line' => 1,
  202. ),
  203. );
  204. $f = array (
  205. 'odd' =>
  206. array (
  207. 'L' =>
  208. array (
  209. 'content' => '{DATE Y-m-d}',
  210. 'font-size' => 8,
  211. 'font-style' => 'BI',
  212. ),
  213. 'C' =>
  214. array (
  215. 'content' => '- {PAGENO} -',
  216. 'font-size' => 8,
  217. ),
  218. 'R' =>
  219. array (
  220. 'content' => "\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
  221. 'font-size' => 8,
  222. ),
  223. 'line' => 1,
  224. ),
  225. 'even' =>
  226. array (
  227. 'L' =>
  228. array (
  229. 'content' => "\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3",
  230. 'font-size' => 8,
  231. 'font-style' => 'B',
  232. ),
  233. 'C' =>
  234. array (
  235. 'content' => '- {PAGENO} -',
  236. 'font-size' => 8,
  237. ),
  238. 'R' =>
  239. array (
  240. 'content' => '{DATE Y-m-d}',
  241. 'font-size' => 8,
  242. 'font-style' => 'BI',
  243. ),
  244. 'line' => 1,
  245. ),
  246. );
  247. //==============================================================
  248. // Create Index entries from random words in $html
  249. // Split $html into words
  250. $a =preg_split('/<(.*?)>/ms',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
  251. $html = '';
  252. foreach($a as $i => $e) {
  253. if($i%2==0) {
  254. $words = preg_split('/([\s,\.]+)/',$e,-1,PREG_SPLIT_DELIM_CAPTURE);
  255. foreach($words as $w) {
  256. $y = rand(1,10); // every tenth word
  257. // If it is just a word use it as an index entry
  258. if (preg_match("/^(&#x[0]{0,1}6[0-9a-f][0-9a-f];){4,30}$/i",$w) && ($y > 8)) {
  259. $content = trim($w);
  260. $html .= '<indexentry content="'.$content.'" />';
  261. }
  262. $html .= $w;
  263. }
  264. }
  265. else { $html .= '<'.$e.'>'; }
  266. }
  267. //==============================================================
  268. //==============================================================
  269. require_once __DIR__ . '/../vendor/autoload.php';
  270. $mpdf = new mPDF('','A4','','',32,25,27,25,16,13);
  271. $mpdf->SetDirectionality('rtl');
  272. $mpdf->mirrorMargins = true;
  273. $mpdf->SetDisplayMode('fullpage','two');
  274. $mpdf->autoLangToFont = true;
  275. $mpdf->defaultPageNumStyle = 'arabic-indic';
  276. $mpdf->setHeader($h);
  277. $mpdf->setFooter($f);
  278. $mpdf->debug = true;
  279. $stylesheet = file_get_contents('mpdfstyletables.css');
  280. $mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
  281. $mpdf->WriteHTML($html);
  282. $mpdf->AddPage();
  283. $mpdf->SetColumns(2,'J');
  284. $mpdf->WriteHTML($html);
  285. $mpdf->SetColumns(0);
  286. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  287. // INDEX
  288. $html = '
  289. <pagebreak type="next-odd" />
  290. <h2>Index</h2>
  291. <columns column-count="2" column-gap="5" />
  292. <indexinsert usedivletters="on" links="on" collation="ar_SA.utf8" collation-group="Arabic_Saudi_Arabia" />
  293. ';
  294. $mpdf->WriteHTML($html);
  295. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  296. $mpdf->Output();
  297. exit;
  298. //==============================================================
  299. //==============================================================
  300. //==============================================================