Lines Matching refs:mpdf

36 	public $mpdf;
177 Mpdf $mpdf,
187 $this->mpdf = $mpdf;
218 $this->kp = 72 / $mpdf->img_dpi; // constant To convert pixels to pts/PDF units
242 'font-family' => $mpdf->default_font,
243 'font-size' => $mpdf->default_font_size, // ****** this is pts
268 $w = $this->sizeConverter->convert($wset, $this->svg_info['w'] * (25.4 / $this->mpdf->dpi), $this->mpdf->FontSize, false);
269 $h = $this->sizeConverter->convert($hset, $this->svg_info['h'] * (25.4 / $this->mpdf->dpi), $this->mpdf->FontSize, false);
274 $w *= 1 / (25.4 / $this->mpdf->dpi);
275 $h *= 1 / (25.4 / $this->mpdf->dpi);
281 $srcpath = $this->mpdf->GetFullPath($srcpath);
285 // mPDF 6 Added $this->mpdf->interpolateImages
286 $info = $this->imageProcessor->getImage($srcpath, true, false, $orig_srcpath, $this->mpdf->interpolateImages);
372 $n = count($this->mpdf->gradients) + 1;
775 $this->mpdf->gradients[$n]['stops'][] = [
788 $this->mpdf->gradients[$n]['coords'] = [$grx1, $gry1, $grx2, $gry2];
790 $this->mpdf->gradients[$n]['colorspace'] = $gradient_info['colorspace'];
792 $this->mpdf->gradients[$n]['type'] = 2;
793 $this->mpdf->gradients[$n]['fo'] = true;
795 $this->mpdf->gradients[$n]['extend'] = ['true', 'true'];
797 $this->mpdf->gradients[$n]['trans'] = true;
1004 $this->mpdf->gradients[$n]['stops'][] = [
1019 $this->mpdf->gradients[$n]['coords'] = [$grx1, $gry1, $grx2, $gry2, abs($grr), abs($grir)];
1021 $this->mpdf->gradients[$n]['colorspace'] = $gradient_info['colorspace'];
1023 $this->mpdf->gradients[$n]['type'] = 3;
1024 $this->mpdf->gradients[$n]['fo'] = true;
1026 $this->mpdf->gradients[$n]['extend'] = ['true', 'true'];
1028 $this->mpdf->gradients[$n]['trans'] = true;
1077 $svg_w = $svg_h = $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'];
1370 $col = $this->colorConverter->convert($critere_style['color'], $this->mpdf->PDFAXwarnings);
1378 $path_style .= $this->mpdf->SetFColor($col, true) . ' ';
1382 $col = $this->colorConverter->convert($critere_style['fill'], $this->mpdf->PDFAXwarnings);
1390 $path_style .= $this->mpdf->SetFColor($col, true) . ' ';
1411 $col = $this->colorConverter->convert($critere_style['color'], $this->mpdf->PDFAXwarnings);
1419 $path_style .= $this->mpdf->SetDColor($col, true) . ' ';
1425 $col = $this->colorConverter->convert($critere_style['stroke'], $this->mpdf->PDFAXwarnings);
1435 $path_style .= $this->mpdf->SetDColor($col, true) . ' ';
1517 $gs = $this->mpdf->AddExtGState(['ca' => $opacity, 'BM' => '/Normal']);
1518 $this->mpdf->extgstates[$gs]['fo'] = true;
1533 $gs = $this->mpdf->AddExtGState(['CA' => $opacity, 'BM' => '/Normal']);
1534 $this->mpdf->extgstates[$gs]['fo'] = true;
2193 // e.g. $w = $this->ConvertSVGSizePixels($arguments['w'],$this->svg_info['w']*(25.4/$this->mpdf->dpi));
2205 $maxsize *= (25.4 / $this->mpdf->dpi); // convert pixels to mm
2206 $fontsize = $this->mpdf->FontSize / $this->kf;
2209 $size = $this->sizeConverter->convert($size, $maxsize, $fontsize, false) * 1 / (25.4 / $this->mpdf->dpi);
2220 $maxsize = $this->mpdf->FontSize;
2396 $fontsize = $current_style['font-size'] * $this->mpdf->dpi / 72;
2441 $gs = $this->mpdf->AddExtGState(['ca' => $fopacity, 'CA' => $sopacity, 'BM' => '/Normal']);
2442 $this->mpdf->extgstates[$gs]['fo'] = true;
2447 $col = $this->colorConverter->convert($current_style['fill'], $this->mpdf->PDFAXwarnings);
2448 $fillstr = $this->mpdf->SetFColor($col, true);
2455 $scol = $this->colorConverter->convert($current_style['stroke'], $this->mpdf->PDFAXwarnings);
2457 $strokestr .= $this->mpdf->SetDColor($scol, true) . ' ';
2496 $txt = $this->mpdf->purify_utf8_text($txt);
2498 if ($this->mpdf->text_input_as_HTML) {
2499 $txt = $this->mpdf->all_entities_to_utf8($txt);
2584 $current_style['font-family'] = $this->mpdf->SetFont($current_style['font-family'], $style, $size, false);
2585 $this->mpdf->CurrentFont['fo'] = true;
2617 $gs = $this->mpdf->AddExtGState(['ca' => $fopacity, 'CA' => $sopacity, 'BM' => '/Normal']);
2618 $this->mpdf->extgstates[$gs]['fo'] = true;
2624 $col = $this->colorConverter->convert($current_style['fill'], $this->mpdf->PDFAXwarnings);
2625 $fillstr = $this->mpdf->SetFColor($col, true);
2632 $scol = $this->colorConverter->convert($current_style['stroke'], $this->mpdf->PDFAXwarnings);
2635 $strokestr .= $this->mpdf->SetDColor($scol, true) . ' ';
2671 $txt = $this->mpdf->purify_utf8_text($txt);
2673 if ($this->mpdf->text_input_as_HTML) {
2674 $txt = $this->mpdf->all_entities_to_utf8($txt);
2677 if ($this->mpdf->usingCoreFont) {
2678 $txt = mb_convert_encoding($txt, $this->mpdf->mb_enc, 'UTF-8');
2681 if (preg_match("/([" . $this->mpdf->pregRTLchars . "])/u", $txt)) {
2682 $this->mpdf->biDirectional = true;
2686 $save_OTLtags = $this->mpdf->OTLtags;
2687 $this->mpdf->OTLtags = [];
2689 if ($this->mpdf->useKerning) {
2691 if ($this->mpdf->CurrentFont['haskernGPOS']) {
2693 if (isset($this->mpdf->OTLtags['Plus'])) {
2694 $this->mpdf->OTLtags['Plus'] .= ' kern';
2696 $this->mpdf->OTLtags['Plus'] = ' kern';
2705 if (isset($this->mpdf->CurrentFont['useOTL']) && $this->mpdf->CurrentFont['useOTL']) {
2706 $txt = $this->otl->applyOTL($txt, $this->mpdf->CurrentFont['useOTL']);
2710 $this->mpdf->OTLtags = $save_OTLtags;
2712 $this->mpdf->magic_reverse_dir($txt, $this->mpdf->directionality, $OTLdata);
2714 $this->mpdf->CurrentFont['used'] = true;
2716 $sw = $this->mpdf->GetStringWidth($txt, true, $OTLdata, $textvar); // also adds characters to subset
2719 $this->textlength = $sw * 1 / (25.4 / $this->mpdf->dpi);
2725 $aixextra = sprintf(' /F%d %.3F Tf %s %s Tr %s %s ', $this->mpdf->CurrentFont['i'], $this->mpdf->FontSizePt, $opacitystr, $render, $fillstr, $strokestr);
2728 $path_cmd .= $this->mpdf->Text($pdfx, $pdfy, $txt, $OTLdata, $textvar, $aixextra, 'SVG', true);
2734 $this->mpdf->SetFontSize($current_style['font-size-parent']);
2747 $this->mpdf->SetFont($prev_style['font-family'], $style, $size, false);
2889 $this->mpdf->SetFont('', '', $current_style['font-size'], false);
2944 $this->mpdf->SetFont('', '', $current_style['font-size'], false);
2962 if (isset($this->mpdf->fonttrans[$v]) && $this->mpdf->fonttrans[$v]) {
2963 $v = $this->mpdf->fonttrans[$v];
2965 if ((!$this->mpdf->usingCoreFont && in_array($v, $this->mpdf->available_unifonts)) ||
2966 ($this->mpdf->usingCoreFont && in_array($v, ['courier', 'times', 'helvetica', 'arial'])) ||
2980 if (isset($this->mpdf->fonttrans[$v]) && $this->mpdf->fonttrans[$v]) {
2981 $v = $this->mpdf->fonttrans[$v];
2983 if (in_array($v, $this->mpdf->sans_fonts) || in_array($v, $this->mpdf->serif_fonts) || in_array($v, $this->mpdf->mono_fonts) || isset($this->svg_font[$v][$svgfontstyle])) { // mPDF 6
3012 * See: https://github.com/mpdf/mpdf/issues/450
3108 if ($this->mpdf->svgAutoFont) {
3332 if ($this->mpdf->onlyCoreFonts) {
3341 $e = $this->mpdf->lesser_entity_decode($e);
3343 $earr = $this->mpdf->UTF8StringToArray($e, false);
3378 if ($scriptblocks[$sch] > 0 && $scriptblocks[$sch] != $this->mpdf->baseScript && $scriptblocks[$sch + 1] == $this->mpdf->baseScript) {
3406 if ($scriptblocks[$sch] == Ucdn::SCRIPT_LATIN && $this->mpdf->autoVietnamese && preg_match("/([" . $this->scriptToLanguage->getLanguageDelimiters('viet') . "])/u", $s)) {
3409 elseif ($scriptblocks[$sch] == Ucdn::SCRIPT_ARABIC && $this->mpdf->autoArabic) {
3418 } elseif ($this->mpdf->baseScript != Ucdn::SCRIPT_ARABIC && $this->scriptToLanguage->getLanguageByScript($scriptblocks[$sch])) {
3422 elseif ($scriptblocks[$sch] > 0 && $scriptblocks[$sch] != $this->mpdf->baseScript && $this->scriptToLanguage->getLanguageByScript($scriptblocks[$sch])) {
3579 $col = $this->colorConverter->convert($color, $this->mpdf->PDFAXwarnings);
3581 $col = $this->colorConverter->convert('#000000', $this->mpdf->PDFAXwarnings);
3899 if ($this->mpdf->svgClasses && isset($attribs['class']) && $attribs['class']) {
3911 if ($this->mpdf->svgAutoFont && isset($attribs['lang']) && $attribs['lang']) {
3912 if (!$this->mpdf->usingCoreFont) {
3913 if ($attribs['lang'] != $this->mpdf->default_lang) {
3914 list ($coreSuitable, $mpdf_unifont) = $this->languageToFont->getLanguageOptions($attribs['lang'], $this->mpdf->useAdobeCJK);
3965 if ($this->mpdf->svgClasses && isset($attribs['class']) && $attribs['class']) {
3977 if ($this->mpdf->svgAutoFont && isset($attribs['lang']) && $attribs['lang']) {
3978 if (!$this->mpdf->usingCoreFont) {
3979 if ($attribs['lang'] != $this->mpdf->default_lang) {
3980 list ($coreSuitable, $mpdf_unifont) = $this->languageToFont->getLanguageOptions($attribs['lang'], $this->mpdf->useAdobeCJK);