Lines Matching defs:s

1365 			if ($mode == 's') {
1372 } elseif (substr($mode, -2) == '-s') {
1465 throw new \Mpdf\MpdfException(sprintf('Unable to read default CSS file "%s"', $this->defaultCssFile));
1555 // this will free up the readers, based on code from Setasign's FpdiTrait::cleanUp()
1866 function SetAdditionalXmpRdf($s)
1868 $this->additionalXmpRdf = $s;
2015 $s = '';
2017 $s .= $this->PrintBodyBackgrounds();
2018 $s .= $this->PrintPageBackgrounds();
2022 "\n" . $s . "\n" . '\\1',
2163 $sz = preg_split('/\s+/', trim($properties['BACKGROUND-SIZE']));
2215 $ppos = preg_split('/\s+/', $properties['BACKGROUND-POSITION']);
2245 $s = '';
2259 $s .= 'q ' . $this->SetFColor($this->bodyBackgroundColor, true) . "\n";
2261 $s .= $this->SetAlpha(ord($this->bodyBackgroundColor[4]) / 100, 'Normal', true, 'F') . "\n";
2263 $s .= $this->SetAlpha(ord($this->bodyBackgroundColor[5]) / 100, 'Normal', true, 'F') . "\n";
2265 $s .= sprintf('%.3F %.3F %.3F %.3F re f Q', ($clx * Mpdf::SCALE), ($cly * Mpdf::SCALE), $clw * Mpdf::SCALE, $clh * Mpdf::SCALE) . "\n";
2272 $s .= $this->gradient->Gradient($clx, $cly, $clw, $clh, (isset($g['gradtype']) ? $g['gradtype'] : null), $g['stops'], $g['colorspace'], $g['coords'], $g['extend'], true);
2279 $s .= $this->gradient->Gradient($clx, $cly, $clw, $clh, $g['type'], $g['stops'], $g['colorspace'], $g['coords'], $g['extend'], true);
2292 $s .= sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, ($clx * Mpdf::SCALE), ($cly * Mpdf::SCALE), $clw * Mpdf::SCALE, $clh * Mpdf::SCALE) . "\n";
2296 return $s;
2301 $s = ' q 0 w '; // Line width=0
2302 $s .= sprintf('%.3F %.3F m ', ($clx) * Mpdf::SCALE, ($this->h - ($cly)) * Mpdf::SCALE); // start point TL before the arc
2303 $s .= sprintf('%.3F %.3F l ', ($clx) * Mpdf::SCALE, ($this->h - ($cly + $clh)) * Mpdf::SCALE); // line to BL
2304 $s .= sprintf('%.3F %.3F l ', ($clx + $clw) * Mpdf::SCALE, ($this->h - ($cly + $clh)) * Mpdf::SCALE); // line to BR
2305 $s .= sprintf('%.3F %.3F l ', ($clx + $clw) * Mpdf::SCALE, ($this->h - ($cly)) * Mpdf::SCALE); // line to TR
2306 $s .= sprintf('%.3F %.3F l ', ($clx) * Mpdf::SCALE, ($this->h - ($cly)) * Mpdf::SCALE); // line to TL
2307 $s .= ' W n '; // Ends path no-op & Sets the clipping path
2308 return $s;
2313 $s = '';
2325 $s .= "\n" . '/OCBZ-index /ZI' . $pb['z-index'] . ' BDC' . "\n";
2330 $s .= '/OC /OC1 BDC' . "\n";
2332 $s .= '/OC /OC2 BDC' . "\n";
2334 $s .= '/OC /OC3 BDC' . "\n";
2340 $s .= $pb['shadow'] . "\n";
2344 $s .= $pb['clippath'] . "\n";
2347 $s .= 'q ' . $this->SetFColor($pb['col'], true) . "\n";
2350 $s .= $this->SetAlpha(ord($pb['col'][4]) / 100, 'Normal', true, 'F') . "\n";
2352 $s .= $this->SetAlpha(ord($pb['col'][5]) / 100, 'Normal', true, 'F') . "\n";
2355 $s .= sprintf('%.3F %.3F %.3F %.3F re f Q', $pb['x'] * Mpdf::SCALE, ($this->h - $pb['y']) * Mpdf::SCALE, $pb['w'] * Mpdf::SCALE, -$pb['h'] * Mpdf::SCALE) . "\n";
2358 $s .= 'Q' . "\n";
2362 $s .= 'EMC' . "\n";
2366 $s .= "\n" . 'EMCBZ-index' . "\n";
2379 $s .= "\n" . '/OCGZ-index /ZI' . $pb['z-index'] . ' BDC' . "\n";
2384 $s .= '/OC /OC1 BDC' . "\n";
2386 $s .= '/OC /OC2 BDC' . "\n";
2388 $s .= '/OC /OC3 BDC' . "\n";
2397 $s .= $pb['clippath'] . "\n";
2400 $s .= $this->gradient->Gradient($pb['x'], $pb['y'], $pb['w'], $pb['h'], $pb['gradtype'], $pb['stops'], $pb['colorspace'], $pb['coords'], $pb['extend'], true);
2403 $s .= 'Q' . "\n";
2422 $s .= $pb['clippath'] . "\n";
2543 $s .= sprintf("q %s %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $opac, $iw * Mpdf::SCALE, $ih * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $ih)) * Mpdf::SCALE, $pb['image_id']) . "\n";
2553 $s .= sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $x, $y, $w, $h) . "\n";
2557 $s .= 'Q' . "\n";
2563 $s .= 'EMC' . "\n";
2567 $s .= "\n" . 'EMCGZ-index' . "\n";
2575 return $s;
2580 $s = '';
2586 $s .= 'q ' . $this->SetFColor($pb['col'], true) . "\n";
2588 $s .= $this->SetAlpha(ord($pb['col'][4]) / 100, 'Normal', true, 'F') . "\n";
2590 $s .= $this->SetAlpha(ord($pb['col'][5]) / 100, 'Normal', true, 'F') . "\n";
2592 $s .= sprintf('%.3F %.3F %.3F %.3F re %s Q', $pb['x'] * Mpdf::SCALE, ($this->h - $pb['y']) * Mpdf::SCALE, $pb['w'] * Mpdf::SCALE, -$pb['h'] * Mpdf::SCALE, 'f') . "\n";
2596 $s .= $pb['clippath'] . "\n";
2598 $s .= $this->gradient->Gradient($pb['x'], $pb['y'], $pb['w'], $pb['h'], $pb['gradtype'], $pb['stops'], $pb['colorspace'], $pb['coords'], $pb['extend'], true);
2600 $s .= 'Q' . "\n";
2621 $s .= $pb['clippath'] . "\n";
2735 $s .= sprintf("q %s %.3F 0 0 %.3F %.3F %.3F cm /I%d Do Q", $opac, $iw * Mpdf::SCALE, $ih * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($y + $ih)) * Mpdf::SCALE, $pb['image_id']) . "\n";
2744 $s .= sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $x, $y, $w, $h) . "\n";
2748 $s .= 'Q' . "\n";
2754 return $s;
2953 $s = $this->PrintPageBackgrounds();
2958 '\\1' . "\n" . $s . "\n",
3143 $s = '';
3144 $s .= $this->PrintBodyBackgrounds();
3146 $s .= $this->PrintPageBackgrounds();
3147 $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/', "\n" . $s . "\n" . '\\1', $this->pages[$this->page]);
3216 // Only add the headers if it's a new page
3375 $out = preg_replace('/\s(rg|g|k)/', '', $out);
3606 function GetStringWidth($s, $addSubset = true, $OTLdata = false, $textvar = 0, $includeKashida = false)
3610 $s = (string) $s;
3620 $s = preg_replace('/{iteration ([a-zA-Z0-9_]+)}/', '\\1', $s);
3623 $discards = substr_count($s, "\xc2\xad"); // mPDF 6 soft hyphens [U+00AD]
3624 $unicode = $this->UTF8StringToArray($s, $addSubset);
3626 $nb_spaces = mb_substr_count($s, ' ', $this->mb_enc);
3709 $s = str_replace(chr(173), '', $s);
3711 $nb_carac = $l = strlen($s);
3713 $nb_spaces = substr_count($s, ' ');
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])];
3728 if (isset($this->CurrentFont['kerninfo'][$s[($i - 1)]][$s[$i]])) {
3729 $kerning += $this->CurrentFont['kerninfo'][$s[($i - 1)]][$s[$i]];
3784 $s = '';
3785 $s .= sprintf('%.3F %.3F m %.3F %.3F l S', $x1 * Mpdf::SCALE, ($this->h - $y1) * Mpdf::SCALE, $x5 * Mpdf::SCALE, $y5 * Mpdf::SCALE);
3786 $this->writer->write($s);
3788 $s = '';
3789 $s .= sprintf('%.3F %.3F m %.3F %.3F l %.3F %.3F l %.3F %.3F l %.3F %.3F l ', $x5 * Mpdf::SCALE, $y5 * Mpdf::SCALE, $x3 * Mpdf::SCALE, $y3 * Mpdf::SCALE, $x2 * Mpdf::SCALE, ($this->h - $y2) * Mpdf::SCALE, $x4 * Mpdf::SCALE, $y4 * Mpdf::SCALE, $x5 * Mpdf::SCALE, $y5 * Mpdf::SCALE);
3790 $s .= $fill;
3791 $this->writer->write($s);
3804 $this->writer->write(sprintf('%.3F %.3F %.3F %.3F re %s', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $w * Mpdf::SCALE, -$h * Mpdf::SCALE, $op));
3854 throw new \Mpdf\MpdfException(sprintf('Font "%s%s%s" is not supported', $family, $style ? ' - ' : '', $style));
4246 throw new \Mpdf\MpdfException(sprintf('Could not include font metric file "%s"', $file));
4254 throw new \Mpdf\MpdfException(sprintf('Font %s not defined', $fontkey));
4356 $s = 'q ';
4358 $s .= '2 Tr 1 J 1 j ';
4359 $s .= sprintf('%.3F w ', ($this->FontSize / 130) * Mpdf::SCALE * $this->falseBoldWeight);
4362 $s .= $tc . ' ';
4374 $s .= $this->TextColor . ' ';
4399 $s .= sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
4406 $s .=sprintf('BT ' . $aix . ' %s Tj ET', $px, $py, $txt2);
4411 $s .=sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
4417 $s .= $this->applyGPOSpdf($txt2, $aix, $px, $py, $OTLdata, $textvar);
4421 $s .= ' ';
4426 $s.= ' ' . $c . ' ';
4440 $s .= ' ' . (sprintf(' %.3F w', $ut * Mpdf::SCALE));
4441 $s .= ' ' . $this->_dounderline($x, $y + $adjusty, $txt, $OTLdata, $textvar);
4442 $s .= ' ' . (sprintf(' %.3F w', $olw * Mpdf::SCALE));
4444 $s.= ' ' . $this->FillColor . ' ';
4451 $s.= ' ' . $c . ' ';
4466 $s .= ' ' . (sprintf(' %.3F w', $ut * Mpdf::SCALE));
4467 $s .= ' ' . $this->_dounderline($x, $y + $adjusty, $txt, $OTLdata, $textvar);
4468 $s .= ' ' . (sprintf(' %.3F w', $olw * Mpdf::SCALE));
4470 $s.= ' ' . $this->FillColor . ' ';
4473 $s .= 'Q';
4476 return $s . " \n";
4478 $this->writer->write($s);
4813 $s = '';
4816 $s .= $this->FillColor . ' ';
4899 $this->spanborddet['B'] = ['s' => 0, 'style' => '', 'w' => 0];
4903 $this->spanborddet['T'] = ['s' => 0, 'style' => '', 'w' => 0];
4907 $this->spanborddet['L'] = ['s' => 0, 'style' => '', 'w' => 0];
4911 $this->spanborddet['R'] = ['s' => 0, 'style' => '', 'w' => 0];
4925 $s .= sprintf('%.3F %.3F %.3F %.3F re f ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bg_boxtop + $tbw) * Mpdf::SCALE, ($w + $lbw + $rbw) * Mpdf::SCALE, (-$bg_boxheight - $tbw - $bbw) * Mpdf::SCALE);
4928 $s.= ' q ';
4937 $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $tbw * $dashon * Mpdf::SCALE, $tbw * $dashoff * Mpdf::SCALE);
4939 $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $tbw * $dot * Mpdf::SCALE, -$tbw / 2 * Mpdf::SCALE);
4942 $s .= ' 0 j 0 J [] 0 d ';
4946 $s .= 'q ';
4947 $s .= sprintf('%.3F %.3F m ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
4948 $s .= sprintf('%.3F %.3F l ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
4949 $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
4950 $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
4951 $s .= ' h W n '; // Ends path no-op & Sets the clipping path
4957 $s .= sprintf(' %s %.3F w ', $c, $tbw / 3 * Mpdf::SCALE);
4958 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw * 5 / 6) * Mpdf::SCALE, ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw * 5 / 6) * Mpdf::SCALE);
4959 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 6) * Mpdf::SCALE, ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 6) * Mpdf::SCALE);
4961 $s .= sprintf(' %s %.3F w ', $c, $tbw * Mpdf::SCALE);
4962 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE);
4964 $s .= sprintf(' %s %.3F w ', $c, $tbw * Mpdf::SCALE);
4965 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw / 2) * Mpdf::SCALE);
4969 $s .= ' Q ';
4976 $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $bbw * $dashon * Mpdf::SCALE, $bbw * $dashoff * Mpdf::SCALE);
4978 $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $bbw * $dot * Mpdf::SCALE, -$bbw / 2 * Mpdf::SCALE);
4981 $s .= ' 0 j 0 J [] 0 d ';
4985 $s .= 'q ';
4986 $s .= sprintf('%.3F %.3F m ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
4987 $s .= sprintf('%.3F %.3F l ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
4988 $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
4989 $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
4990 $s .= ' h W n '; // Ends path no-op & Sets the clipping path
4996 $s .= sprintf(' %s %.3F w ', $c, $bbw / 3 * Mpdf::SCALE);
4997 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 6) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 6) * Mpdf::SCALE);
4998 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw * 5 / 6) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw * 5 / 6) * Mpdf::SCALE);
5000 $s .= sprintf(' %s %.3F w ', $c, $bbw * Mpdf::SCALE);
5001 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE);
5003 $s .= sprintf(' %s %.3F w ', $c, $bbw * Mpdf::SCALE);
5004 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE, ($this->x + $w + $rbw - $short) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw / 2) * Mpdf::SCALE);
5008 $s .= ' Q ';
5015 $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $lbw * $dashon * Mpdf::SCALE, $lbw * $dashoff * Mpdf::SCALE);
5017 $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $lbw * $dot * Mpdf::SCALE, -$lbw / 2 * Mpdf::SCALE);
5020 $s .= ' 0 j 0 J [] 0 d ';
5024 $s .= 'q ';
5025 $s .= sprintf('%.3F %.3F m ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
5026 $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
5027 $s .= sprintf('%.3F %.3F l ', ($this->x) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
5028 $s .= sprintf('%.3F %.3F l ', ($this->x - $lbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
5029 $s .= ' h W n '; // Ends path no-op & Sets the clipping path
5034 $s .= sprintf(' %s %.3F w ', $c, $lbw / 3 * Mpdf::SCALE);
5035 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5036 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5038 $s .= sprintf(' %s %.3F w ', $c, $lbw * Mpdf::SCALE);
5039 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5041 $s .= sprintf(' %s %.3F w ', $c, $lbw * Mpdf::SCALE);
5042 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x - $lbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5046 $s .= ' Q ';
5054 $s .= sprintf(' 0 j 0 J [%.3F %.3F] 0 d ', $rbw * $dashon * Mpdf::SCALE, $rbw * $dashoff * Mpdf::SCALE);
5056 $s .= sprintf(' 1 j 1 J [%.3F %.3F] %.3F d ', 0.001, $rbw * $dot * Mpdf::SCALE, -$rbw / 2 * Mpdf::SCALE);
5059 $s .= ' 0 j 0 J [] 0 d ';
5063 $s .= 'q ';
5064 $s .= sprintf('%.3F %.3F m ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw) * Mpdf::SCALE);
5065 $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxbottom) * Mpdf::SCALE);
5066 $s .= sprintf('%.3F %.3F l ', ($this->x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
5067 $s .= sprintf('%.3F %.3F l ', ($this->x + $w + $rbw) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE);
5068 $s .= ' h W n '; // Ends path no-op & Sets the clipping path
5073 $s .= sprintf(' %s %.3F w ', $c, $rbw / 3 * Mpdf::SCALE);
5074 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5075 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw * 5 / 6) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5077 $s .= sprintf(' %s %.3F w ', $c, $rbw * Mpdf::SCALE);
5078 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5080 $s .= sprintf(' %s %.3F w ', $c, $rbw * Mpdf::SCALE);
5081 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxtop + $tbw) * Mpdf::SCALE, ($this->x + $w + $rbw / 2) * Mpdf::SCALE, ($this->h - $bord_boxbottom - $bbw + $short) * Mpdf::SCALE);
5085 $s .= ' Q ';
5089 $s.= ' Q ';
5099 $s .= sprintf('%.3F %.3F %.3F %.3F re %s ', $this->x * Mpdf::SCALE, ($this->h - $bg_boxtop) * Mpdf::SCALE, $w * Mpdf::SCALE, -$bg_boxheight * Mpdf::SCALE, $op);
5109 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', $x * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE, $x * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE);
5113 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', $x * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE, ($x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE);
5117 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', ($x + $w) * Mpdf::SCALE, ($this->h - $bord_boxtop) * Mpdf::SCALE, ($x + $w) * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE);
5121 $s .= sprintf('%.3F %.3F m %.3F %.3F l S ', $x * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE, ($x + $w) * Mpdf::SCALE, ($this->h - ($bord_boxbottom)) * Mpdf::SCALE);
5145 $s .='q ' . $this->TextColor . ' ';
5149 if (isset($this->textparam['outline-s']) && $this->textparam['outline-s'] && !($textvar & TextVars::FC_SMALLCAPS)) { // mPDF 5.7.1
5150 $s .=' ' . sprintf('%.3F w', $this->LineWidth * Mpdf::SCALE) . ' ';
5151 $s .=" $this->DrawColor ";
5152 $s .=" 2 Tr ";
5154 $s .= ' 2 Tr 1 J 1 j ';
5155 $s .= ' ' . sprintf('%.3F w', ($this->FontSize / 130) * Mpdf::SCALE * $this->falseBoldWeight) . ' ';
5158 $s .= ' ' . $tc . ' ';
5161 $s .=" 0 Tr ";
5184 $sub .= sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
5191 $sub .=sprintf('BT ' . $aix . ' %s Tj ET', $px, $py, $txt2);
5196 $sub .=sprintf('BT ' . $aix . ' (%s) Tj ET', $px, $py, $txt2);
5212 $sub .=sprintf('(%s) ', $tx);
5215 $sub .=sprintf('%d(%s) ', $adj, $space);
5279 $c = $this->textparam['s-decoration']['color'];
5286 $decorationfontkey = $this->textparam['s-decoration']['fontkey'];
5287 $decorationfontsize = $this->textparam['s-decoration']['fontsize'] / $shrin_k;
5313 $sbaseline = $glyphYorigin - $this->textparam['s-decoration']['baseline'] / $shrin_k;
5363 $s .= ' q ';
5364 $s .= $this->SetTColor($ts['col'], true) . "\n";
5366 $s .= $this->SetAlpha(ord($ts['col'][4]) / 100, 'Normal', true, 'F') . "\n";
5368 $s .= $this->SetAlpha(ord($ts['col'][5]) / 100, 'Normal', true, 'F') . "\n";
5370 $s .= $this->SetAlpha(ord($ts['col'][3]) / 100, 'Normal', true, 'F') . "\n";
5372 $s .= sprintf(' 1 0 0 1 %.4F %.4F cm', $ts['x'] * Mpdf::SCALE, -$ts['y'] * Mpdf::SCALE) . "\n";
5373 $s .= $sub;
5374 $s .= ' Q ';
5378 $s .= $sub;
5382 $s .=' Q';
5390 if ($s) {
5391 $this->writer->write($s);
5584 $tx = sprintf("%02s", strtoupper(dechex($init)));
5593 $tx = sprintf("%02s", strtoupper(dechex($n)));
5667 $tx = sprintf("%02s", strtoupper(dechex($init)));
5675 $tx = sprintf("%02s", strtoupper(dechex($n)));
5725 // Output the code for the txt character(s)
5761 $s = sprintf(' BT ' . $aix . ' 0 Tc 0 Tw [%s] TJ ET ', $x, $y, $tj);
5763 // echo $s."\n\n"; // exit;
5765 return $s;
5775 $s = sprintf(' BT ' . $aix, $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE);
5792 $s .= sprintf(' %.3F Tc [%s] TJ', $this->charspacing, $tj);
5796 $s .= sprintf(' %.3F Tc (%s) Tj', $this->ws + $this->charspacing, $space);
5799 $s .= ' ET ';
5801 $s = '';
5814 $s .= sprintf(' BT ' . $aix . ' [%s] TJ ET ', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $tj);
5816 $s = '';
5827 $s .= sprintf(' BT ' . $aix . ' [%s] TJ ET ', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $tj);
5830 return $s;
5900 $s = str_replace("\r", '', $txt);
5901 $nb = strlen($s);
5902 while ($nb > 0 and $s[$nb - 1] == "\n") {
5906 $s = str_replace("\r", '', $txt);
5907 $nb = mb_strlen($s, $this->mb_enc);
5908 while ($nb > 0 and mb_substr($s, $nb - 1, 1, $this->mb_enc) == "\n") {
5947 if (preg_match("/([" . $this->pregCURSchars . "])/u", $s)) {
5954 $c = mb_substr($s, $i, 1, $this->mb_enc);
5960 $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
6010 $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
6025 $tmp = rtrim(mb_substr($s, $j, $sep - $j, $this->mb_enc));
6097 $c = $s[$i];
6104 $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
6143 $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
6149 $tmp = rtrim(substr($s, $j, $sep - $j));
6165 $this->Cell($w, $h, substr($s, $j, $sep - $j), $b, 2, $align, $fill, $link);
6201 $tmp = rtrim(mb_substr($s, $j, $i - $j, $this->mb_enc));
6214 $this->Cell($w, $h, substr($s, $j, $i - $j), $b, 2, $align, $fill, $link);
6814 // if it's justified, we need to find the char/word spacing (or if orphans have allowed length of line to go over the maxwidth)
6923 $s = preg_split('/' . preg_quote($dp, '/') . '/', $content[0], 2); // ? needs to be /u if not core
6924 $s0 = $this->GetStringWidth($s[0], false);
6950 $this->spanborddet['L']['s'] = $this->spanborddet['L']['w'] = 0;
6953 $this->spanborddet['R']['s'] = $this->spanborddet['R']['w'] = 0;
7672 $this->writer->write(sprintf('q %s %s', $lcol, $fcol));
7736 function WriteFlowingBlock($s, $sOTLdata)
7834 if (substr($s, 0, 3) == "\xbb\xa4\xac") { // identifier has been identified!
7835 $objattr = $this->_getObjAttr($s);
7873 $clen = strlen($s);
7875 $clen = mb_strlen($s, $this->mb_enc);
7883 $c = $s[$i];
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);
7905 $lastc = mb_substr($s, ($i - 1), 1, $this->mb_enc);
8019 $followingchar = $s[$i + 1];
8021 $followingchar = mb_substr($s, $i + 1, 1, $this->mb_enc);
8036 // 1b) Try squeezing another character(s) onto this line = Oikomi, if character cannot end line
8038 // NB otherwise it move lastchar(s) to next line to keep $c company = Oidashi, which is done below in standard way
8068 $addc = substr($s, $ac, 1);
8070 $addc = mb_substr($s, $ac, 1, $this->mb_enc);
8394 // if it's justified, we need to find the char/word spacing (or if hanger $this->CJKforceend)
8576 $this->spanborddet['L']['s'] = $this->spanborddet['L']['w'] = 0;
8579 $this->spanborddet['R']['s'] = $this->spanborddet['R']['w'] = 0;
8820 if (isset($params['outline-s']) && $params['outline-s']) {
9314 $s = sprintf('%d j', $mode);
9315 if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['LineJoin']) && $this->pageoutput[$this->page]['LineJoin'] != $s) || !isset($this->pageoutput[$this->page]['LineJoin']))) {
9316 $this->writer->write($s);
9318 $this->pageoutput[$this->page]['LineJoin'] = $s;
9323 $s = sprintf('%d J', $mode);
9324 if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['LineCap']) && $this->pageoutput[$this->page]['LineCap'] != $s) || !isset($this->pageoutput[$this->page]['LineCap']))) {
9325 $this->writer->write($s);
9327 $this->pageoutput[$this->page]['LineCap'] = $s;
9333 $s = sprintf('[%.3F %.3F] 0 d', $black * Mpdf::SCALE, $white * Mpdf::SCALE);
9335 $s = '[] 0 d';
9338 if ($this->page > 0 && ((isset($this->pageoutput[$this->page]['Dash']) && $this->pageoutput[$this->page]['Dash'] != $s) || !isset($this->pageoutput[$this->page]['Dash']))) {
9339 $this->writer->write($s);
9342 $this->pageoutput[$this->page]['Dash'] = $s;
9418 if ($last_x != ($this->lMargin + $this->blk[$blvl]['outer_left_margin']) || ($last_w != $this->blk[$blvl]['width']) || $last_fc != $this->FillColor || (isset($this->blk[$blvl]['border_top']['s']) && $this->blk[$blvl]['border_top']['s']) || (isset($this->blk[$blvl]['border_bottom']['s']) && $this->blk[$blvl]['border_bottom']['s']) || (isset($this->blk[$blvl]['border_left']['s']) && $this->blk[$blvl]['border_left']['s']) || (isset($this->blk[$blvl]['border_right']['s']) && $this->blk[$blvl]['border_right']['s'])) {
9491 sprintf('Error detected. PDF file generation aborted: %s', $e['message']),
9513 $this->logger->warning(sprintf('PDF could not be generated as it stands as a %s compliant file.', $standard), ['context' => LogContext::PDFA_PDFX]);
9514 $this->logger->warning(sprintf('These issues can be automatically fixed by mPDF using %s = true;', $option), ['context' => LogContext::PDFA_PDFX]);
9515 $this->logger->warning(sprintf('Action that mPDF will take to automatically force %s compliance are shown further in the log.', $standard), ['context' => LogContext::PDFA_PDFX]);
9526 $this->logger->debug(sprintf('Peak Memory usage %s MB', number_format(memory_get_peak_usage(true) / (1024 * 1024), 2)), ['context' => LogContext::STATISTICS]);
9527 $this->logger->debug(sprintf('PDF file size %s kB', number_format(strlen($this->buffer) / 1024)), ['context' => LogContext::STATISTICS]);
9550 sprintf('Data has already been sent to output (%s at line %s), unable to output PDF file', $filename, $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');
9609 throw new \Mpdf\MpdfException(sprintf('Unable to create output file %s', $name));
9622 throw new \Mpdf\MpdfException(sprintf('Incorrect output destination %s', $dest));
9720 $s = $this->PrintPageBackgrounds();
9721 $this->headerbuffer = $s . $this->headerbuffer;
9803 $s = $this->PrintPageBackgrounds(-$adj);
9804 $this->headerbuffer = $s . $this->headerbuffer;
9886 if ($page < 1) { // Document has not been started - assume it's for first page
9955 $this->pages[$pn] = preg_replace('/\s\/F' . $fid . ' \d[\d.]* Tf\s/is', ' ', $this->pages[$pn]);
9960 $this->pages[$pn] = preg_replace('/\s\/F' . $font['i'] . ' \d[\d.]* Tf\s/is', ' ', $this->pages[$pn]);
10602 $s = sin($angle);
10605 $this->writer->write(sprintf('q %.5F %.5F %.5F %.5F %.3F %.3F cm 1 0 0 1 %.3F %.3F cm', $c, $s, -$s, $c, $cx, $cy, -$cx, -$cy));
10738 $ret .= sprintf("%02s", strtoupper(dechex($init)));
10748 $ret .= sprintf("%02s", strtoupper(dechex($n)));
11477 $pattern = sprintf('@^(?!%s)[a-z0-9\.\-+]+:.*@i', implode('|', $wrappers));
12017 $this->writer->write(sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $px * Mpdf::SCALE, ($this->h - $py) * Mpdf::SCALE, $pw * Mpdf::SCALE, -$ph * Mpdf::SCALE));
12148 $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
12149 $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => $s];
12171 $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
12172 $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => $s];
12201 $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
12202 $this->tableBackgrounds[$level * 9 + 5][] = ['x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'image_id' => $image_id, 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $x_pos, 'y_pos' => $y_pos, 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'clippath' => $s, 'resize' => $resize, 'opacity' => $opacity, 'itype' => $itype];
12516 $s = max($l, $r);
12517 $tw = $c + 2 * $s;
12519 return [intval($s * 100 / $tw), intval($c * 100 / $tw), intval($s * 100 / $tw)];
13209 if (preg_match('/<html [^>]*dir=[\'\"]\s*rtl\s*[\'\"]/ism', $html)) {
13220 if (preg_match('/dir=[\'\"]\s*rtl\s*[\'\"]/ism', $m[1])) {
13554 if ($this->blockjustfinished && $this->cell[$this->row][$this->col]['s'] > 0) {
13557 $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s'];
13558 } elseif ($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) {
13559 $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s'];
13561 $this->cell[$this->row][$this->col]['s'] = 0; // reset
13566 if (isset($this->cell[$this->row][$this->col]['s'])) {
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);
13572 $this->cell[$this->row][$this->col]['s'] += (isset($this->spanborddet['L']['w']) ? $this->spanborddet['L']['w'] : 0) + (isset($this->spanborddet['R']['w']) ? $this->spanborddet['R']['w'] : 0);
13581 $s = preg_split('/' . preg_quote($dp, '/') . '/', $e, 2); // ? needs to be /u if not core
13582 $s0 = $this->GetStringWidth($s[0], false);
13584 if (isset($s[1]) && $s[1]) {
13585 $s1 = $this->GetStringWidth(($s[1] . $dp), false);
13752 $regexp = '|=\'(.*?)\'|s'; // eliminate single quotes, if any
13756 $regexp = '| (\\w+?)=([^\\s>"]+)|si';
13760 $e = preg_replace('/ (\\S+?)\s*=\s*"/i', " \\1=\"", $e);
13765 $regexp = '/ (href|src)\s*=\s*"(.*?)"/i';
13848 $s = $this->PrintPageBackgrounds();
13850 $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->pages[$this->page]);
13938 $checkinnerhtml = preg_replace('/\s/', '', $html);
14610 $s = $this->PrintPageBackgrounds();
14611 $s = $rot_start . $s . $rot_end;
14612 $this->pages[$this->page] = preg_replace('/___BEFORE_BORDERS___/', "\n" . $s . "\n", $this->pages[$this->page]);
14628 $this->writer->write(sprintf('%.3F %.3F %.3F %.3F re %s', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $w * Mpdf::SCALE, -$ch * Mpdf::SCALE, $op));
14630 $tmp = "q\n" . sprintf('%.3F %.3F %.3F %.3F re %s', $x * Mpdf::SCALE, ($this->h - $y) * Mpdf::SCALE, $w * Mpdf::SCALE, -$ch * Mpdf::SCALE, $op);
14802 $prop = preg_split('/\s+/', trim($bd));
14814 return ['s' => 1, 'w' => $bsize, 'c' => $this->colorConverter->convert(0, $this->PDFAXwarnings), 'style' => 'solid'];
14816 return ['w' => 0, 's' => 0];
14852 return ['w' => 0, 's' => 0];
14876 return ['s' => $on, 'w' => $bsize, 'c' => $coul, 'style' => $prop[1], 'dom' => 0];
15297 $s = $this->PrintPageBackgrounds();
15299 $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->pages[$this->page]);
16007 $arrayaux[$i][16]['L']['s'] = 0;
16009 $arrayaux[$i - 1][16]['R']['s'] = 0;
16831 if (isset($tbd['s']) && $tbd['s']) {
16851 $s = '';
16853 $s .= ($this->_EllipseArc($x0 + $w - $brTR_H, $y0 + $brTR_V, $brTR_H - $border_top / 2, $brTR_V - $border_top / 2, 1, 2, true)) . "\n";
16856 $s .= (sprintf('%.3F %.3F m ', ($x0 + $w) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16858 $s .= (sprintf('%.3F %.3F m ', ($x0 + $w - ($border_top / 2)) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16865 $s .= (sprintf('%.3F %.3F l ', $legbreakR * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16868 $s .= (sprintf('%.3F %.3F m ', $legbreakL * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16869 $s .= (sprintf('%.3F %.3F l ', ($x0 + $brTL_H ) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE) . "\n");
16871 $s .= (sprintf('%.3F %.3F m ', ($x0 + $brTL_H ) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16874 $s .= (sprintf('%.3F %.3F l ', ($x0 + $brTL_H ) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16876 $s .= ($this->_EllipseArc($x0 + $brTL_H, $y0 + $brTL_V, $brTL_H - $border_top / 2, $brTL_V - $border_top / 2, 2, 1)) . "\n";
16881 $s .= (sprintf('%.3F %.3F l ', $legbreakR * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16884 $s .= (sprintf('%.3F %.3F m ', $legbreakL * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16886 $s .= (sprintf('%.3F %.3F l ', ($x0) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16888 $s .= (sprintf('%.3F %.3F l ', ($x0 + ($border_top / 2)) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16891 $s .= (sprintf('%.3F %.3F m ', ($x0) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16893 $s .= (sprintf('%.3F %.3F m ', ($x0 + $border_top / 2) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16896 $s .= (sprintf('%.3F %.3F l ', ($x0) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16898 $s .= (sprintf('%.3F %.3F l ', ($x0 + ($border_top / 2)) * Mpdf::SCALE, ($this->h - ($y0 + ($border_top / 2))) * Mpdf::SCALE)) . "\n";
16903 $s .= 'S' . "\n";
16904 $this->writer->write($s);
16909 $this->writer->write($s);
16928 if (isset($tbd['s']) && $tbd['s']) {
16946 $s = '';
16948 $s .= ($this->_EllipseArc($x0 + $brBL_H, $y0 + $h - $brBL_V, $brBL_H - $border_bottom / 2, $brBL_V - $border_bottom / 2, 3, 2, true)) . "\n";
16951 $s .= (sprintf('%.3F %.3F m ', ($x0) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_bottom / 2))) * Mpdf::SCALE)) . "\n";
16953 $s .= (sprintf('%.3F %.3F m ', ($x0 + ($border_bottom / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_bottom / 2))) * Mpdf::SCALE)) . "\n";
16958 $s .= (sprintf('%.3F %.3F l ', ($x0 + $w - ($border_bottom / 2) - $brBR_H ) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_bottom / 2))) * Mpdf::SCALE)) . "\n";
16959 $s .= ($this->_EllipseArc($x0 + $w - $brBR_H, $y0 + $h - $brBR_V, $brBR_H - $border_bottom / 2, $brBR_V - $border_bottom / 2, 4, 1)) . "\n";
16962 $s .= (sprintf('%.3F %.3F l ', ($x0 + $w) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_bottom / 2))) * Mpdf::SCALE)) . "\n";
16964 $s .= (sprintf('%.3F %.3F l ', ($x0 + $w - ($border_bottom / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_bottom / 2))) * Mpdf::SCALE)) . "\n";
16967 $s .= 'S' . "\n";
16968 $this->writer->write($s);
16973 $this->writer->write($s);
16992 if (isset($tbd['s']) && $tbd['s']) {
17010 $s = '';
17012 $s .= ($this->_EllipseArc($x0 + $brTL_H, $y0 + $brTL_V, $brTL_H - $border_left / 2, $brTL_V - $border_left / 2, 2, 2, true)) . "\n";
17015 $s .= (sprintf('%.3F %.3F m ', ($x0 + ($border_left / 2)) * Mpdf::SCALE, ($this->h - ($y0)) * Mpdf::SCALE)) . "\n";
17017 $s .= (sprintf('%.3F %.3F m ', ($x0 + ($border_left / 2)) * Mpdf::SCALE, ($this->h - ($y0 + ($border_left / 2))) * Mpdf::SCALE)) . "\n";
17022 $s .= (sprintf('%.3F %.3F l ', ($x0 + ($border_left / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_left / 2) - $brBL_V) ) * Mpdf::SCALE)) . "\n";
17023 $s .= ($this->_EllipseArc($x0 + $brBL_H, $y0 + $h - $brBL_V, $brBL_H - $border_left / 2, $brBL_V - $border_left / 2, 3, 1)) . "\n";
17026 $s .= (sprintf('%.3F %.3F l ', ($x0 + ($border_left / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h) ) * Mpdf::SCALE)) . "\n";
17028 $s .= (sprintf('%.3F %.3F l ', ($x0 + ($border_left / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_left / 2)) ) * Mpdf::SCALE)) . "\n";
17031 $s .= 'S' . "\n";
17032 $this->writer->write($s);
17037 $this->writer->write($s);
17053 if (isset($tbd['s']) && $tbd['s']) {
17071 $s = '';
17073 $s .= ($this->_EllipseArc($x0 + $w - $brBR_H, $y0 + $h - $brBR_V, $brBR_H - $border_right / 2, $brBR_V - $border_right / 2, 4, 2, true)) . "\n";
17076 $s .= (sprintf('%.3F %.3F m ', ($x0 + $w - ($border_right / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h)) * Mpdf::SCALE)) . "\n";
17078 $s .= (sprintf('%.3F %.3F m ', ($x0 + $w - ($border_right / 2)) * Mpdf::SCALE, ($this->h - ($y0 + $h - ($border_right / 2))) * Mpdf::SCALE)) . "\n";
17083 $s .= (sprintf('%.3F %.3F l ', ($x0 + $w - ($border_right / 2)) * Mpdf::SCALE, ($this->h - ($y0 + ($border_right / 2) + $brTR_V) ) * Mpdf::SCALE)) . "\n";
17084 $s .= ($this->_EllipseArc($x0 + $w - $brTR_H, $y0 + $brTR_V, $brTR_H - $border_right / 2, $brTR_V - $border_right / 2, 1, 1)) . "\n";
17087 $s .= (sprintf('%.3F %.3F l ', ($x0 + $w - ($border_right / 2)) * Mpdf::SCALE, ($this->h - ($y0) ) * Mpdf::SCALE)) . "\n";
17089 $s .= (sprintf('%.3F %.3F l ', ($x0 + $w - ($border_right / 2)) * Mpdf::SCALE, ($this->h - ($y0 + ($border_right / 2)) ) * Mpdf::SCALE)) . "\n";
17092 $s .= 'S' . "\n";
17093 $this->writer->write($s);
17098 $this->writer->write($s);
17176 $s = ' q 0 w '; // Line width=0
17177 $s .= sprintf('%.3F %.3F m ', ($bgx0 + $brbgTL_H ) * Mpdf::SCALE, ($this->h - $bgy0) * Mpdf::SCALE); // start point TL before the arc
17180 $s .= $this->_EllipseArc($bgx0 + $brbgTL_H, $bgy0 + $brbgTL_V, $brbgTL_H, $brbgTL_V, 2); // segment 2 TL
17183 $s .= sprintf('%.3F %.3F l ', ($bgx0) * Mpdf::SCALE, ($this->h - ($bgy1 - $brbgBL_V )) * Mpdf::SCALE); // line to BL
17186 $s .= $this->_EllipseArc($bgx0 + $brbgBL_H, $bgy1 - $brbgBL_V, $brbgBL_H, $brbgBL_V, 3); // segment 3 BL
17189 $s .= sprintf('%.3F %.3F l ', ($bgx1 - $brbgBR_H ) * Mpdf::SCALE, ($this->h - ($bgy1)) * Mpdf::SCALE); // line to BR
17192 $s .= $this->_EllipseArc($bgx1 - $brbgBR_H, $bgy1 - $brbgBR_V, $brbgBR_H, $brbgBR_V, 4); // segment 4 BR
17195 $s .= sprintf('%.3F %.3F l ', ($bgx1) * Mpdf::SCALE, ($this->h - ($bgy0 + $brbgTR_V)) * Mpdf::SCALE); // line to TR
17198 $s .= $this->_EllipseArc($bgx1 - $brbgTR_H, $bgy0 + $brbgTR_V, $brbgTR_H, $brbgTR_V, 1); // segment 1 TR
17201 $s .= sprintf('%.3F %.3F l ', ($bgx0 + $brbgTL_H ) * Mpdf::SCALE, ($this->h - $bgy0) * Mpdf::SCALE); // line to TL
17234 $shadow .= $s; // Use the clipping path with W*
17547 $s .= ' W n '; // Ends path no-op & Sets the clipping path
17556 'clippath' => $s,
17593 'clippath' => $s,
17663 'clippath' => $s,
17732 'clippath' => $s,
17753 $s = '';
17806 $s .= sprintf('%.3F %.3F m ', $a0, $b0);
17808 $s .= sprintf('%.3F %.3F %.3F %.3F %.3F %.3F c ', ($a0 + ($c0 * $dtm)), ($b0 + ($d0 * $dtm)), ($a1 - ($c1 * $dtm)), ($b1 - ($d1 * $dtm)), $a1, $b1);
17817 return $s;
17838 if (isset($tbd['s']) && $tbd['s']) {
17858 if (isset($tbd['s']) && $tbd['s']) {
17879 if (isset($tbd['s']) && $tbd['s']) {
17900 if (isset($tbd['s']) && $tbd['s']) {
17941 if (!empty($tbd['s'])) {
17955 if (!empty($tbd['s'])) {
17969 if (!empty($tbd['s'])) {
17983 if (!empty($tbd['s'])) {
18080 $regexp = '/ (\\w+?)=([^\\s>"]+)/si';
18109 if (preg_match('/<head.*charset=([^\'\"\s]*).*<\/head>/si', $html, $m)) {
18225 if ($this->blk[$this->blklvl]['border_top']['s']) {
18231 if ($this->blk[$this->blklvl]['border_bottom']['s']) {
18237 if ($this->blk[$this->blklvl]['border_left']['s']) {
18243 if ($this->blk[$this->blklvl]['border_right']['s']) {
18782 if (preg_match('/[\"\']([a-zA-Z0-9]{4})[\"\']\s*(on|off|\d*){0,1}/', $t, $m)) {
18848 $this->textparam['outline-s'] = false;
18868 $this->textparam['outline-s'] = true;
18870 $this->textparam['outline-s'] = false;
18908 $this->textparam['s-decoration']['baseline'] = $this->textparam['text-baseline'];
18910 $this->textparam['s-decoration']['baseline'] = 0;
18912 $this->textparam['s-decoration']['fontkey'] = $this->FontFamily . $this->FontStyle;
18913 $this->textparam['s-decoration']['fontsize'] = $this->FontSize;
18914 $this->textparam['s-decoration']['color'] = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG
18948 if (isset($this->textparam['s-decoration'])) {
18949 unset($this->textparam['s-decoration']);
18983 foreach (['B', 'I'] as $s) {
18984 if ($this->$s) {
18985 $style .= $s;
18996 foreach (['B', 'I'] as $s) {
18997 if (isset($arr[$s])) {
18998 if ($arr[$s]) {
18999 $this->$s = true;
19000 $style .= $s;
19002 $this->$s = false;
19004 } elseif ($this->$s) {
19005 $style .= $s;
19016 foreach (['B', 'I'] as $s) {
19017 if (strpos($str, $s) !== false) {
19018 $this->$s = true;
19019 $style .= $s;
19021 $this->$s = false;
19030 foreach (['B', 'I'] as $s) {
19031 $this->$s = false;
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>";
19402 $c['s'] = isset($c['s']) ? $c['s'] /= $k : 0;
19433 $s = fread($fh, 2);
19434 $a = (ord($s[0]) << 8) + ord($s[1]);
19451 $bindata = pack("nnda6A10nnda6A10nnda6A10nnda6A10nd9", $cell['border'], $cell['border_details']['R']['s'], $cell['border_details']['R']['w'], $cell['border_details']['R']['c'], $cell['border_details']['R']['style'], $cell['border_details']['R']['dom'], $cell['border_details']['L']['s'], $cell['border_details']['L']['w'], $cell['border_details']['L']['c'], $cell['border_details']['L']['style'], $cell['border_details']['L']['dom'], $cell['border_details']['T']['s'], $cell['border_details']['T']['w'], $cell['border_details']['T']['c'], $cell['border_details']['T']['style'], $cell['border_details']['T']['dom'], $cell['border_details']['B']['s'], $cell['border_details']['B']['w'], $cell['border_details']['B']['c'], $cell['border_details']['B']['style'], $cell['border_details']['B']['dom'], $cell['border_details']['mbw']['BL'], $cell['border_details']['mbw']['BR'], $cell['border_details']['mbw']['RT'], $cell['border_details']['mbw']['RB'], $cell['border_details']['mbw']['TL'], $cell['border_details']['mbw']['TR'], $cell['border_details']['mbw']['LT'], $cell['border_details']['mbw']['LB'], (isset($cell['border_details']['cellposdom']) ? $cell['border_details']['cellposdom'] : 0));
19484 $cell['border_details']['R']['s'] = $bd['rs'];
19490 $cell['border_details']['L']['s'] = $bd['ls'];
19496 $cell['border_details']['T']['s'] = $bd['ts'];
19502 $cell['border_details']['B']['s'] = $bd['bs'];
19548 // = total length of text approx (using $c['s']) in that column - used to approximately distribute col widths in _tableWidth
19617 if (isset($c['s'])) {
19618 $c['s'] += $extrcw;
19640 $c['s'] = $c['maxs'];
19647 $c['maw'] = $c['s'];
19715 $table['l'][$j] += $c['s'];
19717 $table['l'][$j] = $c['s'];
19770 $table['l'][$k] += $c['s'] / $c['colspan'];
19776 $table['l'][$k] = $c['s'] / $c['colspan'];
20112 // Allocate spare (more than col's minimum width) across the cols according to their approx total text length
20815 $this->cellBorderBuffer[] = pack("A16nCnda6A10d14", str_pad(sprintf("%08.7f", $dom), 16, "0", STR_PAD_LEFT), $cbord, ord($side), $details[$side]['s'], $details[$side]['w'], $details[$side]['c'], $details[$side]['style'], $x, $y, $w, $h, $details['mbw']['BL'], $details['mbw']['BR'], $details['mbw']['RT'], $details['mbw']['RB'], $details['mbw']['TL'], $details['mbw']['TR'], $details['mbw']['LT'], $details['mbw']['LB'], $details['cellposdom'], 0);
20818 $this->cellBorderBuffer[] = pack("A16nCnda6A10d14", str_pad(sprintf("%08.7f", ($dom + 4)), 16, "0", STR_PAD_LEFT), $cbord, ord($side), $details[$side]['s'], $details[$side]['w'], $details[$side]['c'], $details[$side]['style'], $x, $y, $w, $h, $details['mbw']['BL'], $details['mbw']['BR'], $details['mbw']['RT'], $details['mbw']['RB'], $details['mbw']['TL'], $details['mbw']['TR'], $details['mbw']['LT'], $details['mbw']['LB'], $details['cellposdom'], 1);
21465 if (isset($celladj['border_details']['T']['s']) && $celladj['border_details']['T']['s'] == 1) {
21559 if ($celladj && $celladj['border_details']['L']['s'] == 1) {
22339 $s = $this->PrintTableBackgrounds();
22341 $this->headerbuffer = preg_replace('/(___TABLE___BACKGROUNDS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->headerbuffer);
22344 $this->pages[$this->page] = preg_replace('/(___TABLE___BACKGROUNDS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->pages[$this->page]);
22714 $this->writer->write(sprintf('q /Pattern cs /P%d scn %s %.3F %.3F %.3F %.3F re f Q', $n, $opac, $px * Mpdf::SCALE, ($this->h - $py) * Mpdf::SCALE, $pw * Mpdf::SCALE, -$ph * Mpdf::SCALE));
23011 $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
23012 $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => $s];
23033 $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
23034 $this->tableBackgrounds[$level * 9 + 4][] = ['gradient' => true, 'x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'gradtype' => $g['type'], 'stops' => $g['stops'], 'colorspace' => $g['colorspace'], 'coords' => $g['coords'], 'extend' => $g['extend'], 'clippath' => $s];
23062 $s = $this->_setClippingPath($clx, $cly, $clw, $clh); // mPDF 6
23063 $this->tableBackgrounds[$level * 9 + 5][] = ['x' => $gx + ($table['border_spacing_H'] / 2), 'y' => $gy + ($table['border_spacing_V'] / 2), 'w' => $gw - $table['border_spacing_V'], 'h' => $gh - $table['border_spacing_H'], 'image_id' => $image_id, 'orig_w' => $orig_w, 'orig_h' => $orig_h, 'x_pos' => $x_pos, 'y_pos' => $y_pos, 'x_repeat' => $x_repeat, 'y_repeat' => $y_repeat, 'clippath' => $s, 'resize' => $resize, 'opacity' => $opacity, 'itype' => $itype];
23257 $s = $this->PrintTableBackgrounds();
23259 $this->tablebuffer = preg_replace('/(___TABLE___BACKGROUNDS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->tablebuffer);
23264 $this->headerbuffer = preg_replace('/(___TABLE___BACKGROUNDS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->headerbuffer);
23269 $this->pages[$this->page] = preg_replace('/(___TABLE___BACKGROUNDS' . $this->uniqstr . ')/', '\\1' . "\n" . $s . "\n", $this->pages[$this->page]);
24431 // Recursively add previous column's height
24440 foreach ($this->columnbuffer as $key => $s) {
24441 $t = $s['s'];
24443 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24444 $this->columnbuffer[$key]['s'] = '';
24446 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24448 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24450 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24452 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24454 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24456 $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0;
24514 foreach ($this->columnbuffer as $key => $s) {
24515 if (isset($s['rel_y'])) { // only process position sensitive data
24516 if ($s['rel_y'] >= $cbr[$newcolumn]) {
24523 $block_bottom = max($block_bottom, ($s['rel_y'] + $s['h']));
24526 $xadj = -(($newcolumn - $s['col']) * ($this->ColWidth + $this->ColGap)); // *OTL*
24529 $xadj = ($newcolumn - $s['col']) * ($this->ColWidth + $this->ColGap);
24536 $yadj = ($s['rel_y'] - $s['y']) - ($last_col_bottom) + $this->y0;
24538 $t = $s['s'];
24548 $this->columnbuffer[$key]['s'] = $t;
24550 $this->columnbuffer[$key]['newy'] = $s['y'] + $yadj;
24552 $clb = $s['y'] + $yadj + $s['h']; // bottom_margin of current
24560 if (isset($this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])])) {
24561 $ref = $this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])];
24564 unset($this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])]);
24567 if (isset($this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])])) {
24568 $ref = $this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])];
24571 unset($this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])]);
24574 if (isset($this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])])) {
24575 $ref = $this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])];
24582 unset($this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])]);
24606 foreach ($this->columnbuffer as $key => $s) {
24607 if (isset($s['rel_y'])) { // only process position sensitive data
24609 if (isset($this->ColDetails[$s['newcol']]['max_bottom']) && $this->ColDetails[$s['newcol']]['max_bottom'] && $this->ColDetails[$s['newcol']]['max_bottom'] != $this->y0) {
24610 $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['newcol']]['max_bottom'] - ($this->y0));
24615 $yadj = ($s['newy'] - $this->y0) * ($ratio - 1);
24618 if (isset($this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])])) {
24619 $ref = $this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])];
24622 unset($this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])]);
24625 if (isset($this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])])) {
24626 $ref = $this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])];
24629 unset($this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])]);
24632 if (isset($this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])])) {
24633 $ref = $this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])];
24635 unset($this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])]);
24659 foreach ($this->columnbuffer as $key => $s) {
24660 if (isset($s['rel_y'])) { // only process position sensitive data
24662 if (isset($this->ColDetails[$s['newcol']]['max_bottom']) && $this->ColDetails[$s['newcol']]['max_bottom'] && $this->ColDetails[$s['newcol']]['max_bottom'] != $this->y0) {
24663 $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['newcol']]['max_bottom'] - ($this->y0));
24675 $this->pages[$this->page] .= $s['s'] . "\n";
24676 if (isset($s['rel_y']) && ($ratio > 1) && ($ratio <= $this->max_colH_correction)) { // only process position sensitive data
24687 foreach ($this->columnbuffer as $s) {
24688 $this->pages[$this->page] .= $s['s'] . "\n";
24698 foreach ($this->columnbuffer as $key => $s) {
24700 $t = $s['s'];
24706 $clb = $s['y'] + $s['h'];
24707 if ((isset($this->ColDetails[$s['col']]['max_bottom']) && $clb > $this->ColDetails[$s['col']]['max_bottom']) || !isset($this->ColDetails[$s['col']]['max_bottom'])) {
24708 $this->ColDetails[$s['col']]['max_bottom'] = $clb;
24713 $this->columnbuffer[$key]['rel_y'] = $s['y']; // Marks position sensitive data to process later
24715 $this->columnbuffer[$key]['s'] = '';
24720 foreach ($this->columnbuffer as $key => $s) {
24722 if (isset($this->ColDetails[$s['col']]['max_bottom']) && $this->ColDetails[$s['col']]['max_bottom']) {
24723 $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['col']]['max_bottom'] - ($this->y0));
24728 $yadj = ($s['y'] - $this->y0) * ($ratio - 1);
24731 if (isset($s['rel_y'])) { // only process position sensitive data
24733 if (isset($this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])])) {
24734 $ref = $this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])];
24737 unset($this->columnLinks[$s['col']][intval($s['x'])][intval($s['y'])]);
24740 if (isset($this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])])) {
24741 $ref = $this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])];
24744 unset($this->columnForms[$s['col']][intval($s['x'])][intval($s['y'])]);
24747 if (isset($this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])])) {
24748 $ref = $this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])];
24750 unset($this->columnAnnots[$s['col']][intval($s['x'])][intval($s['y'])]);
24775 foreach ($this->columnbuffer as $key => $s) {
24777 if (isset($s['rel_y'])) { // only process position sensitive data
24780 if (isset($this->ColDetails[$s['col']]['max_bottom']) && $this->ColDetails[$s['col']]['max_bottom']) {
24781 $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['col']]['max_bottom'] - ($this->y0));
24795 $this->pages[$this->page] .= $s['s'] . "\n";
24796 if (isset($s['rel_y']) && ($ratio > 1) && ($ratio <= $this->max_colH_correction)) {
24819 foreach ($this->columnbuffer as $key => $s) {
24822 $t = $s['s'];
24831 $clb = $s['y'] + $s['h'];
24833 if (isset($this->ColDetails[$s['col']]['max_bottom']) && $clb > $this->ColDetails[$s['col']]['max_bottom'] || (!isset($this->ColDetails[$s['col']]['max_bottom']) && $clb)) {
24834 $this->ColDetails[$s['col']]['max_bottom'] = $clb;
24844 foreach ($this->columnbuffer as $key => $s) {
24845 if ($s['s'] != 'ACROFORM') {
24846 $this->pages[$this->page] .= $s['s'] . "\n";
24937 $details[$side]['s'] = $cba['s'];
25149 foreach ($this->kwt_buffer as $s) {
25150 $this->pages[$this->page] .= $s['s'] . "\n";
25222 foreach ($this->kwt_buffer as $s) {
25223 $this->pages[$this->page] .= $s['s'] . "\n";
25357 $this->writer->write(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F c %s', ($x + $lx) * Mpdf::SCALE, ($h - ($y + $ry)) * Mpdf::SCALE, ($x + $rx) * Mpdf::SCALE, ($h - ($y + $ly)) * Mpdf::SCALE, ($x + $rx) * Mpdf::SCALE, ($h - $y) * Mpdf::SCALE, $op));
25505 $s = '';
25511 $s .= UtfString::code2utf(0x202C);
25515 $s .= UtfString::code2utf(0x2069);
25522 $s .= UtfString::code2utf(0x2066);
25524 $s .= UtfString::code2utf(0x2067);
25526 $s .= UtfString::code2utf(0x2068);
25530 $s .= UtfString::code2utf(0x202D);
25532 $s .= UtfString::code2utf(0x202E);
25534 $s .= UtfString::code2utf(0x202A);
25536 $s .= UtfString::code2utf(0x202B);
25540 return $s;
25616 $this->subArrMB['s'] = $sarr;
25867 $this->subArrMB['s'] = $sarr;
25890 } elseif (isset($this->subArrMB['s'][$u[0]])) {
25894 if (isset($this->subArrMB['s'][$char])) {
25895 $repl[] = $this->subArrMB['s'][$char];
26049 throw new \Mpdf\MpdfException("HTML contains invalid UTF-8 character(s). See log for further details");
26072 throw new \Mpdf\MpdfException("Text contains invalid UTF-8 character(s)");
26795 $s = '';
26797 $s .= UtfString::code2utf($chardata[$sch][$j]['uni']);
26801 $s = str_replace("&", "&amp;", $s);
26802 $s = str_replace("<", "&lt;", $s);
26803 $s = str_replace(">", "&gt;", $s);
26806 if ($scriptblocks[$sch] == Ucdn::SCRIPT_LATIN && $this->autoVietnamese && preg_match("/([" . $this->scriptToLanguage->getLanguageDelimiters('viet') . "])/u", $s)) {
26807 $o .= '<span lang="vi" class="lang_vi">' . $s . '</span>';
26809 if (preg_match("/[" . $this->scriptToLanguage->getLanguageDelimiters('sindhi') . "]/u", $s)) {
26810 $o .= '<span lang="sd" class="lang_sd">' . $s . '</span>';
26811 } elseif (preg_match("/[" . $this->scriptToLanguage->getLanguageDelimiters('urdu') . "]/u", $s)) {
26812 $o .= '<span lang="ur" class="lang_ur">' . $s . '</span>';
26813 } elseif (preg_match("/[" . $this->scriptToLanguage->getLanguageDelimiters('pashto') . "]/u", $s)) {
26814 $o .= '<span lang="ps" class="lang_ps">' . $s . '</span>';
26815 } elseif (preg_match("/[" . $this->scriptToLanguage->getLanguageDelimiters('persian') . "]/u", $s)) {
26816 $o .= '<span lang="fa" class="lang_fa">' . $s . '</span>';
26818 $o .= '<span lang="' . $this->scriptToLanguage->getLanguageByScript($scriptblocks[$sch]) . '" class="lang_' . $this->scriptToLanguage->getLanguageByScript($scriptblocks[$sch]) . '">' . $s . '</span>';
26821 $o .= $s;
26826 $o .= $s;
26830 $o .= $s;
26903 function ConvertAngle($s, $makepositive = true)
26905 if (preg_match('/([\-]*[0-9\.]+)(deg|grad|rad)/i', $s, $m)) {
26932 $angle = $s + 0;
26993 $html = preg_replace('/<!--.*?-->/s', '', $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);
27011 $html = preg_replace("/[ ]*<dottab\s*[\/]*>[ ]*/", '<dottab />', $html);
27018 $html = preg_replace('/<br \/>\s*/is', "<br />", $html);
27020 $html = preg_replace('/<wbr[ \/]*>\s*/is', "&#173;", $html);
27022 // Preserve '\n's in content between the tags <pre> and </pre>
27029 foreach ($html_a as $s) {
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)) {
27041 array_push($h, $s);
27049 // Preserve '\n's in content between the tags <textarea> and </textarea>
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);
27109 $html = preg_replace('/(<table[^>]*>)\s*(<caption)(.*?<\/caption>)(.*?<\/table>)/si', '\\2 position="top"\\3\\1\\4\\2 position="bottom"\\3', $html); // *TABLES*
27110 $html = preg_replace('/<(h[1-6])([^>]*)(>(?:(?!h[1-6]).)*?<\/\\1>\s*<table)/si', '<\\1\\2 keep-with-table="1"\\3', $html); // *TABLES*
27161 preg_match("/xref\n0 (\d+)\n(.*?)\ntrailer/s", $pdf, $m);
27169 preg_match("/<<\s*\/Type\s*\/Pages\s*\/Kids\s*\[(.*?)\]\s*\/Count/s", $pdf, $m);
27170 preg_match_all("/(\d+) 0 R /s", $m[1], $o);
27175 preg_match("/" . ($obj + 1) . " 0 obj\n<<\s*\/Filter\s*\/FlateDecode\s*\/Length (\d+)>>\nstream\n(.*?)\nendstream\n/s", $pdf, $m);
27177 preg_match("/" . ($obj + 1) . " 0 obj\n<<\s*\/Length (\d+)>>\nstream\n(.*?)\nendstream\n/s", $pdf, $m);
27180 $s = $m[2];
27181 if (!$s) {
27188 $s = $this->protection->rc4($this->protection->objectKey($obj + 1), $s);
27192 $s = gzuncompress($s);
27196 $s = str_replace($search[$k], $replacement[$k], $s);
27200 $s = gzcompress($s);
27204 $s = $this->protection->rc4($this->protection->objectKey($obj + 1), $s);
27207 $newlen = strlen($s);
27212 $newstr = ($obj + 1) . " 0 obj\n<</Filter /FlateDecode /Length " . $newlen . ">>\nstream\n" . $s . "\nendstream\n";
27214 $newstr = ($obj + 1) . " 0 obj\n<</Length " . $newlen . ">>\nstream\n" . $s . "\nendstream\n";
27232 $pdf = preg_replace("/xref\n0 \d+\n.*?\ntrailer/s", $newxref, $pdf);
27235 preg_match("/startxref\n(\d+)\n%%EOF/s", $pdf, $m);
27238 $pdf = preg_replace("/startxref\n(\d+)\n%%EOF/s", "startxref\n" . $startxref . "\n%%EOF", $pdf);
27405 public function _out($s)
27407 $this->writer->write($s);
27430 $html = preg_replace_callback('/\{DATE\s+(.*?)\}/', [$this, 'date_callback'], $html); // mPDF 5.7