Lines Matching +defs:i +defs:e

516 	var $substitute;  // Array of substitution strings e.g. <ttz>112</ttz>
1249 $this->substitute = []; // Array of substitution strings e.g. <ttz>112</ttz>
1355 if (preg_match('/([\-+])aCJK/i', $mode, $m)) {
1356 $mode = preg_replace('/([\-+])aCJK/i', '', $mode); // mPDF 6
1640 // e.g. A4-L = A4 landscape, A4-P = A4 portrait
1641 if (preg_match('/([0-9a-zA-Z]*)-([P,L])/i', $format, $m)) {
1688 // $res = array of (Unicode) fonts to restrict to: e.g. norasi|norasiB - language specific
1847 * AFRelationship (optional): PDF/A-3 AFRelationship (e.g. "Alternative")
1849 * e.g. to associate 1 file:
1921 for ($i = 1; $i <= $n; $i++) {
1922 if (count($this->extgstates[$i]['parms']) == count($parms)) {
1924 foreach ($this->extgstates[$i]['parms'] as $k => $v) {
1931 return $i;
2188 $orig_w = $sizesarray['WIDTH'] * Mpdf::SCALE; // in user units i.e. mm
2191 if (preg_match('/from-image/i', $properties['BACKGROUND-IMAGE-RESOLUTION']) && isset($sizesarray['set-dpi']) && $sizesarray['set-dpi'] > 0) {
2194 } elseif (preg_match('/(\d+)dpi/i', $properties['BACKGROUND-IMAGE-RESOLUTION'], $m)) {
2863 $i = 0;
2865 $this->tag->OpenTag($save_blk[$b]['tag'], $save_blk[$b]['attr'], $arr, $i);
2888 $i = 0;
2893 $this->tag->OpenTag($save_blk[$b]['tag'], $save_blk[$b]['attr'], $arr, $i);
2929 // If next page already exists - i.e background /headers and footers already written
3350 $i = count($this->spotColors) + 1;
3351 $this->spotColors[$name] = ['i' => $i, 'c' => $c, 'm' => $m, 'y' => $y, 'k' => $k];
3352 $this->spotColorIDs[$i] = $name;
3373 } // e.g. rg => RG
3652 foreach ($unicode as $i => $char) {
3683 if (isset($OTLdata['GPOSinfo'][$i]['wDir']) && $OTLdata['GPOSinfo'][$i]['wDir'] == 'RTL') {
3684 if (isset($OTLdata['GPOSinfo'][$i]['XAdvanceR']) && $OTLdata['GPOSinfo'][$i]['XAdvanceR']) {
3685 $w += $OTLdata['GPOSinfo'][$i]['XAdvanceR'] * 1000 / $this->CurrentFont['unitsPerEm'];
3688 if (isset($OTLdata['GPOSinfo'][$i]['XAdvanceL']) && $OTLdata['GPOSinfo'][$i]['XAdvanceL']) {
3689 $w += $OTLdata['GPOSinfo'][$i]['XAdvanceL'] * 1000 / $this->CurrentFont['unitsPerEm'];
3694 if ($includeKashida && isset($OTLdata['GPOSinfo'][$i]['kashida_space']) && $OTLdata['GPOSinfo'][$i]['kashida_space']) {
3695 $kashida += $OTLdata['GPOSinfo'][$i]['kashida_space'];
3715 for ($i = 0; $i < $l; $i++) {
3716 if (($textvar & TextVars::FC_SMALLCAPS) && isset($this->upperCase[ord($s[$i])])) { // mPDF 5.7.1
3717 $charw = $cw[chr($this->upperCase[ord($s[$i])])];
3722 } elseif (isset($cw[$s[$i]])) {
3723 $w += $cw[$s[$i]];
3724 } elseif (isset($cw[ord($s[$i])])) {
3725 $w += $cw[ord($s[$i])];
3727 if (($textvar & TextVars::FC_KERNING) && $i > 0) { // mPDF 5.7.1
3728 if (isset($this->CurrentFont['kerninfo'][$s[($i - 1)]][$s[$i]])) {
3729 $kerning += $this->CurrentFont['kerninfo'][$s[($i - 1)]][$s[$i]];
3960 $i = count($this->fonts) + $this->extraFontSubsets + 1;
3963 'i' => $i,
4002 $this->fonts[$fontkey]['subsetfontids'] = [$i];
4126 $i = array_intersect($this->sans_fonts, $this->available_unifonts);
4127 if (count($i)) {
4128 $i = array_values($i);
4130 if (!in_array(($i[0] . $style), $this->available_unifonts)) {
4133 $family = $i[0];
4137 $i = array_intersect($this->serif_fonts, $this->available_unifonts);
4138 if (count($i)) {
4139 $i = array_values($i);
4141 if (!in_array(($i[0] . $style), $this->available_unifonts)) {
4144 $family = $i[0];
4148 $i = array_intersect($this->mono_fonts, $this->available_unifonts);
4149 if (count($i)) {
4150 $i = array_values($i);
4152 if (!in_array(($i[0] . $style), $this->available_unifonts)) {
4155 $family = $i[0];
4201 $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
4248 $i = count($this->fonts) + $this->extraFontSubsets + 1;
4249 $this->fonts[$fontkey] = ['i' => $i, 'type' => 'core', 'name' => $this->CoreFonts[$fontkey], 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw];
4269 $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
4294 $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
4607 for ($i = 0; $i < strlen($cOTLdata[$c]['group']); $i++) {
4608 if (isset($cOTLdata[$c]['GPOSinfo'][$i]['kashida']) && $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > 0) {
4624 for ($i = 0; $i < strlen($cOTLdata[$c]['group']); $i++) {
4625 if ($cOTLdata[$c]['group'][$i] == 'S') {
4636 if (isset($cOTLdata[$c]['GPOSinfo'][$i]['kashida']) && $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > 0) {
4638 if ($cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > $max_kashida_in_word) {
4639 $max_kashida_in_word = $cOTLdata[$c]['GPOSinfo'][$i]['kashida'];
4641 $last_kashida_in_word = $i;
4643 $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] = 0;
4646 $max_kashida_in_word = $cOTLdata[$c]['GPOSinfo'][$i]['kashida'];
4647 $last_kashida_in_word = $i;
4672 for ($i = 0; $i < strlen($cOTLdata[$c]['group']); $i++) {
4673 if (isset($cOTLdata[$c]['GPOSinfo'][$i]['kashida']) && $cOTLdata[$c]['GPOSinfo'][$i]['kashida'] > 0) {
4677 $cOTLdata[$c]['GPOSinfo'][$i]['kashida_space'] = (1 / $k_ctr) * $kashida_space;
4821 if ($lineBox && isset($lineBox['boxtop']) && $txt) { // i.e. always from WriteFlowingBlock/finishFlowingBlock (but not objects -
5208 for ($i = 0; $i < $numt; $i++) {
5209 $tx = $t[$i];
5213 if (($i + 1) < $numt) {
5438 $fontid = $last_fontid = $original_fontid = $this->CurrentFont['i'];
5465 for ($i = 0; $i < count($unicode); $i++) {
5466 $c = $unicode[$i];
5475 if (isset($GPOSinfo[$i]['YPlacement']) && $GPOSinfo[$i]['YPlacement']) {
5476 $YPlacement = $GPOSinfo[$i]['YPlacement'] * $this->FontSizePt / $this->CurrentFont['unitsPerEm'];
5480 if (isset($GPOSinfo[$i]['XPlacement']) && $GPOSinfo[$i]['XPlacement']) {
5481 if (!isset($GPOSinfo[$i]['wDir']) || $GPOSinfo[$i]['wDir'] != 'RTL') {
5482 if (isset($GPOSinfo[$i]['BaseWidth'])) {
5483 $GPOSinfo[$i]['XPlacement'] -= $GPOSinfo[$i]['BaseWidth'];
5488 $XshiftBefore += $GPOSinfo[$i]['XPlacement'] * 1000 / $this->CurrentFont['unitsPerEm'];
5489 $XshiftAfter += -$GPOSinfo[$i]['XPlacement'] * 1000 / $this->CurrentFont['unitsPerEm'];
5495 if (isset($GPOSinfo[$i]['kashida_space']) && $GPOSinfo[$i]['kashida_space']) {
5496 $kashida = $GPOSinfo[$i]['kashida_space'];
5503 if (substr($OTLdata['group'], ($i + 1), 1) != 'M') { // Don't add inter-character spacing before Marks
5509 if (((isset($GPOSinfo[$i]['wDir']) && $GPOSinfo[$i]['wDir'] != 'RTL') || !isset($GPOSinfo[$i]['wDir'])) && isset($GPOSinfo[$i]['XAdvanceL']) && $GPOSinfo[$i]['XAdvanceL']) {
5510 $XshiftAfter += $GPOSinfo[$i]['XAdvanceL'] * 1000 / $this->CurrentFont['unitsPerEm'];
5511 } elseif (isset($GPOSinfo[$i]['wDir']) && $GPOSinfo[$i]['wDir'] == 'RTL' && isset($GPOSinfo[$i]['XAdvanceR']) && $GPOSinfo[$i]['XAdvanceR']) {
5512 $XshiftAfter += $GPOSinfo[$i]['XAdvanceR'] * 1000 / $this->CurrentFont['unitsPerEm'];
5524 if ($i > 0 && isset($this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]])) {
5525 $XshiftBefore += $this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]];
5651 $nextbase = $i + 1;
5777 for ($i = 0; $i < count($t); $i++) {
5778 $tx = $t[$i];
5795 if (($i + 1) < count($t)) {
5804 for ($i = 0; $i < count($unicode); $i++) {
5805 if ($i > 0 && isset($this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]])) {
5806 $kern = -$this->CurrentFont['kerninfo'][$unicode[($i - 1)]][$unicode[$i]];
5809 $tx = UtfString::code2utf($unicode[$i]);
5819 for ($i = 0; $i < $l; $i++) {
5820 if ($i > 0 && isset($this->CurrentFont['kerninfo'][$txt[($i - 1)]][$txt[$i]])) {
5821 $kern = -$this->CurrentFont['kerninfo'][$txt[($i - 1)]][$txt[$i]];
5824 $tj .= $this->writer->escape($txt[$i]);
5934 $i = 0;
5951 while ($i < $nb) {
5954 $c = mb_substr($s, $i, 1, $this->mb_enc);
5960 $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
5965 $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
5977 $i++;
5979 $j = $i;
5992 $sep = $i;
6004 if ($i == $j) {
6005 $i++;
6010 $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
6015 $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
6065 $i = $sep + 1;
6073 $j = $i;
6083 $i++;
6094 while ($i < $nb) {
6097 $c = $s[$i];
6104 $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
6110 $i++;
6112 $j = $i;
6125 $sep = $i;
6137 if ($i == $j) {
6138 $i++;
6143 $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
6166 $i = $sep + 1;
6174 $j = $i;
6184 $i++;
6201 $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
6206 $tmpOTLdata = $this->otl->sliceOTLdata($OTLdata, $j, $i - $j);
6214 $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
6326 for ($i = 1; $i <= $this->blklvl; $i++) {
6327 if ($this->blk[$i]['bgcolor'] || $this->blk[$i]['border_left']['w'] || $this->blk[$i]['border_right']['w'] || $this->blk[$i]['border_top']['w'] || $this->blk[$i]['border_bottom']['w']) {
6328 $startfill = $i;
6393 $fontout = (sprintf('BT /F%d %.3F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
7257 for ($i = 0; $i < count($m[0]); $i++) {
7258 $c = strtolower($m[1][$i]);
7259 $v = trim($m[2][$i]);
7879 for ($i = 0; $i < $clen; $i++) {
7883 $c = $s[$i];
7886 if (($this->textvar & TextVars::FC_KERNING) && $i > 0) { // mPDF 5.7.1
7887 if (isset($this->CurrentFont['kerninfo'][$s[($i - 1)]][$c])) {
7888 $cw += ($this->CurrentFont['kerninfo'][$s[($i - 1)]][$c] * $this->FontSizePt / 1000 );
7892 $c = mb_substr($s, $i, 1, $this->mb_enc);
7900 if (isset($sOTLdata['GPOSinfo'][$i]['XAdvanceL'])) {
7901 $cw += $sOTLdata['GPOSinfo'][$i]['XAdvanceL'] * (1000 / $this->CurrentFont['unitsPerEm']) * ($this->FontSize / 1000) * Mpdf::SCALE;
7904 if (($this->textvar & TextVars::FC_KERNING) && $i > 0) { // mPDF 5.7.1
7905 $lastc = mb_substr($s, ($i - 1), 1, $this->mb_enc);
7914 if ($i == 0) {
7918 if ($i == ($clen - 1)) {
8017 if ($i < ($clen - 1)) {
8019 $followingchar = $s[$i + 1];
8021 $followingchar = mb_substr($s, $i + 1, 1, $this->mb_enc);
8066 for ($ac = $i; $ac < ($clen - 1); $ac++) {
8146 // 8) Break at OBJECT (Break before all objects here - selected objects are moved forward to next line below e.g. dottab)
8959 $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
8964 $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
8966 $outstring = sprintf("q %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $w * Mpdf::SCALE, $h * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $h)) * Mpdf::SCALE, $info['i']);
9033 $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
9038 $outstring = sprintf('q %.3F 0 0 %.3F %.3F %.3F cm /FO%d Do Q', $sx, $sy, $x * Mpdf::SCALE - $sx * $info['x'], (($this->h - $y) * Mpdf::SCALE) - $sy * $info['y'], $info['i']);
9040 $outstring = sprintf("q %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $w * Mpdf::SCALE, $h * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $h)) * Mpdf::SCALE, $info['i']);
9061 $sizesarray['IMAGE_ID'] = $info['i'];
9209 $objattr['ID'] = $info['i'];
9223 $objattr['ID'] = $info['i'];
9377 // Used in Columns and keep-with-table i.e. "kwt"
9488 $e = error_get_last();
9489 if (($e['type'] < 2048 && $e['type'] != 8) || (intval($e['type']) & intval(ini_get("error_reporting")))) {
9491 sprintf('Error detected. PDF file generation aborted: %s', $e['message']),
9492 $e['type'],
9494 $e['file'],
9495 $e['line']
9572 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
9591 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
9725 // To rotate the other way i.e. Header to left of page:
9812 // To rotate the other way i.e. Header to left of page:
9960 $this->pages[$pn] = preg_replace('/\s\/F' . $font['i'] . ' \d[\d.]* Tf\s/is', ' ', $this->pages[$pn]);
9972 for ($i = 0; $i < 4; $i++) {
9973 $m[$i] = array_merge($m1[$i], $m2[$i], $m3[$i]);
9977 for ($i = 0; $i < count($m[0]); $i++) {
9978 $key = $m[1][$i] * 2;
9979 if ($m[3][$i] == 'EMCZ') {
9981 } elseif ($m[3][$i] == 'EMCGZ') {
9984 $sortarr[$i] = $key;
9987 foreach ($sortarr as $i => $k) {
9988 $this->pages[$pn] = str_replace($m[0][$i], '', $this->pages[$pn]);
9989 $this->pages[$pn] .= "\n" . $m[0][$i] . "\n";
10046 for ($i = 1; $i <= $this->n; $i++) {
10047 $this->writer->write(sprintf('%010d 00000 n ', $this->offsets[$i]));
10310 if (preg_match('/^html_(.*)$/i', $ohname, $n)) {
10327 if (preg_match('/^html_(.*)$/i', $ehname, $n)) {
10344 if (preg_match('/^html_(.*)$/i', $ofname, $n)) {
10361 if (preg_match('/^html_(.*)$/i', $efname, $n)) {
10682 for ($i = 0; $i < $len; $i++) {
10684 $h = ord($str[$i]);
10688 if (($h <= 0xDF) && ($i < $len - 1)) {
10689 $uni = ($h & 0x1F) << 6 | (ord($str[++$i]) & 0x3F);
10690 } elseif (($h <= 0xEF) && ($i < $len - 2)) {
10691 $uni = ($h & 0x0F) << 12 | (ord($str[++$i]) & 0x3F) << 6 | (ord($str[++$i]) & 0x3F);
10692 } elseif (($h <= 0xF4) && ($i < $len - 3)) {
10693 $uni = ($h & 0x0F) << 18 | (ord($str[++$i]) & 0x3F) << 12 | (ord($str[++$i]) & 0x3F) << 6 | (ord($str[++$i]) & 0x3F);
10730 for ($i = 0; $i < 99; $i++) {
10732 $init = array_search($c, $this->CurrentFont['subsets'][$i]);
10734 if ($this->CurrentFont['subsetfontids'][$i] != $last_fid) {
10735 $ret .= '> Tj /F' . $this->CurrentFont['subsetfontids'][$i] . ' ' . $this->FontSizePt . ' Tf <';
10736 $last_fid = $this->CurrentFont['subsetfontids'][$i];
10741 elseif (count($this->CurrentFont['subsets'][$i]) < 255) {
10742 $n = count($this->CurrentFont['subsets'][$i]);
10743 $this->CurrentFont['subsets'][$i][$n] = $c;
10744 if ($this->CurrentFont['subsetfontids'][$i] != $last_fid) {
10745 $ret .= '> Tj /F' . $this->CurrentFont['subsetfontids'][$i] . ' ' . $this->FontSizePt . ' Tf <';
10746 $last_fid = $this->CurrentFont['subsetfontids'][$i];
10750 } elseif (!isset($this->CurrentFont['subsets'][($i + 1)])) {
10752 $this->CurrentFont['subsets'][($i + 1)] = [0 => 0];
10754 $this->CurrentFont['subsetfontids'][($i + 1)] = $new_fid;
10775 $i = count($this->fonts) + $this->extraFontSubsets + 1;
10783 $this->fonts[$fontkey] = ['i' => $i, 'type' => 'Type0', 'name' => $name, 'up' => $up, 'ut' => 40, 'cw' => $cw, 'CMap' => $CMap, 'registry' => $registry, 'MissingWidth' => 1000, 'desc' => $desc];
11075 } // ??? If lineheight is a factor e.g. 1.3 ?? use factor x 1em or ? use 'normal' lineheight * factor
11438 if (!preg_match('/(http|https|ftp):\/\/.*\//i', $str)) {
11441 $str .= 'xxx'; // in case $str ends in / e.g. http://www.bbc.co.uk/
11442 $this->basepath = dirname($str) . "/"; // returns e.g. e.g. http://www.google.com/dir1/dir2/dir3/
11477 $pattern = sprintf('@^(?!%s)[a-z0-9\.\-+]+:.*@i', implode('|', $wrappers));
11495 for ($i = 0; $i < $backtrackamount + 1; $i++) {
11657 } elseif ($lowertype == 'lower-roman' || $type == 'i') {
11665 } elseif (preg_match('/(arabic-indic|bengali|devanagari|gujarati|gurmukhi|kannada|malayalam|oriya|persian|tamil|telugu|thai|urdu|cambodian|khmer|lao|myanmar)/i', $lowertype, $m)) {
11784 for ($i = $firstrow; $i <= $lastrow; $i++) {
11794 $divh = $content[$i][0]['h'];
11807 foreach ($content[$i] as $tablehf) {
11882 if ($i == $firstrow && $horf == 'H') { // Top
11886 if (($i == ($lastrow) || (isset($tablehf['rowspan']) && ($i + $tablehf['rowspan']) == ($lastrow + 1)) || (!isset($tablehf['rowspan']) && ($i + 1) == ($lastrow + 1))) && $horf == 'F') { // Bottom
11893 if ($colctr == count($content[$i])) { // Right
11926 } elseif (isset($content[$i][0]['trbgcolor']) && $content[$i][0]['trbgcolor'] && $content[$i][0]['trbgcolor'] != 'transparent') { // Row color
11927 $fill = $content[$i][0]['trbgcolor'];
12134 if (isset($content[$i][0]['trgradients']) && ($colctr == 1 || $table['borders_separate'])) {
12135 $g = $this->gradient->parseBackgroundGradient($content[$i][0]['trgradients']);
12156 if (isset($content[$i][0]['trbackground-images']) && ($colctr == 1 || $table['borders_separate'])) {
12157 if ($content[$i][0]['trbackground-images']['gradient'] && preg_match('/(-moz-)*(repeating-)*(linear|radial)-gradient/', $content[$i][0]['trbackground-images']['gradient'])) {
12158 $g = $this->gradient->parseMozGradient($content[$i][0]['trbackground-images']['gradient']);
12178 $image_id = $content[$i][0]['trbackground-images']['image_id'];
12179 $orig_w = $content[$i][0]['trbackground-images']['orig_w'];
12180 $orig_h = $content[$i][0]['trbackground-images']['orig_h'];
12181 $x_pos = $content[$i][0]['trbackground-images']['x_pos'];
12182 $y_pos = $content[$i][0]['trbackground-images']['y_pos'];
12183 $x_repeat = $content[$i][0]['trbackground-images']['x_repeat'];
12184 $y_repeat = $content[$i][0]['trbackground-images']['y_repeat'];
12185 $resize = $content[$i][0]['trbackground-images']['resize'];
12186 $opacity = $content[$i][0]['trbackground-images']['opacity'];
12187 $itype = $content[$i][0]['trbackground-images']['itype'];
12223 if ($i == $firstrow && $horf == 'H') { // Top
12229 if (($i == ($lastrow) || (isset($tablehf['rowspan']) && ($i + $tablehf['rowspan']) == ($lastrow + 1))) && $horf == 'F') { // Bottom
12240 if ($colctr == count($content[$i]) && $finalSpread) { // Right
12249 }// end row $i
13060 $hd = date('Y-m-d H:i') . ' Page ' . $this->page . ' of {nb}';
13200 if (preg_match('/<base[^>]*href=["\']([^"\'>]*)["\']/i', $html, $m)) {
13335 for ($i = 0; $i < count($h[1]); $i++) {
13336 if (preg_match('/name=[\'|\"](.*?)[\'|\"]/', $h[1][$i], $n)) {
13337 $this->pageHTMLheaders[$n[1]]['html'] = $h[2][$i];
13338 $this->pageHTMLheaders[$n[1]]['h'] = $this->_getHtmlHeight($h[2][$i]);
13342 for ($i = 0; $i < count($f[1]); $i++) {
13343 if (preg_match('/name=[\'|\"](.*?)[\'|\"]/', $f[1][$i], $n)) {
13344 $this->pageHTMLfooters[$n[1]]['html'] = $f[2][$i];
13345 $this->pageHTMLfooters[$n[1]]['h'] = $this->_getHtmlHeight($f[2][$i]);
13357 if (isset($hname) && preg_match('/^html_(.*)$/i', $hname, $n)) {
13360 if (isset($fname) && preg_match('/^html_(.*)$/i', $fname, $n)) {
13400 // ? more accurate regexp that allows e.g. <a name="Silly <name>">
13410 for ($i = 0; $i < $cnt; $i++) {
13411 $e = $a[$i];
13412 if ($i % 2 == 0) {
13425 $this->fixedPosBlock .= $e;
13428 if (strlen($e) == 0) {
13433 if (strlen(ltrim($e)) == 0) {
13436 if ($this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats' && substr($e, 0, 1) == ' ') {
13438 $e = ltrim($e);
13444 $e = UtfString::strcode2utf($e);
13445 $e = $this->lesser_entity_decode($e);
13449 if ($this->useSubstitutions && !$this->onlyCoreFonts && $this->subPos < $i && !$this->specialcontent) {
13450 $cnt += $this->SubstituteCharsNonCore($a, $i, $e);
13453 $e = mb_convert_encoding($e, $this->mb_enc, 'UTF-8');
13455 $e = mb_strtoupper($e, $this->mb_enc);
13458 $e = mb_strtolower($e, $this->mb_enc);
13461 $e = mb_convert_case($e, MB_CASE_TITLE, "UTF-8");
13464 if ($this->checkSIP && $this->CurrentFont['sipext'] && $this->subPos < $i && (!$this->specialcontent || !$this->useActiveForms)) {
13465 $cnt += $this->SubstituteCharsSIP($a, $i, $e);
13468 if ($this->useSubstitutions && !$this->onlyCoreFonts && $this->CurrentFont['type'] != 'Type0' && $this->subPos < $i && (!$this->specialcontent || !$this->useActiveForms)) {
13469 $cnt += $this->SubstituteCharsMB($a, $i, $e);
13473 $e = mb_strtoupper($e, $this->mb_enc);
13475 $e = mb_strtolower($e, $this->mb_enc);
13477 $e = mb_convert_case($e, MB_CASE_TITLE, "UTF-8");
13486 $e = $this->otl->applyOTL($e, $this->CurrentFont['useOTL']);
13488 $this->otl->removeChar($e, $this->OTLdata, "\xef\xbb\xbf"); // Remove ZWNBSP (also Byte order mark FEFF)
13492 $e = preg_replace("/[\xe2\x80\x8c\xe2\x80\x8d\xe2\x80\x8e\xe2\x80\x8f]/u", '', $e);
13493 $e = preg_replace("/[\xef\xbb\xbf]/u", '', $e); // Remove ZWNBSP (also Byte order mark FEFF)
13498 $es = explode('|', $e);
13499 $e = '';
13501 $e .= chr($val);
13510 $e = ltrim($e);
13514 $stringwidth = $this->GetStringWidth($e);
13519 $this->selectoption['SELECTED'] = $e;
13526 $this->selectoption['ITEMS'][] = ['exportValue' => $this->selectoption['currentVAL'], 'content' => $e, 'selected' => $this->selectoption['currentSEL']];
13532 $objattr['text'] = $e;
13548 $e = ltrim($e);
13553 if ($e || $e === '0') {
13567 $this->cell[$this->row][$this->col]['s'] += $this->GetStringWidth($e, false, $this->OTLdata, $this->textvar);
13569 $this->cell[$this->row][$this->col]['s'] = $this->GetStringWidth($e, false, $this->OTLdata, $this->textvar);
13576 $this->_saveCellTextBuffer($e, $this->HREF);
13581 $s = preg_split('/' . preg_quote($dp, '/') . '/', $e, 2); // ? needs to be /u if not core
13614 $e = ltrim($e);
13619 if ($e || $e === '0') {
13620 $this->_saveTextBuffer($e, $this->HREF);
13623 if ($e || $e === '0') {
13626 if (substr($e, -1, 1) == ' ' && !$this->ispre && $this->FontFamily != 'csymbol' && $this->FontFamily != 'czapfdingbats') {
13630 if (isset($e[0]) && $e[0] == '/') {
13631 $endtag = trim(strtoupper(substr($e, 1)));
13645 $this->fixedPosBlock .= '<' . $e . '>';
13657 $this->tag->CloseTag('LI', $a, $i);
13662 $this->tag->CloseTag('DD', $a, $i);
13667 $this->tag->CloseTag('P', $a, $i);
13672 $this->tag->CloseTag('OPTION', $a, $i);
13680 $this->tag->CloseTag($this->lastoptionaltag, $a, $i);
13683 $this->tag->CloseTag('TR', $a, $i);
13686 $this->tag->CloseTag($this->lastoptionaltag, $a, $i);
13687 $this->tag->CloseTag('TR', $a, $i);
13692 $this->tag->CloseTag('TR', $a, $i);
13695 $this->tag->CloseTag($this->lastoptionaltag, $a, $i);
13696 $this->tag->CloseTag('TR', $a, $i);
13701 $this->tag->CloseTag($this->lastoptionaltag, $a, $i);
13718 $this->tag->CloseTag($endtag, $a, $i); // mPDF 6
13721 if (strpos($e, ' ')) {
13722 $te = strtoupper(substr($e, 0, strpos($e, ' ')));
13724 $te = strtoupper($e);
13740 if (strpos($e, ' ')) {
13741 $te = strtoupper(substr($e, 0, strpos($e, ' ')));
13743 $te = strtoupper($e);
13745 $this->fixedPosBlock .= '<' . $e . '>';
13753 $e = preg_replace($regexp, "=\"\$1\"", $e);
13755 if (substr($e, 0, 10) != 'pageheader' && substr($e, 0, 10) != 'pagefooter' && substr($e, 0, 12) != 'tocpagebreak' && substr($e, 0, 10) != 'indexentry' && substr($e, 0, 8) != 'tocentry') { // mPDF 6 (ZZZ99H)
13757 $e = preg_replace($regexp, " \$1=\"\$2\"", $e);
13760 $e = preg_replace('/ (\\S+?)\s*=\s*"/i', " \\1=\"", $e);
13764 if ((stristr($e, "href=") !== false) or ( stristr($e, "src=") !== false)) {
13765 $regexp = '/ (href|src)\s*=\s*"(.*?)"/i';
13766 preg_match($regexp, $e, $auxiliararray);
13772 if (trim($path) != '' && !(stristr($e, "src=") !== false && substr($path, 0, 4) == 'var:') && substr($path, 0, 1) != '@') {
13776 $regexp = '/ (href|src)="(.*?)"/i';
13777 $e = preg_replace($regexp, ' \\1="' . $path . '"', $e);
13787 preg_match_all('/\\S{1,32}=["][^"]*["]/', $e, $contents1);
13788 preg_match_all('/\\S{1,32}=[\'][^\']*[\']/i', $e, $contents2);
13791 preg_match('/\\S+/', $e, $a2);
13804 elseif (preg_match('/^(HEADER|FOOTER)-STYLE/i', $a3[1])) {
13812 $this->tag->OpenTag($tag, $attr, $a, $i); // mPDF 6
13820 if (preg_match('/\/$/', $e)) {
13821 $this->tag->CloseTag($tag, $a, $i);
13825 } // end of foreach($a as $i=>$e)
13830 $this->tag->CloseTag($this->blk[$b]['tag'], $a, $i);
14638 if ($shrink_f != 1) { // i.e. autofit has resized the box
14648 if ($shrink_f != 1) { // i.e. autofit has resized the box
14655 if ($shrink_f != 1) { // i.e. autofit has resized the box
14697 if ($shrink_f != 1) { // i.e. autofit has resized the box
14711 if ($shrink_f != 1) { // i.e. autofit has resized the box
14739 if ($shrink_f != 1) { // i.e. autofit has resized the box
15210 if (preg_match('/cross/i', $p['MARKS']) && preg_match('/crop/i', $p['MARKS'])) {
15346 $e = '';
15458 $e = "\xbb\xa4\xactype=image,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
15459 $this->_saveTextBuffer($e);
15462 $e = $spacer;
15463 $this->_saveTextBuffer($e);
15489 $e = "\xbb\xa4\xactype=listmarker,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
15490 $this->listitem = $this->_saveTextBuffer($e, '', '', true); // true returns array
15492 } elseif (preg_match('/U\+([a-fA-F0-9]+)/i', $listitemtype, $m)) { // SYMBOL 2 (needs new font)
15512 $e = $list_item_marker . $spacer;
15513 $this->_saveTextBuffer($e);
15527 $e = "\xbb\xa4\xactype=listmarker,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
15528 $this->listitem = $this->_saveTextBuffer($e, '', '', true); // true returns array
15544 $e = $num . $this->list_number_suffix . $spacer;
15545 $this->_saveTextBuffer($e);
15548 // REPLACE MIRRORED RTL $this->list_number_suffix e.g. ) -> ( (NB could use Ucdn::$mirror_pairs)
15566 $e = "\xbb\xa4\xactype=listmarker,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
15568 $this->listitem = $this->_saveTextBuffer($e, '', '', true); // true returns array
15574 function _getListMarkerWidth(&$currblk, &$a, &$i)
15584 for ($j = $i + 2; $j < count($a); $j+=2) {
15585 $e = $a[$j];
15586 if (!$e) {
15589 if ($e[0] == '/') { // end tag
15590 $e = strtoupper(substr($e, 1));
15591 if ($e == 'OL' || $e == 'UL') {
15598 if (strpos($e, ' ')) {
15599 $e = substr($e, 0, strpos($e, ' '));
15601 $e = strtoupper($e);
15602 if ($e == 'LI') {
15606 } elseif ($e == 'OL' || $e == 'UL') {
15678 case 'i':
15781 // e.g. Latin script when useOTL set as 0x80
15844 // e.g. Latin script when useOTL set as 0x80
15914 // Block-align is set by e.g. <.. align="center"> Takes priority for this block but not inherited
15957 for ($i = 0; $i < $array_size; $i++) {
15958 if (empty($arrayaux[$i][18])) {
15959 if (substr($arrayaux[$i][0], 0, 3) == "\xbb\xa4\xac") { // object identifier has been identified!
15962 $unicode = $this->UTF8StringToArray($arrayaux[$i][0], false);
15965 $this->getBasicOTLdata($arrayaux[$i][18], $unicode, $is_strong);
15968 if (($blockdir == 'rtl' || $this->biDirectional) && isset($arrayaux[$i][4]) && in_array($arrayaux[$i][4], ['ccourier', 'ctimes', 'chelvetica', 'csymbol', 'czapfdingbats'])) {
15984 for ($i = $array_size - 1; $i > 0; $i--) {
15985 if (empty($arrayaux[$i][0]) && (isset($arrayaux[$i][16]) && $arrayaux[$i][16] !== '0') && empty($arrayaux[$i][7])) {
15986 unset($arrayaux[$i]);
15996 for ($i = 1; $i < $array_size; $i++) {
15997 if (isset($arrayaux[$i][16]) && $arrayaux[$i][16] == $lastspanborder &&
15998 ((!isset($arrayaux[$i][9]['bord-decoration']) && !isset($arrayaux[$i - 1][9]['bord-decoration'])) ||
15999 (isset($arrayaux[$i][9]['bord-decoration']) && isset($arrayaux[$i - 1][9]['bord-decoration']) && $arrayaux[$i][9]['bord-decoration'] == $arrayaux[$i - 1][9]['bord-decoration'])
16002 if (isset($arrayaux[$i][16]['R'])) {
16003 $lastspanborder = $arrayaux[$i][16];
16007 $arrayaux[$i][16]['L']['s'] = 0;
16008 $arrayaux[$i][16]['L']['w'] = 0;
16009 $arrayaux[$i - 1][16]['R']['s'] = 0;
16010 $arrayaux[$i - 1][16]['R']['w'] = 0;
16012 if (isset($arrayaux[$i][16]['R'])) {
16013 $lastspanborder = $arrayaux[$i][16];
16020 for ($i = 0; $i < $array_size; $i++) {
16023 $vetor = isset($arrayaux[$i]) ? $arrayaux[$i] : null;
16024 if ($i == 0 && $vetor[0] != "\n" && ! $this->ispre) {
16034 if ($i == ($array_size - 1)) {
16108 if ($i == ($array_size - 1)) {
16132 if (strpos($vetor[1], ".") === false && strpos($vetor[1], "@") !== 0) { // assuming every external link has a dot indicating extension (e.g: .html .txt .zip www.somewhere.com etc.)
16245 // i.e. if second inline image on line is higher than first and forces new page
16334 $objattr['ID'] = $info['i'];
16501 if ($i == ($array_size - 1)) {
16572 }//end of for(i=0;i<arraysize;i++)
17797 for ($i = 1; $i <= $nSeg; $i++) {
17799 $t1 = ($i * $dt) + $astart;
17804 if ($i > ($nSeg - 4) && (!$part || ($part == 1 && $i <= $nSeg - 2) || ($part == 2 && $i > $nSeg - 2))) {
18088 for ($i = 0; $i < count($aux[0]); $i++) {
18089 $name = ( strtoupper($firstattr[$i]) == "NAME" ) ? strtoupper($aux[2][$i]) : strtoupper($aux[4][$i]);
18090 $content = ( strtoupper($firstattr[$i]) == "CONTENT" ) ? $aux[2][$i] : $aux[4][$i];
18132 // Set font size first so that e.g. MARGIN 0.83em works on font size for this element
18510 case 'VERTICAL-ALIGN': // super and sub only dealt with here e.g. <SUB> and <SUP>
19012 // Set multiple styles at one $str e.g. "BI"
19041 $this->enabledtags = "<a><acronym><address><article><aside><b><bdi><bdo><big><blockquote><br><caption><center><cite><code><del><details><dd><div><dl><dt><em><fieldset><figcaption><figure><font><form><h1><h2><h3><h4><h5><h6><hgroup><hr><i><img><input><ins><kbd><legend><li><main><mark><meter><nav><ol><option><p><pre><progress><q><s><samp><section><select><small><span><strike><strong><sub><summary><sup><table><tbody><td><template><textarea><tfoot><th><thead><time><tr><tt><u><ul><var><footer><header><annotation><bookmark><textcircle><barcode><dottab><indexentry><indexinsert><watermarktext><watermarkimage><tts><ttz><tta><column_break><columnbreak><newcolumn><newpage><page_break><pagebreak><formfeed><columns><toc><tocentry><tocpagebreak><pageheader><pagefooter><setpageheader><setpagefooter><sethtmlpageheader><sethtmlpagefooter>";
19350 for ($i = 0; $i < $table['nr']; $i++) { // rows
19352 $c = &$table['cells'][$i][$j];
19532 // cells List of cells of each rows, cells[i][j] is a cell in the table
19552 for ($i = 0; $i < $nr; $i++) { // rows
19553 if (isset($cs[$i][$j]) && $cs[$i][$j]) {
19554 $c = &$cs[$i][$j];
19720 $listspan[] = [$i, $j];
19756 list($i, $j) = $span;
19757 $c = &$cs[$i][$j];
19834 for ($i = 0; $i < $nc; $i++) {
19835 $checkminwidth += $table['wc'][$i]['miw'];
19836 $checkmaxwidth += $table['wc'][$i]['maw'];
19837 $totallength += isset($table['l']) ? $table['l'][$i] : 0;
19843 for ($i = 0; $i < $nc; $i++) {
19844 if (isset($table['wc'][$i]['wpercent']) && $table['wc'][$i]['wpercent']) {
19845 $sumpc += $table['wc'][$i]['wpercent'];
19854 for ($i = 0; $i < $nc; $i++) {
19855 if ((!isset($table['wc'][$i]['wpercent']) || !$table['wc'][$i]['wpercent']) &&
19856 (!isset($table['wc'][$i]['w']) || !$table['wc'][$i]['w'])) {
19857 $table['wc'][$i]['wpercent'] = 1;
19876 for ($i = 0; $i < $nc; $i++) {
19877 if (isset($table['wc'][$i]['wpercent'])) {
19878 $maxcalcmiw = max($maxcalcmiw, ($table['wc'][$i]['miw'] * $sumpc / $table['wc'][$i]['wpercent']));
19879 $maxcalcmaw = max($maxcalcmaw, ($table['wc'][$i]['maw'] * $sumpc / $table['wc'][$i]['wpercent']));
19881 $miwleft += $table['wc'][$i]['miw'];
19882 $mawleft += $table['wc'][$i]['maw'];
19883 if (!isset($table['wc'][$i]['w'])) {
19902 for ($i = 0; $i < $nc; $i++) {
19903 if (isset($table['wc'][$i]['wpercent'])) {
19904 $newmiw = $checkminwidth * $table['wc'][$i]['wpercent'] / 100;
19905 if ($table['wc'][$i]['miw'] < $newmiw) {
19906 $table['wc'][$i]['miw'] = $newmiw;
19908 $table['wc'][$i]['w'] = 1;
19909 } elseif ($miwsurplusnonpc && !$table['wc'][$i]['w']) {
19910 $table['wc'][$i]['miw'] += $miwsurplusnonpc / $miwleftcount;
19921 for ($i = 0; $i < $nc; $i++) {
19922 if (isset($table['wc'][$i]['wpercent'])) {
19923 $newmaw = $checkmaxwidth * $table['wc'][$i]['wpercent'] / 100;
19924 if ($table['wc'][$i]['maw'] < $newmaw) {
19925 $table['wc'][$i]['maw'] = $newmaw;
19927 $table['wc'][$i]['w'] = 1;
19928 } elseif ($mawsurplusnonpc && !$table['wc'][$i]['w']) {
19929 $table['wc'][$i]['maw'] += $mawsurplusnonpc / $mawleftcount;
19931 if ($table['wc'][$i]['maw'] < $table['wc'][$i]['miw']) {
19932 $table['wc'][$i]['maw'] = $table['wc'][$i]['miw'];
20027 // If it is less than 1/20th of the remaining page height to finish the DIV (i.e. DIV padding + table bottom margin) then allow for this
20054 for ($i = 0; $i < $numcols; $i++) {
20055 if (isset($widthcols[$i]['wpercent'])) {
20056 $tablewidth += $widthcols[$i]['maw'];
20058 } elseif (isset($widthcols[$i]['w'])) {
20059 $tablewidth += $widthcols[$i]['miw'];
20061 $tablewidth += $widthcols[$i]['maw'];
20063 $totaltextlength += isset($table['l']) ? $table['l'][$i] : 0;
20085 // If the table width is already set to the maximum width (e.g. nested table), then use maximum column widths exactly
20089 for ($i = 0; $i < $numcols; $i++) {
20090 $widthcols[$i] = $widthcols[$i]['maw'];
20099 for ($i = 0; $i < $numcols; $i++) {
20100 $wis += $widthcols[$i]['miw'];
20101 if (!isset($widthcols[$i]['w']) || ($widthcols[$i]['w'] && $table['w'] > $temppgwidth && !$this->keep_table_proportions && !$notfullwidth )) {
20102 $list[] = $i;
20103 $wisa += $widthcols[$i]['miw'];
20104 $totalatextlength += $table['l'][$i];
20134 $wi = ($table['w'] - ($wis + $tblbw)); // i.e. extra space to distribute
20153 $wi = ($table['w'] - ($wis + $tblbw)); // i.e. extra space to distribute
20175 foreach ($notsetlist as $i) {
20177 $widthcols[$i]['miw'] += $surplus * $table['l'][$i] / $ttl;
20181 foreach ($list as $i) {
20182 $widthcols[$i]['miw'] += $surplus / count($list);
20187 for ($i = 0; $i < $numcols; $i++) {
20188 $widthcols[$i]['miw'] += $surplus * $table['l'][$i] / $ttl;
20196 for ($i = 0; $i < $numcols; $i++) {
20197 $widthcols[$i] = $widthcols[$i]['miw'];
20203 for ($i = 0; $i < $numcols; $i++) {
20204 $checktablewidth += $widthcols[$i];
20212 for ($i = 0; $i < $numcols; $i++) {
20213 if ((isset($widthcols[$i]) && $widthcols[$i] > (($temppgwidth - $tblbw) / $numcols)) && (!isset($widthcols[$i]['w']))) {
20215 unset($widthcols[$i]);
20217 $usedup += $widthcols[$i];
20221 for ($i = 0; $i < $numcols; $i++) {
20222 if (!isset($widthcols[$i]) || !$widthcols[$i]) {
20223 $widthcols[$i] = ((($temppgwidth - $tblbw) - $usedup) / ($numleft));
20232 for ($i = 0; $i < $numcols; $i++) {
20234 if (isset($widthcols[$i]['wpercent']) && $this->keep_table_proportions) {
20235 $colwidth = $widthcols[$i]['maw'];
20236 } elseif (isset($widthcols[$i]['w'])) {
20237 $colwidth = $widthcols[$i]['miw'];
20239 $colwidth = $widthcols[$i]['maw'];
20242 unset($widthcols[$i]);
20243 $widthcols[$i] = $colwidth;
20254 for ($i = 0; $i < $table['nr']; $i++) { // rows
20256 if (isset($table['cells'][$i][$j]) && $table['cells'][$i][$j]) {
20258 $colspan = (isset($table['cells'][$i][$j]['colspan']) ? $table['cells'][$i][$j]['colspan'] : 1);
20284 for ($i = 0; $i < $numcols; $i++) { // columns
20286 if (isset($table['csp'][$i])) {
20287 $w = $table['csp'][$i];
20288 unset($table['csp'][$i]);
20290 $w = $widthcols[$i];
20295 $currWc = $widthcols[$i];
20297 $currWc += $widthcols[$i];
20300 $table['colPg'][$i] = $pgNo;
20328 // If it is less than 1/20th of the remaining page height to finish the DIV (i.e. DIV padding + table bottom margin)
20349 for ($i = 0; $i < $numrows; $i++) { // rows
20350 $heightrow = &$table['hr'][$i];
20352 if (isset($cells[$i][$j]) && $cells[$i][$j]) {
20353 $c = &$cells[$i][$j];
20382 list($x, $cw) = $this->_splitTableGetWidth($table, $i, $j);
20384 list($x, $cw) = $this->_tableGetWidth($table, $i, $j);
20428 $listspan[] = [$i, $j];
20435 if ($i == ($numrows - 1) || (isset($c['rowspan']) && ($i + $c['rowspan']) == ($numrows))) {
20447 if (isset($table['is_thead'][$i]) && $table['is_thead'][$i]) {
20452 } elseif (isset($table['is_tfoot'][$i]) && $table['is_tfoot'][$i]) {
20461 if ($this->tableLevel == 1 && $i == (isset($table['headernrows']) ? $table['headernrows'] : 0)) {
20471 list($i, $j) = $span;
20472 $c = &$cells[$i][$j];
20473 $lr = $i + $c['rowspan'];
20479 for ($k = $i; $k < $lr; $k++) {
20499 if ($i == ($numrows - 1) || ($i + $c['rowspan']) == ($numrows)) {
20516 if (!empty($table['is_thead'][$i])) {
20519 } elseif (!empty($table['is_tfoot'][$i])) {
20526 if ($this->tableLevel == 1 && $i == (isset($table['headernrows']) ? $table['headernrows'] : 0)) {
20532 for ($k = $i; $k < $lr; $k++) {
20537 for ($k = $i; $k < $lr; $k++) {
20550 // i.e. for one or more rows, the only cells (explicit) in that row have rowspan>1
20552 if ($heightrow[$i] == 0) {
20554 $top = $i;
20559 if (($cki + $c['rowspan'] - 1) >= $i) {
20564 $bottom = $i + $c['rowspan'] - 1;
20568 if ($k != $i && $heightrow[$k] == 0) {
20616 $newhr[$i] = $extH - array_sum($newhr);
20640 function _tableGetWidth(&$table, $i, $j)
20642 $cell = &$table['cells'][$i][$j];
20665 function _splitTableGetWidth(&$table, $i, $j)
20667 $cell = &$table['cells'][$i][$j];
20695 function _tableGetHeight(&$table, $i, $j)
20697 $cell = &$table['cells'][$i][$j];
20704 for ($k = 0; $k < $i; $k++) {
20707 $h = $heightrow[$i];
20709 for ($k = $i + $cell['rowspan'] - 1; $k > $i; $k--) {
20730 for ($i = $row + 1; $i < $table['nr']; $i++) {
20733 if ($table['cells'][$i][$j]) {
20734 if (isset($table['cells'][$i][$j]['colspan'])) {
20735 $cellsset += $table['cells'][$i][$j]['colspan'];
20744 $maxrowheight += $table['hr'][$i];
21342 for ($i = 0; $i < $numrows; $i++) { // Rows
21344 if (isset($cells[$i][$j]) && $cells[$i][$j]) {
21345 $cell = &$cells[$i][$j];
21349 $cbord = &$cells[$i][$j];
21369 $cbord['border_details']['cellposdom'] = ((($i + 1) / $numrows) / 10000 ) + ((($j + 1) / $numcols) / 10 );
21372 if ($i == 0) {
21375 if ($i == ($numrows - 1) || ($i + $crowsp) == ($numrows)) {
21389 if ($i == 0) {
21393 if ($this->tableLevel == 1 && $table['headernrows'] > 0 && $i == $table['headernrows'] - 1) {
21397 } elseif ($this->tableLevel == 1 && $table['headernrows'] > 0 && $i == $table['headernrows']) {
21403 if ($this->tableLevel == 1 && $table['footernrows'] > 0 && $i == ($numrows - $table['footernrows'] - 1)) {
21409 } elseif ($this->tableLevel == 1 && $table['footernrows'] > 0 && $i == ($numrows - $table['footernrows'])) {
21419 if ($i == ($numrows - 1) || ($i + $crowsp) == ($numrows)) {
21426 if ($i == 0) {
21432 if ($this->tableLevel == 1 && $table['headernrows'] > 0 && $i == $table['headernrows'] - 1) {
21449 if (($i < ($numrows - 1) || ($i + $crowsp) < $numrows ) && $fixbottom) { // Bottom
21454 if (isset($cells[($i + $crowsp)][$j + $cspi])) {
21456 $adjc = $cells[($i + $crowsp)][$j + $cspi];
21459 $celladj = & $cells[($i + $crowsp)][$j + $cspi];
21485 if (!isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) || (isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) && $cells[($i + $crowsp)][$j + $cspi]['colspan'] < 2)) { // don't overwrite bordering cells that span
21499 if (!isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) || (isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) && $cells[($i + $crowsp)][$j + $cspi]['colspan'] < 2)) { // don't overwrite bordering cells that span
21520 if (!isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) || (isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) && $cells[($i + $crowsp)][$j + $cspi]['colspan'] < 2)) { // don't overwrite bordering cells that span
21529 if (!isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) || (isset($cells[($i + $crowsp)][$j + $cspi]['colspan']) && $cells[($i + $crowsp)][$j + $cspi]['colspan'] < 2)) { // don't overwrite bordering cells that span
21537 $cells[$i + $crowsp][$j + $cspi]['borderbin'] = $this->_packCellBorder($celladj);
21549 if (isset($cells[($i + $cspi)][$j + $ccolsp])) {
21551 $adjc = $cells[($i + $cspi)][$j + $ccolsp];
21554 $celladj = & $cells[$i + $cspi][$j + $ccolsp];
21573 if (!isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) || (isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) && $cells[($i + $cspi)][$j + $ccolsp]['rowspan'] < 2)) { // don't overwrite bordering cells that span
21586 if (!isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) || (isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) && $cells[($i + $cspi)][$j + $ccolsp]['rowspan'] < 2)) { // don't overwrite bordering cells that span
21605 if (!isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) || (isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) && $cells[($i + $cspi)][$j + $ccolsp]['rowspan'] < 2)) { // don't overwrite bordering cells that span
21612 if (!isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) || (isset($cells[($i + $cspi)][$j + $ccolsp]['rowspan']) && $cells[($i + $cspi)][$j + $ccolsp]['rowspan'] < 2)) { // don't overwrite bordering cells that span
21618 $cells[$i + $cspi][$j + $ccolsp]['borderbin'] = $this->_packCellBorder($celladj);
21639 if (($i + $crowsp) < $numrows && isset($cells[$i + $crowsp][$j])) { // Has Bottom adjoining cell
21642 $adjc = $cells[$i + $crowsp][$j];
21645 $celladj = & $cells[$i + $crowsp][$j];
21673 if (($j + $ccolsp) < $numcols && isset($cells[$i][$j + $ccolsp])) { // Has Right adjoining cell
21676 $adjc = $cells[$i][$j + $ccolsp];
21679 $celladj = & $cells[$i][$j + $ccolsp];
21707 if ($i > 0 && isset($cells[$i - 1][$j]) && is_array($cells[$i - 1][$j]) && (($this->packTableData && $cells[$i - 1][$j]['borderbin']) || $cells[$i - 1][$j]['border'])) { // Has Top adjoining cell
21710 $adjc = $cells[$i - 1][$j];
21713 $celladj = & $cells[$i - 1][$j];
21747 $cells[$i - 1][$j]['borderbin'] = $this->_packCellBorder($celladj);
21752 if ($j > 0 && isset($cells[$i][$j - 1]) && is_array($cells[$i][$j - 1]) && (($this->packTableData && $cells[$i][$j - 1]['borderbin']) || $cells[$i][$j - 1]['border'])) { // Has Left adjoining cell
21755 $adjc = $cells[$i][$j - 1];
21758 $celladj = & $cells[$i][$j - 1];
21792 $cells[$i][$j - 1]['borderbin'] = $this->_packCellBorder($celladj);
21806 if ($i == 0 && $cbord['border_details']['T']['w']) {
21809 if (($i == ($numrows - 1) || ($i + $crowsp) == $numrows ) && $cbord['border_details']['B']['w']) {
21835 for ($i = 0; $i < $numrows; $i++) { // Rows
21838 if (isset($cells[$i][$j]) && $cells[$i][$j]) {
21839 $cell = &$cells[$i][$j];
21856 $row[$col] = $cells[$i][$j];
21865 $table['cells'][$i] = $row;
21992 for ($i = 0; $i < $numrows; $i++) { // Rows
21993 if (isset($table['is_tfoot'][$i]) && $table['is_tfoot'][$i] && $level == 1) {
21994 $tablefooterrowheight += $table['hr'][$i];
21995 $tablefooter[$i][0]['trbackground-images'] = $table['trbackground-images'][$i];
21996 $tablefooter[$i][0]['trgradients'] = $table['trgradients'][$i];
21997 $tablefooter[$i][0]['trbgcolor'] = $table['bgcolor'][$i];
21999 if (isset($cells[$i][$j]) && $cells[$i][$j]) {
22000 $cell = &$cells[$i][$j];
22005 list($x, $w) = $this->_splitTableGetWidth($table, $i, $j);
22008 list($x, $w) = $this->_tableGetWidth($table, $i, $j);
22012 list($y, $h) = $this->_tableGetHeight($table, $i, $j);
22016 $tablefooter[$i][$js]['x'] = $x;
22017 $tablefooter[$i][$js]['y'] = $y;
22018 $tablefooter[$i][$js]['h'] = $h;
22019 $tablefooter[$i][$js]['w'] = $w;
22021 $tablefooter[$i][$js]['textbuffer'] = $cell['textbuffer'];
22023 $tablefooter[$i][$js]['textbuffer'] = '';
22025 $tablefooter[$i][$js]['a'] = $cell['a'];
22026 $tablefooter[$i][$js]['R'] = $cell['R'];
22027 $tablefooter[$i][$js]['va'] = $cell['va'];
22028 $tablefooter[$i][$js]['mih'] = $cell['mih'];
22030 $tablefooter[$i][$js]['gradient'] = $cell['gradient']; // *BACKGROUNDS*
22033 $tablefooter[$i][$js]['background-image'] = $cell['background-image']; // *BACKGROUNDS*
22040 $tablefooter[$i][$js]['border'] = $c['border'];
22041 $tablefooter[$i][$js]['border_details'] = $c['border_details'];
22043 $tablefooter[$i][$js]['border'] = $cell['border'];
22044 $tablefooter[$i][$js]['border_details'] = $cell['border_details'];
22047 $tablefooter[$i][$js]['border'] = $table['simple']['border'];
22048 $tablefooter[$i][$js]['border_details'] = $table['simple']['border_details'];
22050 $tablefooter[$i][$js]['bgcolor'] = $cell['bgcolor'];
22051 $tablefooter[$i][$js]['padding'] = $cell['padding'];
22053 $tablefooter[$i][$js]['rowspan'] = $cell['rowspan'];
22056 $tablefooter[$i][$js]['colspan'] = $cell['colspan'];
22059 $tablefooter[$i][$js]['direction'] = $cell['direction'];
22062 $tablefooter[$i][$js]['cellLineHeight'] = $cell['cellLineHeight'];
22065 $tablefooter[$i][$js]['cellLineStackingStrategy'] = $cell['cellLineStackingStrategy'];
22068 $tablefooter[$i][$js]['cellLineStackingShift'] = $cell['cellLineStackingShift'];
22084 for ($i = 0; $i < $numrows; $i++) { // Rows
22087 if ($i >= $thnr && $i < $startrow) {
22090 if ($i == $startrow) {
22096 $maxrowheight = $this->_tableGetMaxRowHeight($table, $i);
22107 if (isset($cells[$i][$j]) && $cells[$i][$j]) {
22108 $cell = &$cells[$i][$j];
22111 list($x, $w) = $this->_splitTableGetWidth($table, $i, $j);
22113 list($x, $w) = $this->_tableGetWidth($table, $i, $j);
22116 list($y, $h) = $this->_tableGetHeight($table, $i, $j);
22122 if (!empty($tablefooter) || $i == ($numrows - 1) || (isset($cell['rowspan']) && ($i + $cell['rowspan']) == $numrows) || (!isset($cell['rowspan']) && ($i + 1) == $numrows)) {
22132 if ($j == $startcol && ((($y + $maxrowheight + $extra ) > ($pagetrigger + 0.001)) || (($this->keepColumns || !$this->ColActive) && !empty($tablefooter) && ($y + $maxrowheight + $tablefooterrowheight + $extra) > $pagetrigger) && ($this->tableLevel == 1 && $i < ($numrows - $table['headernrows']))) && ($y0 > 0 || $x0 > 0) && !$this->InFooter && $this->autoPageBreak) {
22149 if (($this->keepColumns || !$this->ColActive) && !empty($tablefooter) && $i > 0) {
22168 if ($i > 0 && !$this->table_rotate && $level == 1 && !$this->ColActive) {
22172 if (($this->keepColumns || !$this->ColActive) && !empty($tablefooter) && $i > 0) {
22182 $brow = $i - 1;
22197 $trow = $i - 1;
22219 if ($i > 0 && $this->table_rotate && $level == 1) {
22274 if ($this->splitTableBorderWidth && ($this->keepColumns || !$this->ColActive) && empty($tablefooter) && $i > 0 && $table['border_details']['B']['w']) {
22295 if (!$this->ColActive && ($i > 0 || $j > 0)) {
22351 if ($i == 0 && $j == 0) {
22356 $startrow = $i;
22378 if ($this->splitTableBorderWidth && ($this->keepColumns || !$this->ColActive) && empty($tableheader) && $i > 0 && $table['border_details']['T']['w']) {
22396 if ($i > 0 && !$this->table_rotate && $level == 1 && $table['headernrows'] == 0) {
22402 if (isset($cells[$i][$ctj]) && $cells[$i][$ctj]) {
22405 list($bt, $br, $bb, $bl) = $this->_getBorderWidths($cells[$i][$ctj]['borderbin']);
22407 $bt = $cells[$i][$ctj]['border_details']['T']['w'];
22446 } elseif ($i == 0 && !$this->table_rotate && $level == 1 && !$this->ColActive) {
22480 if ($this->CurrCol != 0 && ($this->keepColumns && $this->ColActive) && !empty($tableheader) && $i > 0) {
22505 if ($i == 0 && $j == 0 && $level == 1) {
22531 if ((!isset($cell['rowspan']) && $i == $numrows - 1) || (isset($cell['rowspan']) && (($i == $numrows - 1 && $cell['rowspan'] < 2) || ($cell['rowspan'] > 1 && ($i + $cell['rowspan'] - 1) == $numrows - 1)))) {
22573 if ($i == 0) { // Top
22581 if ($i == ($numrows - 1) || (isset($cell['rowspan']) && ($i + $cell['rowspan']) == $numrows) || (!isset($cell['rowspan']) && ($i + 1) == $numrows)) { // Bottom
22624 } elseif (isset($table['bgcolor'][$i]) && $table['bgcolor'][$i] && $table['bgcolor'][$i] != 'transparent') { // Row color
22625 $fill = $table['bgcolor'][$i];
22761 if (isset($table['is_thead'][$i]) && $table['is_thead'][$i] && $level == 1) {
22763 $tableheaderrowheight += $table['hr'][$i];
22765 $tableheader[$i][0]['trbackground-images'] = (isset($table['trbackground-images'][$i]) ? $table['trbackground-images'][$i] : null);
22766 $tableheader[$i][0]['trgradients'] = (isset($table['trgradients'][$i]) ? $table['trgradients'][$i] : null);
22767 $tableheader[$i][0]['trbgcolor'] = (isset($table['bgcolor'][$i]) ? $table['bgcolor'][$i] : null);
22768 $tableheader[$i][$j]['x'] = $x;
22769 $tableheader[$i][$j]['y'] = $y;
22770 $tableheader[$i][$j]['h'] = $h;
22771 $tableheader[$i][$j]['w'] = $w;
22773 $tableheader[$i][$j]['textbuffer'] = $cell['textbuffer'];
22775 $tableheader[$i][$j]['textbuffer'] = '';
22777 $tableheader[$i][$j]['a'] = $cell['a'];
22778 $tableheader[$i][$j]['R'] = $cell['R'];
22780 $tableheader[$i][$j]['va'] = $cell['va'];
22781 $tableheader[$i][$j]['mih'] = $cell['mih'];
22782 $tableheader[$i][$j]['gradient'] = (isset($cell['gradient']) ? $cell['gradient'] : null); // *BACKGROUNDS*
22783 $tableheader[$i][$j]['background-image'] = (isset($cell['background-image']) ? $cell['background-image'] : null); // *BACKGROUNDS*
22784 $tableheader[$i][$j]['rowspan'] = (isset($cell['rowspan']) ? $cell['rowspan'] : null);
22785 $tableheader[$i][$j]['colspan'] = (isset($cell['colspan']) ? $cell['colspan'] : null);
22786 $tableheader[$i][$j]['bgcolor'] = $cell['bgcolor'];
22789 $tableheader[$i][$j]['border'] = $bord;
22790 $tableheader[$i][$j]['border_details'] = $bord_det;
22792 $tableheader[$i][$j]['border'] = $table['simple']['border'];
22793 $tableheader[$i][$j]['border_details'] = $table['simple']['border_details'];
22795 $tableheader[$i][$j]['padding'] = $cell['padding'];
22797 $tableheader[$i][$j]['direction'] = $cell['direction'];
22800 $tableheader[$i][$j]['cellLineHeight'] = $cell['cellLineHeight'];
22803 $tableheader[$i][$j]['cellLineStackingStrategy'] = $cell['cellLineStackingStrategy'];
22806 $tableheader[$i][$j]['cellLineStackingShift'] = $cell['cellLineStackingShift'];
22839 if (isset($table['is_tfoot'][$i]) && $table['is_tfoot'][$i]) {
22844 } elseif (!isset($table['is_thead'][$i])) {
22997 if (isset($table['trgradients'][$i]) && ($j == 0 || $table['borders_separate'])) {
22998 $g = $this->gradient->parseBackgroundGradient($table['trgradients'][$i]);
23018 if (isset($table['trbackground-images'][$i]) && ($j == 0 || $table['borders_separate'])) {
23019 if (isset($table['trbackground-images'][$i]['gradient']) && preg_match('/(-moz-)*(repeating-)*(linear|radial)-gradient/', $table['trbackground-images'][$i]['gradient'])) {
23020 $g = $this->gradient->parseMozGradient($table['trbackground-images'][$i]['gradient']);
23040 $image_id = $table['trbackground-images'][$i]['image_id'];
23041 $orig_w = $table['trbackground-images'][$i]['orig_w'];
23042 $orig_h = $table['trbackground-images'][$i]['orig_h'];
23043 $x_pos = $table['trbackground-images'][$i]['x_pos'];
23044 $y_pos = $table['trbackground-images'][$i]['y_pos'];
23045 $x_repeat = $table['trbackground-images'][$i]['x_repeat'];
23046 $y_repeat = $table['trbackground-images'][$i]['y_repeat'];
23047 $resize = $table['trbackground-images'][$i]['resize'];
23048 $opacity = $table['trbackground-images'][$i]['opacity'];
23049 $itype = $table['trbackground-images'][$i]['itype'];
23086 if ($i == 0) { // Top
23092 if ($i == ($numrows - 1) || (isset($cell['rowspan']) && ($i + $cell['rowspan']) == $numrows)) { // Bottom
23122 if (!$this->table_keep_together && $i < $numrows - 1 && $level == 1) {
23131 if ($i == $numrows - 1) {
23309 for ($i = 1; $i <= count($this->extgstates); $i++) {
23311 $this->extgstates[$i]['n'] = $this->n;
23313 foreach ($this->extgstates[$i]['parms'] as $k => $v) {
23342 // else y is used as set, or =0 i.e. top of page
23559 for ($i = $start_page; $i <= $end_page; $i++) {
23560 $last[] = $this->pages[$i];
23563 for ($i = $start_page - 1; $i >= ($target_page); $i--) {
23564 $this->pages[$i + $n_toc] = $this->pages[$i];
23567 for ($i = 0; $i < $n_toc; $i++) {
23568 $this->pages[$target_page + $i] = $last[$i];
23573 foreach ($this->BMoutlines as $i => $o) {
23575 $this->BMoutlines[$i]['p'] += $n_toc;
23583 foreach ($this->PageLinks as $i => $o) {
23584 foreach ($this->PageLinks[$i] as $key => $pl) {
23588 $this->PageLinks[$i][$key][4] = '@' . ($p + ($target_page - $start_page));
23590 $this->PageLinks[$i][$key][4] = '@' . ($p + $n_toc);
23594 if ($i >= $start_page && $i <= $end_page) {
23595 $newarr[($i + ($target_page - $start_page))] = $this->PageLinks[$i];
23596 } elseif ($i >= $target_page && $i < $start_page) {
23597 $newarr[($i + $n_toc)] = $this->PageLinks[$i];
23599 $newarr[$i] = $this->PageLinks[$i];
23781 for ($i = 0; $i < $n_atend; $i++) {
23782 $this->pages[$start_page + $i] = $this->pages[$end_page + 1 + $i];
23785 for ($i = 0; $i < $n_tod; $i++) {
23786 unset($this->pages[$last_page - $i]);
23792 foreach ($this->BMoutlines as $i => $o) {
23794 $this->BMoutlines[$i]['p'] -= $n_tod;
23796 unset($this->BMoutlines[$i]);
23804 foreach ($this->PageLinks as $i => $o) {
23805 foreach ($this->PageLinks[$i] as $key => $pl) {
23809 $this->PageLinks[$i][$key][4] = '@' . ($p - $n_tod);
23811 unset($this->PageLinks[$i][$key]);
23815 if ($i > $end_page) {
23816 $newarr[($i - $n_tod)] = $this->PageLinks[$i];
23818 $newarr[$i] = $this->PageLinks[$i];
23953 for ($i = 0; $i < $size; $i++) {
23954 if (isset($this->kwt_Reference[$i]['t']) && $this->kwt_Reference[$i]['t'] == $txt) {
23956 if ($this->page != $this->kwt_Reference[$i]['op']) {
23957 $this->kwt_Reference[$i]['op'] = $this->page;
23966 for ($i = 0; $i < $size; $i++) {
23967 if (isset($this->Reference[$i]['t']) && $this->Reference[$i]['t'] == $txt) {
23969 if (!in_array($this->page, $this->Reference[$i]['p'])) {
23970 $this->Reference[$i]['p'][] = $this->page;
24026 // e.g. "elephant 73, 97-99" = elephant[$spacer]73[$sep]97[$joiner]99
24027 // $subEntrySeparator separates main and subentry (if $this->indexUseSubentries == false;) e.g.
24029 // $subEntryInset specifies what precedes a subentry (if $this->indexUseSubentries == true;) e.g.
24044 for ($i = 0; $i < $size; $i++) {
24045 $txt = $this->Reference[$i]['t'];
24048 $this->Reference[$i]['uf'] = $txt; // Unformatted e.g. pure utf-8 encoded characters, no mark-up/tags
24060 for ($i = 0; $i < $size; $i++) {
24061 if ($this->Reference[$i]['uf']) {
24062 $l = mb_substr($this->Reference[$i]['uf'], 0, 1, 'UTF-8');
24067 $this->Reference[$i]['d'] = UtfString::code2utf($collation[$ucode]);
24069 $this->Reference[$i]['d'] = mb_strtolower($l, 'UTF-8');
24072 $this->Reference[$i]['d'] = mb_strtolower($l, 'UTF-8');
24097 for ($i = 0; $i < $size; $i++) {
24098 if ($this->Reference[$i]['t']) {
24100 $lett = $this->Reference[$i]['d'];
24105 $txt = $this->Reference[$i]['t'];
24107 // Sub-entries e.g. Mammals:elephant
24108 // But allow for tags e.g. <b>Mammal</b>:elephants
24112 foreach ($a as $k => $e) {
24114 if (strpos($e, ':') !== false) { // == SubEntry
24118 list($txtmain, $sub) = preg_split('/[:]/', $e, 2);
24125 $e = $sub; // Only replace first one
24127 $e = preg_replace('/[:]/', $subEntrySeparator, $e, 1); // Only replace first one
24132 $txt .= $e;
24141 $ppp = $this->Reference[$i]['p']; // = array of page numbers to point to
24351 for ($i = 0; $i < $this->NbCol; $i++) {
24352 $this->ColL[$i] = $absL + ($gap / 2) + (($NbCol - ($i + 1)) * ($PageWidth / $NbCol));
24353 $this->ColR[$i] = $this->ColL[$i] + $ColWidth; // NB This is not R margin -> R pos
24357 for ($i = 0; $i < $this->NbCol; $i++) {
24358 $this->ColL[$i] = $absL + ($gap / 2) + ($i * ($PageWidth / $NbCol) );
24359 $this->ColR[$i] = $this->ColL[$i] + $ColWidth; // NB This is not R margin -> R pos
24432 for ($i = 1; $i < $this->NbCol; $i++) {
24433 if (isset($this->ColDetails[$i]['bottom_margin']) && $this->ColDetails[$i]['bottom_margin']) { // If any entries in the column
24434 $this->ColDetails[$i]['add_y'] = ($this->ColDetails[$i - 1]['bottom_margin'] - $this->y0) + $this->ColDetails[$i - 1]['add_y'];
24435 $last_col = $i; // Last column actually printed
24483 for ($i = 1; $i < $this->NbCol; $i++) {
24484 $th = ($sum_h * $i / $this->NbCol);
24488 $cbr[$i - 1] = $val;
24490 $cbr[$i - 1] = $breaks[$bk - 1];
24501 for ($i = 0; $i < $this->NbCol - 1; $i++) {
24502 $cbr[$i] = $cbr[$i + 1];
24732 // otherwise triggers for all entries in column buffer (.e.g. formatting) and makes below adjustments more than once
25176 for ($i = 0; $i < count($this->Reference); $i++) {
25177 if ($this->Reference[$i]['t'] == $v['t']) {
25179 if (!in_array($v['op'], $this->Reference[$i]['p'])) {
25180 $this->Reference[$i]['p'][] = $v['op'];
25280 for ($i = 0; $i < count($this->Reference); $i++) {
25281 if ($this->Reference[$i]['t'] == $v['t']) {
25283 if (!in_array($this->page, $this->Reference[$i]['p'])) {
25284 $this->Reference[$i]['p'][] = $this->page;
25509 // PDF comes before PDI to close isolate-override (e.g. "LRILROPDFPDI")
25520 // LRI comes before LRO to open isolate-override (e.g. "LRILROPDFPDI")
25560 foreach ($a as $i => $e) {
25561 if ($i % 2 == 0) {
25562 $e = strtr($e, $this->substitute);
25564 $html .= $e;
25905 array_splice($writehtml_a, $writehtml_i + 1, 0, [$font, implode('|', $repl), '/' . $font, $m[3]]); // e.g. <tts>
26023 * Only exception - leaves low ASCII entities e.g. &lt; &amp; etc.
26732 foreach ($a as $i => $e) {
26733 if ($i % 2 == 0) {
26736 if ($i > 0 && strtolower(substr($a[$i - 1], 1, 8)) == 'textarea') {
26737 $a[$i] = $e;
26741 $e = UtfString::strcode2utf($e);
26742 $e = $this->lesser_entity_decode($e);
26744 $earr = $this->UTF8StringToArray($e, false);
26835 $a[$i] = $o;
26837 $a[$i] = '<' . $e . '>';
26850 function columnAdjustAdd($type, $k, $xadj, $yadj, $a, $b, $c = 0, $d = 0, $e = 0, $f = 0)
26878 return sprintf('q %.3F 0 0 %.3F %.3F %.3F', $a, $b, $c, $d) . ' cm /' . $e;
26893 $e += ($xadj * $k);
26896 return sprintf('%.3F %.3F %.3F %.3F %.3F %.3F', $a, $b, $c, $d, $e, $f) . ' c';
26905 if (preg_match('/([\-]*[0-9\.]+)(deg|grad|rad)/i', $s, $m)) {
26971 for ($i = 0; $i < count($m[1]); $i++) {
26972 $sub = preg_replace("/\n/si", "\xbb\xa4\xac", $m[1][$i]);
26973 $html = preg_replace('/' . preg_quote($m[1][$i], '/') . '/si', $sub, $html);
26979 for ($i = 0; $i < count($svgi[0]); $i++) {
26980 $file = $this->cache->write('/_tempSVG' . uniqid(random_int(1, 100000), true) . '_' . $i . '.svg', $svgi[0][$i]);
26981 $html = str_replace($svgi[0][$i], '<img src="' . $file . '" />', $html);
26989 $html = preg_replace('/<!--mpdf/i', '', $html);
26990 $html = preg_replace('/mpdf-->/i', '', $html);
26999 $html = preg_replace('/<(br|hr)>/i', "<\\1 />", $html); // mPDF 6
27000 $html = preg_replace('/<(br|hr)\/>/i', "<\\1 />", $html);
27003 $html = preg_replace('/<tr>\s*<\/tr>/i', '', $html);
27004 $html = preg_replace('/<thead>\s*<\/thead>/i', '', $html);
27005 $html = preg_replace('/<tfoot>\s*<\/tfoot>/i', '', $html);
27006 $html = preg_replace('/<table[^>]*>\s*<\/table>/i', '', $html);
27030 if ($c > 1 && preg_match('/^<\/pre/i', $s)) {
27032 $s = preg_replace('/<\/pre/i', '</innerpre', $s);
27033 } elseif ($c > 0 && preg_match('/^<pre/i', $s)) {
27035 $s = preg_replace('/<pre/i', '<innerpre', $s);
27036 } elseif (preg_match('/^<pre/i', $s)) {
27038 } elseif (preg_match('/^<\/pre/i', $s)) {
27055 $html = preg_replace('/<([^!\/a-zA-Z_:])/i', '&lt;\\1', $html); // mPDF 5.7.3
27058 $html = preg_replace('/\/li>\s+<\/(u|o)l/i', '/li></\\1l', $html);
27059 $html = preg_replace('/\/(u|o)l>\s+<\/li/i', '/\\1l></li', $html);
27060 $html = preg_replace('/\/li>\s+<\/(u|o)l/i', '/li></\\1l', $html);
27061 $html = preg_replace('/\/li>\s+<li/i', '/li><li', $html);
27062 $html = preg_replace('/<(u|o)l([^>]*)>[ ]+/i', '<\\1l\\2>', $html);
27063 $html = preg_replace('/[ ]+<(u|o)l/i', '<\\1l', $html);
27071 $html = preg_replace('/(<(' . $selftabs . '|' . $selftabs2 . ')[^>\/]*)>/i', '\\1 />', $html);
27074 $html = preg_replace('/(<(' . $selftabs . '|' . $selftabs2 . '))\/>/i', '\\1 />', $html);
27114 $html = preg_replace("/(&#[x]{0,1}[0-9a-f]{1,5})</i", "\\1;<", $html);
27164 for ($i = 0; $i < count($x[0]); $i++) {
27165 $xref[] = [intval($x[1][$i]), $x[2][$i], $x[3][$i]];