123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959 |
- <?php
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- set_time_limit(600);
- ini_set("memory_limit","256M");
- //
- $timeo_start = microtime(true);
- //
- //==============================================================
- define('_MPDF_URI','../'); // must be a relative or absolute URI - not a file system path
- define('_MPDF_PATH', '../');
- //==============================================================
- define("_JPGRAPH_PATH", '../../jpgraph_5/jpgraph/'); // must define this before including mpdf.php file
- define("_TTF_FONT_NORMAL", 'arial.ttf');
- define("_TTF_FONT_BOLD", 'arialbd.ttf');
- //==============================================================
- require_once __DIR__ . '/../vendor/autoload.php';
- //
- $timeo_start = microtime(true);
- //
- //==============================================================
- //==============================================================
- $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->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="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="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="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 ='
- <style>
- body, p { font-family: freesans; font-size: 16pt; }
- h3 { font-size: 16pt; margin-bottom:0; }
- .tamil {
- font-family:Latha;
- font-size: 16pt;
- }
- .oriya {
- font-family:Kalinga;
- font-size: 16pt;
- }
- .punjabi {
- font-family:Raavi;
- font-size: 16pt;
- }
- .gujarati {
- font-family:Shruti;
- font-size: 16pt;
- }
- .hindi {
- font-family:Mangal;
- font-size: 16pt;
- }
- .nepali {
- font-family:Mangal;
- font-size: 16pt;
- }
- .assamese { /* same as bengali */
- font-family:vrinda;
- font-size: 16pt;
- }
- .bengali {
- font-family:vrinda;
- font-size: 16pt;
- }
- .telugu {
- font-family:gautami;
- font-size: 16pt;
- }
- .kannada {
- font-family:Tunga;
- font-size: 16pt;
- }
- .malayalam {
- font-family:Kartika;
- font-size: 16pt;
- }
- </style>
- <p class="bengali">
- ৎত
- ৎতে
- ত
- ত্ত
- ত্তে
- ত্‍ত
- ত্‍তে
- <br />
- ত্‍ = Khanda Ta. (U+09CE) character was added in Unicode v 4.1 and prior to this, (U+09A4 U+09CD U+200D) used <br />
- </p>
- Kannada
- <div class="kannada">ತಮ್ಮದೇ ಯುವತಿಯೊಬ್ಬಳನ್ನು ಸಾಬೀತಾಗಿದ್ದು ನಡೆಸಿದ್ದು ಇಂಗ್ಲೆಂಡ್ ನ್ಯಾಯಾಲಯವು ಯುವತಿಯನ್ನು ಮಲದೊಡ್ಡಪ್ಪ ಮತ್ತು ಭಾವ ಅತ್ಯಾಚಾರ ಕಾರ್ಡಿಫ್ ಕ್ರೌನ್ ನ್ಯಾಯಾಲಯದಲ್ಲಿ ಅಪರಾಧಿಗಳಲ್ಲಿ ಮಲತಂದೆ ಮತ್ತು ಮಲದೊಡ್ಡಪ್ಪ ಅಕ್ರಮ ವಲಸಿಗರಾಗಿದ್ದು ಅವರನ್ನು ಭಾರತಕ್ಕೆ ಮಾಡಲಾಗುತ್ತದೆ.
- <br />
- ಮಲದೊಡ್ಡಪ್ಪ ಮತ್ತು ಮಲತಂದೆಗೆ ಕ್ರಮವಾಗಿ ಮತ್ತು
- <br />
- ಬಾಲಕಿಯನ್ನೇ ಅತ್ಯಾಚಾರ ಮಾಡಿದ್ದರು ವರ್ಷವಿದ್ದಾಗ ಗರ್ಭಕ್ಕೆ ಕಾರಣವಾಗಿರುವುದನ್ನೂ ಮಲ ದೊಡ್ಡಪ್ಪ ಅವಧಿಯಲ್ಲಿ ಒಪ್ಪಿಕೊಂಡಿದ್ದಾನೆ ಆಕೆಯನ್ನು ಅತ್ಯಾಚಾರ ಮಾಡಿದ್ದು ಮಗುವಾಗಿದ್ದಾಗ ತೋರಿಸಿದ್ದ. ಅಲ್ಲದೆ ಹಲ್ಲೆ ನಡೆಸಿದ್ದ ನ್ಯಾಯಾಲಯ
- <br />
- ಬಾಲಕಿಯಾಗಿದ್ದಾಗಲೇ ಆರಂಭಿಸಿದ್ದನ್ನು ನ್ಯಾಯಾಲಯ ಹೊರಗೆಳೆದಿತ್ತು.
- </div>
- Telegu
- <div class="telugu">ఆగ్నేయ ఇరాన్‌లో ఆత్మాహుతి
- <br />
- రెవల్యూషనరీ గార్డ్‌లతో ప్రముఖ కమాండర్‌లతోసహా మొత్తం చెందినట్లు లోక్‌సభ స్పీకర్
- <br />
- దాడుల్లో భద్రతాదళాలకు శుశాత్రీ, మొహమ్మద్‌ తదితరులున్నారని, తీవ్రగాయాలపాలైనారని చెప్పారు.
- <br />
- కమాండర్లు పాకిస్థాన్‌ సరిహద్దుల్లోనున్న పిశిన్ ప్రాంతంలో పాల్గొనేందుకు దేరి వెళ్ళారని
- </div>
- Oriya
- <div class="oriya">ଆପଣଙ୍କୁ ସ୍ବାଗତ ଏହି ଉନ୍ମୁକ୍ତ ଇଣ୍ଟରନେଟ ବିଶ୍ବର ଉପଲବ୍ଧ ମଧ୍ୟ ବର୍ଦ୍ଧିତ କିମ୍ବା ଏହି ପୃଷ୍ଠାକୁ ସମ୍ପାଦନ ସମସ୍ତ ମୁକ୍ତ ଲାଇସେନ୍ସର ସର୍ତ୍ତ ଉପଲବ୍ଧ ମୁକ୍ତ ଇଲେକ୍ଟ୍ରୋନିକ୍ସ ପ୍ରିଣ୍ଟ୍ ପର୍ଯ୍ୟନ୍ତ ପ୍ରସଙ୍ଗ
- </div>
- Punjabi
- <div class="punjabi">ਗ੍ਰਹਿਮੰਤਰੀ ਉਨ੍ਹਾ ਦ੍ਰਮੁਕ ਸ਼੍ਰੀਲੰਕਾ
- </div>
- Malayalam
- <div class="malayalam">സിപി‌എം
- </div>
- Bengali (bn)
- <div class="bengali">স্বেচ্ছাসেবী ও ত্রাণ তীব্রতা স্রোত সংখ্যা স্বভাবতই আক্রমণ প্রবেশ নিয়ন্ত্রণ সাহায্যে
- </div>
- Assamese
- <div class="bengali">উদ্দেশ্য বিশ্বকোষ প্ৰণয়ন সাহিত্যিকসকল
- গ্ৰাহ্য গ্ৰহন
- </div>
- Misc
- <div class="bengali">অ্য ক ক় কি ক্ ক্ক ক্র ক্র্ক ক্‌ক ক্‍ক দ্য ন্ক ন্ধ ন্ব ন্য ন্র ন্‌ক ন্‌ধ ন্‌ব ন্‌র ন্‍ক ন্‍ধ ন্‍ব ন্‍র য্ র্ক র্কি র্কৌ র্ন্‍ র্ব্ব শ্য ষ্য স্য ি কো কৌ ক্র্ক ন্‌ক ন্‌ব ন্‍ক ন্‍ব ন্‍র র্কাং র্কাঃ র্কৌ র্ভ ৰ্ভ ৱ্ভ অৗ ন্ত্র ত্যু চ্য্র
- </div>
- Reph
- <div class="bengali">র্ক র্কা র্কি র্কী র্কু র্কূ র্কে র্কৈ র্কো র্কৌ র্য র্‍য র‍্য র্র‍্য
- </div>
- CP - Dependent
- <div class="bengali">া ি ী ু ূ ৃ ে ৈ ো ৌ
- </div>
- GSUB
- <div class="bengali">ক্র খ্র গ্র ঘ্র জ্র ত্র দ্র ধ্র প্র ম্র শ্র স্র হ্র ছ্র ট্র ঠ্র ড্র থ্র ফ্র ব্র ভ্র ক্য খ্য গ্য ঘ্য চ্য জ্য ট্য ঠ্য ড্য ড়্য ঢ্য ত্য থ্য দ্য ধ্য ন্য প্য ফ্য ব্য ভ্য ম্য য্য র‍্য ল্য শ্য ষ্য স্য হ্য
- ক্ল গ্ল প্ল ম্ল ল্ল শ্ল স্ল হ্ল ক্ক
- <br />
- ক্ব জ্ব ট্ব ত্ব দ্ব ধ্ব ন্ব ব্ব ম্ব ল্ব শ্ব ষ্ব স্ব হ্ব
- <br />
- ণ্ণ ষ্ণ ষ্ণু হ্ণ হ্ণি জ্জ ট্ট ত্ত দ্দ ন্ন প্প ত্ন ম্ন স্ন হ্ন ক্ন গ্ন গ্ম ঙ্ম ট্ম ণ্ম ত্ম দ্ম ধ্ম ন্ম ম্ম ল্ম শ্ম ষ্ম হ্ম ক্ষ ক্ত গ্ধ ঙ্ক ঙ্খ ঙ্গ ঙ্ঘ চ্চ চ্ছ চ্ঞ জ্ঝ জ্ঞ ঞ্চ ঞ্ছ ঞ্জ ণ্ট ক্ট ণ্ড ন্ড দ্গ দ্ঘ দ্ধ দ্ভ ন্ত ন্থ ন্দ ন্ধ প্ত ব্জ ব্দ ম্প ম্ফ ম্ভ ল্ক ল্গ ল্প ল্ফ শ্চ ষ্ক ষ্ট ষ্ঠ ষ্প ষ্ফ স্ক স্খ স্ত স্থ স্প স্ফ ম্থ ল্ত ল্ধ ক্ম ক্স গ্গ ঘ্ন চ্ন
- <br />
- ছ্ব
- <br />
- ঞ্ঝ ড্ড ড্ম ড়্গ ণ্ঠ ণ্ঢ ণ্ব ত্থ থ্ব ধ্ন ন্ট ন্ঠ ন্স প্ট প্ন ফ্ল ব্ধ ব্ল ভ্ল ম্ত ম্দ ল্ট ল্ড শ্ছ শ্ন শ্ত স্ট স্ম
- <br />
- চ্ছ্র চ্ছ্ব দ্দ্ব দ্ধ্ব ন্ধ্র ব্দ্র
- <br />
- ক্ষ্ণ ক্ষ্ম
- <br />
- জ্জ্ব ত্ত্ব ত্ম্য ন্ত্র ন্ত্ব ন্দ্র ন্ধ্য ন্ন্য ম্প্র ম্ভ্র র্ধ্ব র্শ্ব ষ্ট্র ষ্প্র স্ত্র স্ট্র স্ক্র ক্ট্র
- প্স
- </div>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- // ************ FIXES ************
- // ************ FIXES ************
- $htmlx ='
- <style>
- body, p { font-size: 15pt;}
- h3 { font-size: 15pt; margin-bottom:0; }
- .tamil {
- font-family:Latha;
- font-size: 26pt;
- }
- .oriya {
- font-family:Kalinga;
- font-size: 26pt;
- }
- .punjabi {
- font-family:Raavi;
- font-size: 26pt;
- }
- .gujarati {
- font-family:Shruti;
- font-size: 26pt;
- }
- .hindi {
- font-family:Mangal;
- font-size: 26pt;
- }
- .nepali {
- font-family:Mangal;
- font-size: 26pt;
- }
- .assamese { /* same as bengali */
- font-family:solaimanlipi;
- font-family:vrinda;
- font-size: 26pt;
- }
- .bengali {
- font-family:solaimanlipi;
- font-family:vrinda;
- font-size: 26pt;
- }
- .telugu {
- font-family:gautami;
- font-size: 26pt;
- }
- .kannada {
- font-family:Tunga;
- font-size: 26pt;
- }
- .malayalam {
- font-family:Kartika;
- font-size: 26pt;
- }
- </style>
- FIX OTL (ZZZ93) Kannada: Old spec Lohit-Kannada -
- <div style="font-family:\'Lohit Kannada\'; font-size: 22pt;">
- ನ್ನು ದ್ದು ನ್ನು ತ್ತು ದ್ದು ದ್ದು ನ್ನು ಪ್ಪ ಕ್ರೌ ಕ್ರ
- </div>
- INDIC_FIX_1:
- <div class="bengali">র্ন্‍ </div>
- INDIC_FIX_2:
- <div class="telugu">
- న్‌లా
- న్‌లి
- న్‌లీ
- న్‌లు
- న్‌లూ
- న్‌లె
- న్‌లే
- న్‌లై
- న్‌లొ
- న్‌లో
- న్‌లౌ
- </div>
- INDIC_FIX_3:
- <!-- handled differently in 2 fonts -->
- <div style="font-family:vrinda;font-size: 26pt;">ক্র্ক</div>
- <div style="font-family:freeserif;font-size: 26pt;">ক্র্ক</div>
- INDIC_FIX_4:
- <div class="telugu">ర్డ్‌</div>
- OTL_FIX_1 & OTL_FIX_2:
- <div><span class="oriya">ନ୍ମୁ</span> <span style="font-family:Arial; font-size: 36pt;">Ä̃̕</span> </div>
- OTL_FIX_3:
- <div class="oriya">କ୍ଟ୍ର</div>
- ZKI8 Fix - (NB With this, Indic fix 2 no longer required.)
- <div style="font-family:\'Pothana2000\'; font-size: 22pt;">
- న్‌లో
- </div>
- ZZZ96 Fix - GPOS fix in OTL Type 2 (kerning) for XPlacement of first character of pair
- <div style="font-family: tharlon; font-size: 26pt;">
- ကြို
- </div>
- Part 2) Kern on by default as needed for repositioning
- <div style="font-family: \'tharlon\'; font-size: 26pt;">
- သန္တာ
- </div>
- LOHIT fonts at :
- https://fedorahosted.org/lohit/wiki
- Version 2 are under development: http://pravin-s.blogspot.in/2013/08/project-creating-standard-and-reusable.html
- Solaiman-Lipi (Bengali): http://www.omicronlab.com/bangla-fonts.html
- Khmer Fix 1
- <div style="font-family:\'daunpenh\'; font-size: 36pt; ">
- ង្រ្គ
- ង្គ្រ
- ន្រ្តី
- ន្ត្រី
- ង្រ្គោះ
- ង្គ្រោះ
- </div>
- ';
- // ************ FIXES ************
- // INDIC_FIX_1 Indic Initial re-ordering; stops search for base when Halant before ZWJ - this sets the BASE at position of ZWJ
- //define('OMIT_INDIC_FIX_1', 1);
- // INDIC_FIX_2 Indic Initial re-ordering; Indic If C(base) H ZWNJ C2 Matra - and Matra position is POS_BEFORE_SUB,
- // this changes it to correct position after the 2nd C (by changing it to POS_AFTER_SUB)
- // i.e. when ZWNJ prevents C2 from becoming a joined/form
- //define('OMIT_INDIC_FIX_2', 1);
- // INDIC_FIX_3 Indic Initial re-ordering; If C(pre-base) H Ra H C(base) - this allows blwf to be applied to pre-base H-Ra
- // whereas blwf is normally only applied post-base
- // If blwf not substituted, marks for Ra + H to apply 'rphf'
- //define('OMIT_INDIC_FIX_3', 1);
- // INDIC_FIX_4 Indic Initial re-ordering; ZWNJ should block H C from forming blwf post-base (e.g. Ra[base] H C H ZWNJ)
- // need to unmask backwards beyond first consonant arrived at */
- //define('OMIT_INDIC_FIX_4', 1);
- // OTL_FIX_1 GPOS Mark to Mark Attachment - prevent rule being skipped if the "base" mark is not attached to a ligature
- // because it would be skipped as it deems that the marks are attached to different ligs or components of ligs.
- //define('OMIT_OTL_FIX_1', 1);
- // OTL_FIX_2 GPOS Mark to Mark Attachment - sets a BaseWidth for the Mark to attach to
- //define('OMIT_OTL_FIX_2', 1);
- // OTL_FIX_3 GSUB Type 6 substitution, returned value for shift which meant next character was skipped for lookup (x3 lines)
- //define('OMIT_OTL_FIX_3', 1);
- // ZKI6 fixed moving characters using _move_info_pos()
- // ZKI7 fixed old_spec to mark Ra-Halant for pre-base ordering (instead of Halant-Ra)
- // ZKI8 Fix Indic Initial re-ordering: ZWNJ will stop search for base
- // INDIC_FIX_2 no longer required when this is used.
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- $htmlx = '
- <style>
- body, p { font-size: 15pt;}
- .khmer {
- font-family:daunpenh;
- font-size: 36pt;
- }
- </style>
- KHMER
- <div class="khmer">
- ង្រ្គ
- ង្គ្រ
- ន្រ្តី
- ន្រ្តី
- ង្គ្រោះ
- </div>
- <div class="khmer">
- យុវជន​ម្នាក់​បាន​ស្លាប់​ដោយ​គ្រាប់កាំភ្លើង​របស់​ប៉ូលិស និង​បីនាក់​ផ្សេងទៀត​រងរបួស នៅក្នុង​ការប្រឈម​មុខ​ដាក់គ្នា​ដាច់ដោយឡែក​គ្នាមួយ រវាង​ក្រុម​យុវជន​មួយ​ក្រុម ជាមួយ​ប៉ូលិស នៅ​ម្តុំ​ស្ពាន​ក្បាលថ្នល់។ នេះ​បើតាម​ព័ត៌មាន​ពី​លោក​ ចាន់ សាវ៉េត មន្រ្តី​ស៊ើបអង្កេត​របស់​អង្គការ​សិទ្ធិមនុស្ស​អាដហុក ដែល​វត្តមាន​នៅ​កន្លែង​កន្លែង​កើតហេតុ នៅ​យប់​ថ្ងៃ​អាទិត្យ​ទី ១៥ កញ្ញានេះ។
- </div>
- Khmer OS
- <div style="font-family:\'Khmer OS\'; font-size: 16pt; ">
- ង្រ្គ
- ង្គ្រ
- ន្រ្តី
- ន្រ្តី
- ង្គ្រោះ
- </div>
- <div style="font-family:\'Khmer OS\'; font-size: 16pt; ">
- យុវជន​ម្នាក់​បាន​ស្លាប់​ដោយ​គ្រាប់កាំភ្លើង​របស់​ប៉ូលិស និង​បីនាក់​ផ្សេងទៀត​រងរបួស នៅក្នុង​ការប្រឈម​មុខ​ដាក់គ្នា​ដាច់ដោយឡែក​គ្នាមួយ រវាង​ក្រុម​យុវជន​មួយ​ក្រុម ជាមួយ​ប៉ូលិស នៅ​ម្តុំ​ស្ពាន​ក្បាលថ្នល់។ នេះ​បើតាម​ព័ត៌មាន​ពី​លោក​ ចាន់ សាវ៉េត មន្រ្តី​ស៊ើបអង្កេត​របស់​អង្គការ​សិទ្ធិមនុស្ស​អាដហុក ដែល​វត្តមាន​នៅ​កន្លែង​កន្លែង​កើតហេតុ នៅ​យប់​ថ្ងៃ​អាទិត្យ​ទី ១៥ កញ្ញានេះ។
- </div>
- Khmer
- <div style="font-family:\'Khmer\'; font-size: 16pt; ">
- ង្រ្គ
- ង្គ្រ
- ន្រ្តី
- ន្រ្តី
- ង្គ្រោះ
- </div>
- <div style="font-family:\'Khmer\'; font-size: 16pt; ">
- យុវជន​ម្នាក់​បាន​ស្លាប់​ដោយ​គ្រាប់កាំភ្លើង​របស់​ប៉ូលិស និង​បីនាក់​ផ្សេងទៀត​រងរបួស នៅក្នុង​ការប្រឈម​មុខ​ដាក់គ្នា​ដាច់ដោយឡែក​គ្នាមួយ រវាង​ក្រុម​យុវជន​មួយ​ក្រុម ជាមួយ​ប៉ូលិស នៅ​ម្តុំ​ស្ពាន​ក្បាលថ្នល់។ នេះ​បើតាម​ព័ត៌មាន​ពី​លោក​ ចាន់ សាវ៉េត មន្រ្តី​ស៊ើបអង្កេត​របស់​អង្គការ​សិទ្ធិមនុស្ស​អាដហុក ដែល​វត្តមាន​នៅ​កន្លែង​កន្លែង​កើតហេតុ នៅ​យប់​ថ្ងៃ​អាទិត្យ​ទី ១៥ កញ្ញានេះ។
- </div>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- $htmlx = '
- Thai shaper
- <div style="font-family:\'Cordia New\'; font-size: 28pt;">
- ด๋ำ
- ดํ๋า
- </div>
- Lao shaper
- <div style="font-family:\'DokChampa\'; font-size: 28pt;">
- ດ໋ຳ
- ດໍ໋າ
- </div>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- /*
- $html = '
- <style>
- [lang=syr] {
- color: purple;
- }
- div[lang="syr"] {
- color: teal;
- }
- :lang(syr) {
- color: blue;
- }
- div:lang(syr) {
- color: red;
- }
- span :lang("syr") {
- color: green;
- }
- </style>
- SYRIAC - Estrangelo Edessa
- <div lang="syr" class="syriac" style="font-size: 26pt; direction: rtl;">
- ܘܬܘܒ ܐܬܟܢܝܬ ܗܕܐ ܕܝܪܐ ܩܕܝܫܬܐ ܒܫܡ ܩܕܝܫܐ ܥܢܘܝܐ ܡܪܝ ܐܘܓܝܢ ܕܐܬܐ ܗ̱ܘܐ ܡܢ ܡܨܪܝܢ ܆ ܥܠ ܒܙܒܢ ܩܪܒܐ ܐܝܬܝܘ ܕܝܪ̈ܝܐ <span lang="syr">(ܐܝܟ ܬܫܥܝܬܐ ܬܘܕܝܬܢܝܬܐ)</span> ܚܕܟܡܐ ܓܪ̈ܡܐ ܕܩܕܝܫܐ ܡܢ ܕܝܪܐ ܕܡܪܝ ܐܘܓܝܢ ܒܛܘܪܐ ܕ ܐܝܙܠܐ ܕܢܦܠ ܒܡܕܒܪܐ ܕ ܢܨܝܒܝܢ ܥܠ ܬܚܘܡܐ ܕ ܩܡܫܠܝ. ܘܬܘܒ ܐܬܟܢܝܬ ܕܝܪܐ ܕ ܙܥܦܪܐܢ ܐܘ ܟܘܪܟܡܐ ܒܫܡ ܡܪܝ (ܫܠܝܡܘܢ) ܕܝܪܝܐ ܕܫܬܐܣ ܠܕܝܪܐ ܒܫܢܬ 473 ܡ.
- </div>
- ';
- $mpdf->autoLangToFont = true;
- */
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- /*
- $html = '<p style="font-family: \'trebuchet ms\';">Distinguishes multiple languages enclosed in same element (tags):
- Arabic قال الرئيس
- English Cat sat on the large mat
- Tamil ஷியா
- Hindi भारत और
- Japanese いろはにほへと
- Chinese 来自商务部新闻办公
- Thai เป็นมนุษย
- Viet Một khảo sát mới cho biết người dân
- English Cat sat on the large mat
- Korean 키스의 고유조건은
- Syriac ܘܬܘܒ ܐܬܟܢܝܬ ܗܕܐ ܕܝܪܐ
- Myanmar (Burmese) မြန်​မာအခေါ် တရားဝင်​အား​ဖြင့်
- Khmer យុវជន​ម្នាក់​បាន
- NKo ߟߐ߬ߝߋ߲ ߓߍ߯ ߟߊߝߋ߲
- Thaana ދިވެހި ވިކިޕީޑިއާ
- Arabic الحمد لله رب العالمين
- Urdu عزت کے اعتبار سے چیف جسٹس
- Pashto ځانمرگو بريدونو لږ
- Farsi گیکدیگر
- Sindhi جي ڳالهه ڪئي
- English Cat sat on the large mat
- </p>
- ';
- $mpdf->autoScriptToLang = true;
- $mpdf->baseScript = 1;
- $mpdf->autoVietnamese = true;
- $mpdf->autoArabic = true;
- $mpdf->autoLangToFont = true;
- */
- //==============================================================
- //==============================================================
- //==============================================================
- // TIBETAN
- $htmlx = '
- <div style="font-family:\'Jomolhari\'; font-size: 36pt; line-height: 1.6;">
- <div>
- ༄།ཏདྱཐཱ།ཨོཾགཏེགཏེཔཱརགཏེཔཱརསཾགཏེབོདྷིསྭཱཧཱ།
- ཨོཾམུནིམུནིམཧཱམུནིཡེསྭཱཧཱ།ཨོཾཨཱམིདྷེཝཱཧྲཱི།ཨོཾམཎིཔདྨེཧཱུཾ།ཨོཾཨཱཿཧཱུཾ་
- བཛྲགུརུཔདྨསིདྡྷིཧཱུཾ།ཨོཾཨཱམརཱཎིཛྲིཝནཏིཡེསྭཱཧཱ།ཨོཾཝགིཤཱརིམུཾ།ཨོཾ་
- མཎིཔདྨེཧཱུཾ།ཨོཾབཛྲཔཱནིཧཱུཾ།ཨོཾཏཱརེཏུཏྟཱརེཏུརེསྭཱཧཱ།ཨོཾབྷྲཱུཾ་
- སྭཱཧཱ།ཨོཾཨཱམྲིཏཱཨཱཡུརྡདེསྭཱཧཱ།ཨོཾམརིཙྱེམཾསྭཱཧཱ།
- </div>
- </div>
- ';
- //==============================================================
- //==============================================================
- $htmlx = '
- <div>
- <img src="myanmartest.jpg" />
- </div>
- MYANMAR (Burmese) - Myanmar Text
- <div style="font-family:\'Myanmar Text\'; font-size: 32pt; line-height: 1.5em;">
- င်္က္ကျြွှေို့်ာှီ့ၤဲံ့းႍ
- </div>
- <br />
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- // FIXES for kerning/line-justification
- $htmlx = '
- <style>
- body, p { font-size: 15pt;}
- </style>
- <div style="border: 1px solid #888888;">
- // Test of XPlacement/XAdvance at end of line
- <div style="direction: rtl; font-family: \'arabic typesetting\'; line-height: 1.8; font-size: 42pt; text-align:justify;">
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- وَلْيَك
- </div>
- <div style="direction: rtl; font-family: xbzar; font-size: 36pt;">
- کا
- </div>
- GPOS Type 2: Format 2 (THAANA - MV Boli)
- <div style="font-family:\'MV Boli\'; font-size: 38pt; direction: rtl;">
- ވިކިޕީޑިއާ
- </div>
- GPOS Type 2: Format 2 (ARABIC XB Zar)
- <div style="direction: rtl; font-family: xbzar; font-size: 36pt;">
- کا
- </div>
- GPOS Type 2: Format 2 (ARABIC XB Zar)
- <div style="direction: rtl; font-family: xbzar; font-size: 36pt">
- توگه
- </div>
- GPOS Type 2: Format 2 (SYRIAC - Estrangelo Edessa)
- <div style="font-family:\'Estrangelo Edessa\'; font-size: 26pt; direction: rtl;">
- ܡܨܪܝܢ
- </div>
- GPOS Type 2: Format 1 (Tharlon)
- <div style="font-family: tharlon; font-size: 26pt;">ကြို</div>
- GPOS Type 2: Format 1 (Arabic Typesetting)
- <div style="direction: rtl; font-family: \'arabic typesetting\'; line-height: 1.8; font-size: 42pt;">
- كَبِيرًا إِلَىٰٓ
- </div>
- GPOS Type 2: Format 1 (Arial)
- <div style="font-family:arial; font-size: 48pt;font-feature-settings:\'kern\'; ">
- ÄYÄWAY Tö
- </div>
- </div>
- ';
- //==============================================================
- // WHITESPACE
- $htmlx = '
- <p>
- From Lazamon\'s<i> <a href="http://mesl.itd.umich.edu/b/brut/">Brut</a></i>
- <p>
- <div> Monotonic: <p> <span> Hallo World</span><p> <span> Hallo World</span></div>
- <table cellspacing=0 cellpadding=0> <tr> <td> Monotonic: <p> <span> Hallo World</span><p> <span> Hallo World</span></td></tr> </table>
- <div> Hallo <span> Hallo <span> Hallo </span> Hallo </span> Hallo </div>
- ';
- //==============================================================
- // LANGUAGE TAGS - CYRILLIC
- $htmlx = '
- HTML language tags to distinguish Bulgarian, Russian, and Serbian,
- which have different italic forms for lowercase б, г, д, п, and/or т:
- <table style="font-family:FreeSerif">
- <tr>
- <td><b>Bulgarian</b>:
- <td><span lang=BG>[ бгдпт</span> ]
- <td><span lang=BG>[ <i>бгдпт</i></span> ]
- <td><span lang=BG><i> Мога да ям стъкло и не ме боли.</i></span>
- <tr>
- <td><b>Russian</b>:
- <td><span lang=RU>[ бгдпт</span> ]
- <td><span lang=RU>[ <i>бгдпт</i></span> ]
- <td><span lang=RU><i>Я могу есть стекло, это мне не вредит.</i></span>
- <tr>
- <td><b>Serbian</b>:
- <td><span lang=SR>[ бгдпт</span> ]
- <td><span lang=SR>[ <i>бгдпт</i></span> ]
- <td> <span lang=SR><i>Могу јести стакло
- а
- да ми
- не
- шкоди.</i></span>
- </table>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- // BIDI ALGORITHM FOR CHUNKS
- $htmlx = '
- <div style="font-family: xbriyaz">Arabic (<span lang="ar">السلام عليكم</span>)</div>
- <div dir="rtl" style="font-family: xbriyaz">Arabic (<span lang="ar">السلام عليكم</span>)</div>
- <div dir="rtl" style="font-family: xbriyaz">(<span lang="ar">السلام عليكم</span>) Arabic </div>
- ';
- //==============================================================
- // CSS unicode-bidi
- // normal | embed | bidi-override | inherit
- $htmlx = '
- // embed = add LRE (U+202A; for \'direction: ltr\') or RLE (U+202B; for \'direction: rtl\') at the start of element and PDF (U+202C) at the end of element
- <div style="font-family: freesans; direction: ltr;">
- <p>english17 <span>עברית18 english19 עברית20</span></p>
- <p>english17 <span>‫עברית18 english19 עברית20‬</span></p>
- <p>english17 <span style="direction: rtl; unicode-bidi: embed;">עברית18 english19 עברית20</span></p>
- </div>
- // bidi-override = LRO (U+202D; for \'direction: ltr\') or RLO (U+202E; for \'direction: rtl\') at the start of the element or at the start of each anonymous child block box, if any, and a PDF (U+202C) at the end of the element
- <div style="font-family: freesans; direction: rtl;">
- <p style="direction: ltr; unicode-bidi:normal;">english17 עברית18 english19 עברית20</p>
- <p style="direction: ltr;">‭english17 עברית18 english19 עברית20‬</p>
- <p style="direction: ltr; unicode-bidi:bidi-override;">english17 עברית18 english19 עברית20</p>
- </div>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- // used to determine the aspect value of a font.
- // CSS3 font-aspect: http://www.w3.org/TR/css3-fonts/#propdef-font-size-adjust
- // DejaVuSansCondensed 0.547
- // FreeSerif 0.45
- // Arabic Typesetting 0.278
- // Mondulkiri 0.45
- // Sun-ExtA 0.455
- // XB Riyaz 0.523
- $htmlx = '
- <style>
- p {
- font-family: "XB Riyaz";
- font-size: 400px;
- }
- span {
- border: solid 1px red;
- }
- .adjust {
- font-size-adjust: 0.523;
- }
- .adjust2 {
- font-size-adjust: 0.323;
- }
- </style>
- <p><span>b</span><span class="adjust">b</span></p>
- <p><span>b</span><span class="adjust2">b</span></p>
- ';
- //==============================================================
- //==============================================================
- // Test for alpha transparency in PNG
- $htmlx = '
- <div style="background-color: transparent;">
- <img src="alpha09.png" height="400px" />
- <img src="alpha36.png" height="400px" />
- </div>
- <div style="background-color: white;">
- <img src="alpha09.png" height="400px" />
- <img src="alpha36.png" height="400px" />
- </div>
- <div style="background-color: navy;">
- <img src="alpha09.png" height="400px" />
- <img src="alpha36.png" height="400px" />
- </div>
- <div style="background-color: maroon;">
- <img src="alpha09.png" height="400px" />
- <img src="alpha36.png" height="400px" />
- </div>
- <div style="background-color: black;">
- <img src="alpha09.png" height="400px" />
- <img src="alpha36.png" height="400px" />
- </div>
- ';
- //==============================================================
- //==============================================================
- $htmlx ='
- <style>
- img.smooth {
- image-rendering:auto;
- image-rendering:optimizeQuality;
- -ms-interpolation-mode:bicubic;
- }
- img.crisp {
- image-rendering: -moz-crisp-edges; /* Firefox */
- image-rendering: -o-crisp-edges; /* Opera */
- image-rendering: -webkit-optimize-contrast;/* Webkit (non-standard naming) */
- image-rendering: crisp-edges;
- -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */
- }
- </style>
- <div>
- <img class="smooth" src="pngtestsuite/bgan6a16.png" width="300px" />
- <span style="image-rendering:-moz-crisp-edges">
- <img class="crisp" src="pngtestsuite/bgan6a162.png" width="300px" />
- </span></div>
- <img src="pngtestsuite/bgan6a162.png" width="300px" />
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- // ICC based Color Profiles in Images + 16-bit Gamma
- $htmlx = '
- PNG (16-bit, Gamma): <div style="background-color: #cc9900; padding: 2em;"><img src="butterfly_ProPhoto.png" ></div>
- PNG (Gamma): <div style="background-color: #cc9900; padding: 2em;"><img src="ColorGammaGradient.png" ></div>
- PNG (ICC Profile): <div style="background-color: #cc9900; padding: 2em;"><img src="colourTestFakeBRG.png" ></div>
- JPEG (ICC Profile):
- <table align="center" cellspacing="4" cellpadding="4">
- <tr>
- <td> Profiles in each quadrant: </td>
- <td> v4 e-sRGB </td>
- <td> v4 YCC-RGB </td>
- </tr>
- <tr>
- <td> </td>
- <td> v2 GBR </td>
- <td> v2 Adobe RGB </td>
- </tr>
- </table>
- <table align="center" width="400"border="0" cellspacing="0" cellpadding="0">
- <tr align="top">
- <td align="right"> <img src="Upper_Left.jpg" width=180> </td>
- <td align="left"> <img src="Upper_Right.jpg" width=171> </td>
- </tr>
- <tr>
- <td align="right"> <img src="Lower_Left.jpg" width=180> </td>
- <td align="left"> <img src="Lower_Right.jpg" width=171> </td>
- </tr>
- </table>
- This should correctly display with the motorbike in green:
- <img src="BGR-Red-Ducati_WCS-Test-TriState.jpg" />
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- // UNDERLINE and LINE-THROUGH - together
- $htmlx ='
- <p style="text-decoration:none">Hallo World
- <span style="text-decoration:underline">Hallo World
- <span style="text-decoration:line-through">Hallo World
- <span style="color: red;">Hallo World</span>
- Hallo World</span>
- Hallo World</span>
- Hallo World</p>
- ';
- //==============================================================
- //==============================================================
- // UNDERLINE and LINE-THROUGH - across spans
- $htmlx ='
- <p style="font-size: 32pt"><span style="text-decoration:underline">1<sup>st</sup></span></p>
- <p style="font-size: 32pt">1<sup><span style="text-decoration:underline">st</span></sup></p>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //BUG TABLES - Width > Page - needing to wrap letters or resize
- // KEEP THIS to Illustrate mpdf - ZZZZZe.php Bug fix
- $html = '
- Latin script will resize rather than wrap -
- <table border="1" style="font-family:sun-exta">
- <tr>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td>
- <td>AB</td>
- <td>AB</td>
- <td>ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB</td>
- </tr>
- </table>
- Can force wrap using overflow: wrap -
- <table border="1" style="font-family:sun-exta;overflow:wrap">
- <tr>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td><td>AB</td>
- <td>AB</td>
- <td>AB</td>
- <td>AB</td>
- <td>ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB</td>
- </tr>
- </table>
- CJK script will wrap characters (this example also resizes to minimum column width). In this case, minimum is 2 characters in last column because of a character which cannot start a line -
- <table border="1" style="font-family:sun-exta">
- <tr>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部部部部部部部部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ</td>
- </tr>
- </table>
- Default layout when resizing not required - note wrapping, but balanced column widths -
- <table border="1" style="font-family:sun-exta">
- <tr>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部</td><td>部部</td><td>部部</td><td>部部</td>
- <td>部部部部部部部部部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ部ォ</td>
- </tr>
- </table>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- $html = '
- <style>
- table.table1 { border-spacing: 10px; }
- .table1 td { padding: 10px; }
- </style>
- <table border="0">
- <tr><td style="border-top:1px solid #000;">1</td><td style="border-top:1px solid #000;">2</td><td style="border-top:1px solid #000;">3</td></tr>
- <tr><td style="border-top:1px solid #000;">4</td><td style="border-top:1px solid #000;">5</td><td style="border-top:1px solid #000;">6</td></tr>
- </table>
- <table border="0" cellPadding="0" cellSpacing="0">
- <tr><td style="border-top:1px solid #000;">1</td><td style="border-top:1px solid #000;">2</td><td style="border-top:1px solid #000;">3</td></tr>
- <tr><td style="border-top:1px solid #000;">4</td><td style="border-top:1px solid #000;">5</td><td style="border-top:1px solid #000;">6</td></tr>
- </table>
- <table border="0" class="table1">
- <tr><td style="border-top:1px solid #000;">1</td><td style="border-top:1px solid #000;">2</td><td style="border-top:1px solid #000;">3</td></tr>
- <tr><td style="border-top:1px solid #000;">4</td><td style="border-top:1px solid #000;">5</td><td style="border-top:1px solid #000;">6</td></tr>
- </table>
- <table border="0" class="table1" cellPadding="0" cellSpacing="0">
- <tr><td style="border-top:1px solid #000;">1</td><td style="border-top:1px solid #000;">2</td><td style="border-top:1px solid #000;">3</td></tr>
- <tr><td style="border-top:1px solid #000;">4</td><td style="border-top:1px solid #000;">5</td><td style="border-top:1px solid #000;">6</td></tr>
- </table>
- <table border="0" class="table1" style="border-spacing: 20px">
- <tr><td style="border-top:1px solid #000;">1</td><td style="border-top:1px solid #000;">2</td><td style="border-top:1px solid #000;">3</td></tr>
- <tr><td style="border-top:1px solid #000;">4</td><td style="border-top:1px solid #000;">5</td><td style="border-top:1px solid #000;">6</td></tr>
- </table>
- <table border="0" class="table1" cellPadding="0" cellSpacing="0" style="border-spacing: 20px">
- <tr><td style="border-top:1px solid #000;">1</td><td style="border-top:1px solid #000;">2</td><td style="border-top:1px solid #000;">3</td></tr>
- <tr><td style="border-top:1px solid #000;">4</td><td style="border-top:1px solid #000;">5</td><td style="border-top:1px solid #000;">6</td></tr>
- </table>
- ';
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
- if (isset($_REQUEST['html'])) { echo $html; exit; }
- if (isset($_REQUEST['source'])) {
- $file = __FILE__;
- header("Content-Type: text/plain");
- header("Content-Length: ". filesize($file));
- header("Content-Disposition: attachment; filename='".$file."'");
- readfile($file);
- exit;
- }
- //==============================================================
- $mpdf->WriteHTML($html);
- // $mpdf->WriteHTML('<div style="font-size: 8pt; margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000;">Generated in '.sprintf('%.2f',(microtime(true) - $mpdf->time0)).' seconds. Peak memory usage '.number_format((memory_get_peak_usage(true)/(1024*1024)),2).' MB</div>');
- // echo number_format((memory_get_peak_usage(true)/(1024*1024)),2).' MB<br />';
- //==============================================================
- //==============================================================
- // OUTPUT
- //$mpdf->SetCompression(false);
- $mpdf->Output(); exit;
- //$mpdf->Output('test.pdf','D'); exit;
- $s = $mpdf->Output('','S'); echo nl2br(htmlspecialchars($s)); exit;
- exit;
- //==============================================================
- //==============================================================
- //==============================================================
- //==============================================================
|