Lines Matching +defs:a +defs:e

516 	var $substitute;  // Array of substitution strings e.g. <ttz>112</ttz>
597 var $keep_block_together; // Keep a Block from page-break-inside: avoid
1249 $this->substitute = []; // Array of substitution strings e.g. <ttz>112</ttz>
1383 // Autodetect if mode is a language_country string (en-GB or en_GB or en)
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:
1884 // Define an alias for total number of pages in a group
1902 $a = ['BM' => '/' . $bm];
1904 $a['ca'] = $alpha; // mPDF 5.7.2
1907 $a['CA'] = $alpha; // mPDF 5.7.2
1909 $gs = $this->AddExtGState($a);
2188 $orig_w = $sizesarray['WIDTH'] * Mpdf::SCALE; // in user units i.e. mm
2425 if ($this->writingHTMLfooter || $this->writingHTMLheader) { // Write each (tiles) image rather than use as a pattern
2625 if ($this->writingHTMLfooter || $this->writingHTMLheader) { // Write each (tiles) image rather than use as a pattern
2788 function AddPageByArray($a)
2790 if (!is_array($a)) {
2791 $a = [];
2794 $orientation = (isset($a['orientation']) ? $a['orientation'] : '');
2795 $condition = (isset($a['condition']) ? $a['condition'] : (isset($a['type']) ? $a['type'] : ''));
2796 $resetpagenum = (isset($a['resetpagenum']) ? $a['resetpagenum'] : '');
2797 $pagenumstyle = (isset($a['pagenumstyle']) ? $a['pagenumstyle'] : '');
2798 $suppress = (isset($a['suppress']) ? $a['suppress'] : '');
2799 $mgl = (isset($a['mgl']) ? $a['mgl'] : (isset($a['margin-left']) ? $a['margin-left'] : ''));
2800 $mgr = (isset($a['mgr']) ? $a['mgr'] : (isset($a['margin-right']) ? $a['margin-right'] : ''));
2801 $mgt = (isset($a['mgt']) ? $a['mgt'] : (isset($a['margin-top']) ? $a['margin-top'] : ''));
2802 $mgb = (isset($a['mgb']) ? $a['mgb'] : (isset($a['margin-bottom']) ? $a['margin-bottom'] : ''));
2803 $mgh = (isset($a['mgh']) ? $a['mgh'] : (isset($a['margin-header']) ? $a['margin-header'] : ''));
2804 $mgf = (isset($a['mgf']) ? $a['mgf'] : (isset($a['margin-footer']) ? $a['margin-footer'] : ''));
2805 $ohname = (isset($a['ohname']) ? $a['ohname'] : (isset($a['odd-header-name']) ? $a['odd-header-name'] : ''));
2806 $ehname = (isset($a['ehname']) ? $a['ehname'] : (isset($a['even-header-name']) ? $a['even-header-name'] : ''));
2807 $ofname = (isset($a['ofname']) ? $a['ofname'] : (isset($a['odd-footer-name']) ? $a['odd-footer-name'] : ''));
2808 $efname = (isset($a['efname']) ? $a['efname'] : (isset($a['even-footer-name']) ? $a['even-footer-name'] : ''));
2809 $ohvalue = (isset($a['ohvalue']) ? $a['ohvalue'] : (isset($a['odd-header-value']) ? $a['odd-header-value'] : 0));
2810 $ehvalue = (isset($a['ehvalue']) ? $a['ehvalue'] : (isset($a['even-header-value']) ? $a['even-header-value'] : 0));
2811 $ofvalue = (isset($a['ofvalue']) ? $a['ofvalue'] : (isset($a['odd-footer-value']) ? $a['odd-footer-value'] : 0));
2812 $efvalue = (isset($a['efvalue']) ? $a['efvalue'] : (isset($a['even-footer-value']) ? $a['even-footer-value'] : 0));
2813 $pagesel = (isset($a['pagesel']) ? $a['pagesel'] : (isset($a['pageselector']) ? $a['pageselector'] : ''));
2814 $newformat = (isset($a['newformat']) ? $a['newformat'] : (isset($a['sheet-size']) ? $a['sheet-size'] : ''));
2929 // If next page already exists - i.e background /headers and footers already written
3007 // Don't correct more than once for background DIV containing a Float
3026 // Start a new page
3216 // Only add the headers if it's a new page
3373 } // e.g. rg => RG
3507 // Get width of a single character in the current Core font
3538 // Get width of a single character in the current Non-Core font
3609 // Get width of a string in the current font
3620 $s = preg_replace('/{iteration ([a-zA-Z0-9_]+)}/', '\\1', $s);
3693 // Kashida is set as an absolute length value (already set as a proportion based on useKashida %)
3758 // Draw a line
3773 $a = atan2(($y2 - $y1), ($x2 - $x1));
3774 $b = $a + deg2rad($angle);
3775 $c = $a - deg2rad($angle);
3796 // Draw a rectangle
4055 throw new \Mpdf\MpdfException("Symbol and Zapfdingbats cannot be embedded in mPDF (required for PDFA1-b or PDFX/1-a).");
4059 $this->PDFAXwarnings[] = "Core Adobe font " . ucfirst($family) . " cannot be embedded in mPDF, which is required for PDFA1-b or PDFX/1-a. (Embedded font will be substituted.)";
4118 } // elseif only one font available - set it (assumes if only one font available it will not have a style)
4163 preg_match('/^([a-z_0-9\-]+)([BI]{0,2})$/', $fs, $fas); // Allow "-"
4215 throw new \Mpdf\MpdfException('Core Adobe fonts cannot be embedded in mPDF (required for PDFA1-b or PDFX/1-a) - cannot use option to use core fonts.');
4305 // Create a new internal link
4341 // Put a link on the page
4350 // Output (or return) a string
4485 // Output a string using Text() but does encoding and text reversing of RTL
4526 // Output a cell using Cell() but does encoding and text reversing of RTL
4659 // $useKashida is a % value from CurrentFont/config_fonts.php
4667 // Only use kashida if each allocated kashida width is > 0.01 x width of a tatweel
4674 // At this point kashida is a number representing priority (higher number - higher priority)
4728 * Output a cell
4798 // COLUMNS Update/overwrite the lowest bottom of printing y value for a column
4821 if ($lineBox && isset($lineBox['boxtop']) && $txt) { // i.e. always from WriteFlowingBlock/finishFlowingBlock (but not objects -
5303 } // else use a fraction ($this->baselineS) of CapHeight
5487 // Convert to PDF Text space (thousandths of a unit );
5508 // XAdvance from GPOS - Convert to PDF Text space (thousandths of a unit );
5611 // If any settings require a new Text Group
6324 // Returns the first blocklevel that uses a bgcolor fill
6404 function newFlowingBlock($w, $h, $a = '', $is_table = false, $blockstate = 0, $newblock = true, $blockdir = 'ltr', $table_draft = false)
6406 if (!$a) {
6408 $a = 'R';
6410 $a = 'L';
6419 $this->flowingBlockAttr['align'] = $a;
6600 // This fixes a proven bug...
6815 // If "orphans" in fact is just a final space - ignore this
6839 // but only allow a maximum of $this->jSmaxWordLast and $this->jSmaxCharLast
7149 // Create a dummy entry in the _out/columnBuffer with position sensitive data,
8006 // 1) CJK Overflowing a) punctuation or b) Oikomi
8025 // 1a) Overflow punctuation
8103 // Don't break a URL
8117 // Don't break if HyphenMinus AND (a URL or before a numeral or before a >)
8146 // 8) Break at OBJECT (Break before all objects here - selected objects are moved forward to next line below e.g. dottab)
8156 // If a line-break opportunity found:
8230 // 1) CJK Overflowing a) punctuation or b) Oikomi
8261 // Selected OBJECTS are moved forward to next line, unless they come before a space or U+200B (type='discard')
9245 // This used to resize height to maximum remaining on page ? why. Causes problems when in table and causing a new column
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']
9501 throw new \Mpdf\MpdfException('PDF/A1-b or PDF/X1-a does not permit encryption of documents.');
9509 $standard = 'PDFX/1-a ';
9513 $this->logger->warning(sprintf('PDF could not be generated as it stands as a %s compliant file.', $standard), ['context' => LogContext::PDFA_PDFX]);
9558 // We send to a browser
9655 $mamp = ' If using MAMP, there is a bug in its PHP build causing this.';
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:
9898 $this->PDFAXwarnings[] = "Annotation markers cannot be semi-transparent in PDFA1-b or PDFX/1-a, so they may make underlying text unreadable. (Annotation markers moved to right margin)";
10400 /* When the setAutoTopMargin option is set to pad/stretch, only apply auto header height when a header exists */
10427 /* When the setAutoTopMargin option is set to pad/stretch, only apply auto footer height when a footer exists */
10472 // Draw a line
10480 // add a watermark
10790 throw new \Mpdf\MpdfException("Adobe CJK fonts cannot be embedded in mPDF (required for PDFA1-b and PDFX/1-a).");
10975 // Return either a number (factor) - based on current set fontsize (if % or em) - or exact lineheight (with 'mm' after it)
11010 // Set a (fixed) lineheight to an actual value - either to named fontsize(pts) or default
11075 } // ??? If lineheight is a factor e.g. 1.3 ?? use factor x 1em or ? use 'normal' lineheight * factor
11076 // Could depend on value for $text_height - a draft CSS value as set above for now
11085 // If an inline element has a font-size less than the block element, and the line-height is set as an em or % value
11149 // First, set a "strut" using block font at index $lineBox[-1]
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));
11482 if (substr($path, 0, 3) == "../") { // It is a relative link
11501 } elseif ((strpos($path, ":/") === false || strpos($path, ":/") > 10) && !@is_file($path)) { // It is a local link. Ignore potential file errors
11649 } elseif ($lowertype == 'lower-latin' || $lowertype == 'lower-alpha' || $type == 'a') {
11759 throw new \Mpdf\MpdfException("<tfoot> must precede <tbody> in a table");
11837 if (!is_array($t[0]) && preg_match('/{iteration ([a-zA-Z0-9_]+)}/', $t[0], $m)) {
11863 $align = Arrays::get($tablehf, 'a', null);
13143 * @param bool $close If false leaves buffers etc. in current state, so that it can continue a block etc.
13159 /* Cast $html as a string */
13399 $a = preg_split('/<(.*?)>/ms', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
13400 // ? more accurate regexp that allows e.g. <a name="Silly <name>">
13402 // $a = preg_split ('/<((?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+)>/ms', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
13409 $cnt = count($a);
13411 $e = $a[$i];
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);
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");
13465 $cnt += $this->SubstituteCharsSIP($a, $i, $e);
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);
13578 if (substr($this->cell[$this->row][$this->col]['a'], 0, 1) == 'D') {
13580 $dp = $this->decimal_align[substr($this->cell[$this->row][$this->col]['a'], 0, 2)];
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)) {
13766 preg_match($regexp, $e, $auxiliararray);
13772 if (trim($path) != '' && !(stristr($e, "src=") !== false && substr($path, 0, 4) == 'var:') && substr($path, 0, 1) != '@') {
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);
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);
13842 // If ended with a float, need to move to end page
13934 $this->writingHTMLheader = true; // a FIX to stop pagebreaks etc.
14388 if ($inner_w === 'auto') { // do a first write
14419 if ($inner_h === 'auto') { // do a first write
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
14884 function _borderPadding($a, $b, &$px, &$py)
14889 $x = $a - $px;
14892 if (( (($x + $added) * ($x + $added)) / ($a * $a) + (($y + $added) * ($y + $added)) / ($b * $b) ) <= 1) {
14898 $newx = $b / sqrt((($b * $b) / ($a * $a)) + ( tan($t) * tan($t) ));
14899 $newy = $a / sqrt((($a * $a) / ($b * $b)) + ( (1 / tan($t)) * (1 / tan($t)) ));
14900 $px = max($px, $a - $newx + $added);
15344 // if position:inside (and NOT table) - output now as a textbuffer; (so if next is block, will move to new line)
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') {
15637 case 'a':
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
15941 // As a failsafe - if font has been set but not output to page
15967 // Gets messed up if try and use core fonts inside a paragraph of text which needs to be BiDi re-ordered or OTLdata set
15969 throw new \Mpdf\MpdfException("You cannot use core fonts in a document which contains RTL text.");
16095 if (isset($vetor[7]) and $vetor[7] != '') { // internal target: <a name="anyvalue">
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.)
16186 if ($cell['a'] == 'C' || $this->table[($level + 1)][$objattr['nestedcontent']]['a'] == 'C') {
16188 } elseif ($cell['a'] == 'R' || $this->table[($level + 1)][$objattr['nestedcontent']]['a'] == 'R') {
16245 // i.e. if second inline image on line is higher than first and forces new page
16427 if ($vetor[0] == "\n") { // We are reading a <BR> now turned into newline ("\n")
16923 // Reinstate line above for dotted line divider when block border crosses a page
16987 // Reinstate line below for dotted line divider when block border crosses a page
18132 // Set font size first so that e.g. MARGIN 0.83em works on font size for this element
18175 // If it is a font list, get all font types
18510 case 'VERTICAL-ALIGN': // super and sub only dealt with here e.g. <SUB> and <SUP>
18782 if (preg_match('/[\"\']([a-zA-Z0-9]{4})[\"\']\s*(on|off|\d*){0,1}/', $t, $m)) {
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>";
19069 $line = preg_replace('/{iteration ([a-zA-Z0-9_]+)}/', '\\1', $line);
19434 $a = (ord($s[0]) << 8) + ord($s[1]);
19435 if ($a & (1 << 15)) {
19436 $a = ($a - (1 << 16));
19438 return $a;
19532 // cells List of cells of each rows, cells[i][j] is a cell in the table
19578 if (substr($c['a'], 0, 1) == 'D') {
19632 // If minimum width has already been set by a nested table or inline object (image/form), use it
19643 // If maximum width has already been set by a nested table, use it
19799 // mPDF 5.7.2 Extra min width distributed proportionately to all cells in colspan without a specified width
19820 // mPDF 5.7.4 Extra max width distributed evenly to all cells in colspan without a specified width
19852 // Set a nominal width of 1% for unset columns
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
20085 // If the table width is already set to the maximum width (e.g. nested table), then use maximum column widths exactly
20134 $wi = ($table['w'] - ($wis + $tblbw)); // i.e. extra space to distribute
20153 $wi = ($table['w'] - ($wis + $tblbw)); // i.e. extra space to distribute
20328 // If it is less than 1/20th of the remaining page height to finish the DIV (i.e. DIV padding + table bottom margin)
20433 // this is the extra used in _tableWrite to determine whether to trigger a page change
20535 } elseif (!count($list)) { // no rows in the rowspan have a height specified, so share amongst all rows equally
20549 // If rowspans overlap so that one or more rows do not have a height set...
20550 // i.e. for one or more rows, the only cells (explicit) in that row have rowspan>1
20713 $this->logger->debug('Possible non-wellformed HTML markup in a table', ['context' => LogContext::HTML_MARKUP]);
21939 if (isset($table['a']) and ( $table['w'] < $this->blk[$this->blklvl]['inner_width'])) {
21940 if ($table['a'] == 'C') {
21942 } elseif ($table['a'] == 'R') {
22025 $tablefooter[$i][$js]['a'] = $cell['a'];
22138 // Are there more columns to print on a next page?
22232 if ($tablestartpageno != $this->page) { // IF already broken across a previous pagebreak
22473 if ($this->CurrCol == 0) { // just added a page - possibly with tableheader
22520 $align = $cell['a'];
22777 $tableheader[$i][$j]['a'] = $cell['a'];
22856 if (preg_match('/{iteration ([a-zA-Z0-9_]+)}/', $t[0], $m)) {
22886 if (isset($cell['a']) && $cell['a'] == 'R') {
22888 } elseif (!isset($cell['a']) || $cell['a'] == 'C') {
22967 if (substr($cell['a'], 0, 1) == 'D') {
22969 $this->cellTextAlign = $c['a'] = substr($cell['a'], 2, 1);
22976 if (substr($cell['a'], 2, 1) == 'R') {
22978 } elseif (substr($cell['a'], 2, 1) == 'C') {
23292 // Are there more columns to print on a next page?
23342 // else y is used as set, or =0 i.e. top of page
23360 * Initiate, and Mark a place for the Table of Contents to be inserted
23391 function TOCpagebreakByArray($a)
23393 if (!is_array($a)) {
23394 $a = [];
23396 $tocoutdent = (isset($a['tocoutdent']) ? $a['tocoutdent'] : (isset($a['outdent']) ? $a['outdent'] : ''));
23397 $TOCusePaging = (isset($a['TOCusePaging']) ? $a['TOCusePaging'] : (isset($a['paging']) ? $a['paging'] : true));
23398 $TOCuseLinking = (isset($a['TOCuseLinking']) ? $a['TOCuseLinking'] : (isset($a['links']) ? $a['links'] : ''));
23399 $toc_orientation = (isset($a['toc_orientation']) ? $a['toc_orientation'] : (isset($a['toc-orientation']) ? $a['toc-orientation'] : ''));
23400 $toc_mgl = (isset($a['toc_mgl']) ? $a['toc_mgl'] : (isset($a['toc-margin-left']) ? $a['toc-margin-left'] : ''));
23401 $toc_mgr = (isset($a['toc_mgr']) ? $a['toc_mgr'] : (isset($a['toc-margin-right']) ? $a['toc-margin-right'] : ''));
23402 $toc_mgt = (isset($a['toc_mgt']) ? $a['toc_mgt'] : (isset($a['toc-margin-top']) ? $a['toc-margin-top'] : ''));
23403 $toc_mgb = (isset($a['toc_mgb']) ? $a['toc_mgb'] : (isset($a['toc-margin-bottom']) ? $a['toc-margin-bottom'] : ''));
23404 $toc_mgh = (isset($a['toc_mgh']) ? $a['toc_mgh'] : (isset($a['toc-margin-header']) ? $a['toc-margin-header'] : ''));
23405 $toc_mgf = (isset($a['toc_mgf']) ? $a['toc_mgf'] : (isset($a['toc-margin-footer']) ? $a['toc-margin-footer'] : ''));
23406 $toc_ohname = (isset($a['toc_ohname']) ? $a['toc_ohname'] : (isset($a['toc-odd-header-name']) ? $a['toc-odd-header-name'] : ''));
23407 $toc_ehname = (isset($a['toc_ehname']) ? $a['toc_ehname'] : (isset($a['toc-even-header-name']) ? $a['toc-even-header-name'] : ''));
23408 $toc_ofname = (isset($a['toc_ofname']) ? $a['toc_ofname'] : (isset($a['toc-odd-footer-name']) ? $a['toc-odd-footer-name'] : ''));
23409 $toc_efname = (isset($a['toc_efname']) ? $a['toc_efname'] : (isset($a['toc-even-footer-name']) ? $a['toc-even-footer-name'] : ''));
23410 $toc_ohvalue = (isset($a['toc_ohvalue']) ? $a['toc_ohvalue'] : (isset($a['toc-odd-header-value']) ? $a['toc-odd-header-value'] : 0));
23411 $toc_ehvalue = (isset($a['toc_ehvalue']) ? $a['toc_ehvalue'] : (isset($a['toc-even-header-value']) ? $a['toc-even-header-value'] : 0));
23412 $toc_ofvalue = (isset($a['toc_ofvalue']) ? $a['toc_ofvalue'] : (isset($a['toc-odd-footer-value']) ? $a['toc-odd-footer-value'] : 0));
23413 $toc_efvalue = (isset($a['toc_efvalue']) ? $a['toc_efvalue'] : (isset($a['toc-even-footer-value']) ? $a['toc-even-footer-value'] : 0));
23414 $toc_preHTML = (isset($a['toc_preHTML']) ? $a['toc_preHTML'] : (isset($a['toc-preHTML']) ? $a['toc-preHTML'] : ''));
23415 $toc_postHTML = (isset($a['toc_postHTML']) ? $a['toc_postHTML'] : (isset($a['toc-postHTML']) ? $a['toc-postHTML'] : ''));
23416 $toc_bookmarkText = (isset($a['toc_bookmarkText']) ? $a['toc_bookmarkText'] : (isset($a['toc-bookmarkText']) ? $a['toc-bookmarkText'] : ''));
23417 $resetpagenum = (isset($a['resetpagenum']) ? $a['resetpagenum'] : '');
23418 $pagenumstyle = (isset($a['pagenumstyle']) ? $a['pagenumstyle'] : '');
23419 $suppress = (isset($a['suppress']) ? $a['suppress'] : '');
23420 $orientation = (isset($a['orientation']) ? $a['orientation'] : '');
23421 $mgl = (isset($a['mgl']) ? $a['mgl'] : (isset($a['margin-left']) ? $a['margin-left'] : ''));
23422 $mgr = (isset($a['mgr']) ? $a['mgr'] : (isset($a['margin-right']) ? $a['margin-right'] : ''));
23423 $mgt = (isset($a['mgt']) ? $a['mgt'] : (isset($a['margin-top']) ? $a['margin-top'] : ''));
23424 $mgb = (isset($a['mgb']) ? $a['mgb'] : (isset($a['margin-bottom']) ? $a['margin-bottom'] : ''));
23425 $mgh = (isset($a['mgh']) ? $a['mgh'] : (isset($a['margin-header']) ? $a['margin-header'] : ''));
23426 $mgf = (isset($a['mgf']) ? $a['mgf'] : (isset($a['margin-footer']) ? $a['margin-footer'] : ''));
23427 $ohname = (isset($a['ohname']) ? $a['ohname'] : (isset($a['odd-header-name']) ? $a['odd-header-name'] : ''));
23428 $ehname = (isset($a['ehname']) ? $a['ehname'] : (isset($a['even-header-name']) ? $a['even-header-name'] : ''));
23429 $ofname = (isset($a['ofname']) ? $a['ofname'] : (isset($a['odd-footer-name']) ? $a['odd-footer-name'] : ''));
23430 $efname = (isset($a['efname']) ? $a['efname'] : (isset($a['even-footer-name']) ? $a['even-footer-name'] : ''));
23431 $ohvalue = (isset($a['ohvalue']) ? $a['ohvalue'] : (isset($a['odd-header-value']) ? $a['odd-header-value'] : 0));
23432 $ehvalue = (isset($a['ehvalue']) ? $a['ehvalue'] : (isset($a['even-header-value']) ? $a['even-header-value'] : 0));
23433 $ofvalue = (isset($a['ofvalue']) ? $a['ofvalue'] : (isset($a['odd-footer-value']) ? $a['odd-footer-value'] : 0));
23434 $efvalue = (isset($a['efvalue']) ? $a['efvalue'] : (isset($a['even-footer-value']) ? $a['even-footer-value'] : 0));
23435 $toc_id = (isset($a['toc_id']) ? $a['toc_id'] : (isset($a['name']) ? $a['name'] : 0));
23436 $pagesel = (isset($a['pagesel']) ? $a['pagesel'] : (isset($a['pageselector']) ? $a['pageselector'] : ''));
23437 $toc_pagesel = (isset($a['toc_pagesel']) ? $a['toc_pagesel'] : (isset($a['toc-pageselector']) ? $a['toc-pageselector'] : ''));
23438 $sheetsize = (isset($a['sheetsize']) ? $a['sheetsize'] : (isset($a['sheet-size']) ? $a['sheet-size'] : ''));
23439 $toc_sheetsize = (isset($a['toc_sheetsize']) ? $a['toc_sheetsize'] : (isset($a['toc-sheet-size']) ? $a['toc-sheet-size'] : ''));
23446 // Start a new page
23451 // Don't add a page
23514 // move a page/pages EARLIER in the document
23772 // move a page/pages EARLIER in the document
23980 // Added function to add a reference "Elephants. See Chickens"
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.
24048 $this->Reference[$i]['uf'] = $txt; // Unformatted e.g. pure utf-8 encoded characters, no mark-up/tags
24084 usort($this->Reference, function ($a, $b) {
24085 return strcoll(strtolower($a['uf']), strtolower($b['uf']));
24107 // Sub-entries e.g. Mammals:elephant
24108 // But allow for tags e.g. <b>Mammal</b>:elephants
24109 $a = preg_split('/(<.*?>)/', $txt, -1, PREG_SPLIT_DELIM_CAPTURE);
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;
24157 $html .= '<a class="mpdf_index_link" href="@' . $range_start . '">';
24161 $html .= '</a>';
24166 $html .= '<a class="mpdf_index_link" href="@' . $ppp[$zi - 1] . '">';
24170 $html .= '</a>';
24176 $html .= '<a class="mpdf_index_link" href="@' . $ppp[$zi - 1] . '">';
24180 $html .= '</a>';
24191 $html .= '<a class="mpdf_index_link" href="@' . $range_start . '">';
24196 $html .= '</a>';
24200 $html .= '<a class="mpdf_index_link" href="@' . $range_end . '">';
24204 $html .= '</a>';
24210 $html .= '</a>';
24215 $html .= '<a class="mpdf_index_link" href="@' . $ppp[(count($ppp) - 1)] . '">';
24219 $html .= '</a>';
24372 // Set position on a column
24426 // Columns ended (but page not ended) -> try to match all columns - unless disabled by using a custom column-break
24732 // otherwise triggers for all entries in column buffer (.e.g. formatting) and makes below adjustments more than once
25462 // NB Returned $chunk may be a shorter string (with adjusted $cOTLdata) by removal of LRE, RLE etc embedding codes.
25509 // PDF comes before PDI to close isolate-override (e.g. "LRILROPDFPDI")
25520 // LRI comes before LRO to open isolate-override (e.g. "LRILROPDFPDI")
25558 $a = preg_split('/(<.*?>)/ms', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
25560 foreach ($a as $i => $e) {
25562 $e = strtr($e, $this->substitute);
25564 $html .= $e;
25615 $this->subArrMB['a'] = $aarr;
25622 if (($char > 127 || ($flag == 1 && $char == 32)) && $char != 173 && (!isset($this->subArrMB['a'][$char]) || ($flag == 1 && $char == 32)) && ($char < 1536 || ($char > 1791 && $char < 2304) || $char > 3455)) {
25767 // Check if current CJK font has a ext-B related font
25866 $this->subArrMB['a'] = $aarr;
25870 if (isset($this->subArrMB['a'][$u[0]])) {
25874 if (isset($this->subArrMB['a'][$char])) {
25875 $repl[] = $this->subArrMB['a'][$char];
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.
26032 $a = @iconv('UTF-8', 'UTF-8', $html);
26038 $pos = $start = strlen($a);
26158 $size /= $k; // in case resized in a table
26227 // draw a vertical bar
26442 // draw a vertical bar
26502 $size /= $k; // in case resized in a table
26731 $a = preg_split('/<(.*?)>/ms', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
26732 foreach ($a as $i => $e) {
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);
26764 // Start a new subchunk
26835 $a[$i] = $o;
26837 $a[$i] = '<' . $e . '>';
26841 $n = implode('', $a);
26850 function columnAdjustAdd($type, $k, $xadj, $yadj, $a, $b, $c = 0, $d = 0, $e = 0, $f = 0)
26854 $a += ($xadj * $k);
26857 return 'BT ' . sprintf('%.3F %.3F', $a, $b) . ' Td';
26861 $a += ($xadj * $k);
26864 return sprintf('%.3F %.3F %.3F %.3F', $a, $b, $c, $d) . ' re';
26868 $a += ($xadj * $k);
26871 return sprintf('%.3F %.3F l', $a, $b);
26878 return sprintf('q %.3F 0 0 %.3F %.3F %.3F', $a, $b, $c, $d) . ' cm /' . $e;
26882 $a += ($xadj * $k);
26885 return sprintf('%.3F %.3F m', $a, $b);
26889 $a += ($xadj * $k);
26893 $e += ($xadj * $k);
26896 return sprintf('%.3F %.3F %.3F %.3F %.3F %.3F', $a, $b, $c, $d, $e, $f) . ' c';
26957 'mPDF will not process HTML with disabled pcre.backtrack_limit to prevent unexpected behaviours, please set a positive backtrack limit.',
27054 // Converts < to &lt; when not a tag
27055 $html = preg_replace('/<([^!\/a-zA-Z_:])/i', '&lt;\\1', $html); // mPDF 5.7.3
27073 // Fix self-closing tags that don't include a space between the tag name and the closing slash
27078 $temp[2][$iterator] = preg_replace('/<([^!\/a-zA-Z_:])/', '&lt;\\1', $temp[2][$iterator]); // mPDF 5.7.2 // mPDF 5.7.3
27114 $html = preg_replace("/(&#[x]{0,1}[0-9a-f]{1,5})</i", "\\1;<", $html);
27244 // We send to a browser
27375 * This function takes the last comma or dot (if any) to make a clean float, ignoring thousand separator, currency or any other letter