Lines Matching refs:mpdf

11 	private $mpdf;
78 public function __construct(Mpdf $mpdf, SizeConverter $sizeConverter)
80 $this->mpdf = $mpdf;
166 $this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
202 $this->TOCmark = $this->mpdf->page;
269 if (($this->mpdf->mirrorMargins) && (($this->mpdf->page) % 2 == 0)) { // EVEN
270 if ($this->mpdf->ColActive) {
271 if (count($this->mpdf->columnbuffer)) {
272 $this->mpdf->printcolumnbuffer();
275 $this->mpdf->AddPage($this->mpdf->CurOrientation, '', $resetpagenum, $pagenumstyle, $suppress);
277 $this->mpdf->PageNumSubstitutions[] = ['from' => $this->mpdf->page, 'reset' => $resetpagenum, 'type' => $pagenumstyle, 'suppress' => $suppress];
280 $this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
289 $this->TOCmark = $this->mpdf->page;
310 * See https://github.com/mpdf/mpdf/issues/642
335 if ($this->mpdf->ColActive) {
336 $this->mpdf->SetColumns(0);
338 if (($this->mpdf->mirrorMargins) && (($this->mpdf->page) % 2 == 1)) { // ODD
339 $this->mpdf->AddPage($this->mpdf->CurOrientation);
423 $toc_orientation = $this->mpdf->DefOrientation;
427 list($tp_pagenumstyle, $tp_suppress, $tp_reset) = $this->mpdf->docPageSettings($toc_page - 1);
439 $this->mpdf->AddPage($toc_orientation, '', $tp_reset, $tp_pagenumstyle, $tp_suppress, $toc_mgl, $toc_mgr, $toc_mgt, $toc_mgb, $toc_mgh, $toc_mgf, $toc_ohname, $toc_ehname, $toc_ofname, $toc_efname, $toc_ohvalue, $toc_ehvalue, $toc_ofvalue, $toc_efvalue, $toc_page_selector, $toc_sheet_size); // mPDF 6
441 $this->mpdf->writingToC = true; // mPDF 5.6.38
446 * @see https://github.com/mpdf/mpdf/issues/792
447 * @see https://github.com/mpdf/mpdf/issues/777
450 $this->mpdf->PageNumSubstitutions = array_map(function ($sub) {
453 }, $tocClassClone->mpdf->PageNumSubstitutions);
457 $tocstart = count($this->mpdf->pages);
459 $this->mpdf->WriteHTML($toc_preHTML);
482 $html .= '<span class="mpdf_toc_p_level_' . $t['l'] . '">' . $this->mpdf->docPageNum($t['p']) . '</span>';
491 $this->mpdf->WriteHTML($html);
494 $this->mpdf->WriteHTML($toc_postHTML);
496 $this->mpdf->writingToC = false; // mPDF 5.6.38
497 $this->mpdf->AddPage($toc_orientation, 'E');
499 $n_toc = $this->mpdf->page - $tocstart + 1;
503 $TOC_end = $this->mpdf->page;
507 $this->m_TOC[$toc_id]['end'] = $this->mpdf->page;
514 $s .= $this->mpdf->PrintBodyBackgrounds();
516 $s .= $this->mpdf->PrintPageBackgrounds();
517 $this->mpdf->pages[$this->mpdf->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->mpdf->uniqstr . ')/', "\n" . $s . "\n" . '\\1', $this->mpdf->pages[$this->mpdf->page]);
518 $this->mpdf->pageBackgrounds = [];
521 $this->mpdf->InFooter = true;
522 $this->mpdf->Footer();
523 $this->mpdf->InFooter = false;
563 $this->mpdf->MovePages($toc_page, $tocstart, $tocend);
564 $this->mpdf->pgsIns[$toc_page] = $tocend - $tocstart + 1;
570 foreach ($this->mpdf->BMoutlines as $i => $o) {
575 $txt = $this->mpdf->purify_utf8_text($toc_bookmarkText);
576 if ($this->mpdf->text_input_as_HTML) {
577 $txt = $this->mpdf->all_entities_to_utf8($txt);
580 array_splice($this->mpdf->BMoutlines, ($insert + 1), 0, $newBookmark);
587 unset($this->mpdf->pages[count($this->mpdf->pages)]);
588 $this->mpdf->page--; // Reset page pointer
594 $this->mpdf->PageNumSubstitutions = $tocClassClone->mpdf->PageNumSubstitutions;
675 $this->m_TOC[$toc_id]['TOC_margin_right'] = $this->sizeConverter->convert($attr['TOC-MARGIN-RIGHT'], $this->mpdf->w, $this->mpdf->FontSize, false);
678 $this->m_TOC[$toc_id]['TOC_margin_left'] = $this->sizeConverter->convert($attr['TOC-MARGIN-LEFT'], $this->mpdf->w, $this->mpdf->FontSize, false);
681 $this->m_TOC[$toc_id]['TOC_margin_top'] = $this->sizeConverter->convert($attr['TOC-MARGIN-TOP'], $this->mpdf->w, $this->mpdf->FontSize, false);
684 $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->sizeConverter->convert($attr['TOC-MARGIN-BOTTOM'], $this->mpdf->w, $this->mpdf->FontSize, false);
687 $this->m_TOC[$toc_id]['TOC_margin_header'] = $this->sizeConverter->convert($attr['TOC-MARGIN-HEADER'], $this->mpdf->w, $this->mpdf->FontSize, false);
690 $this->m_TOC[$toc_id]['TOC_margin_footer'] = $this->sizeConverter->convert($attr['TOC-MARGIN-FOOTER'], $this->mpdf->w, $this->mpdf->FontSize, false);
787 $this->TOC_margin_right = $this->sizeConverter->convert($attr['TOC-MARGIN-RIGHT'], $this->mpdf->w, $this->mpdf->FontSize, false);
790 $this->TOC_margin_left = $this->sizeConverter->convert($attr['TOC-MARGIN-LEFT'], $this->mpdf->w, $this->mpdf->FontSize, false);
793 $this->TOC_margin_top = $this->sizeConverter->convert($attr['TOC-MARGIN-TOP'], $this->mpdf->w, $this->mpdf->FontSize, false);
796 $this->TOC_margin_bottom = $this->sizeConverter->convert($attr['TOC-MARGIN-BOTTOM'], $this->mpdf->w, $this->mpdf->FontSize, false);
799 $this->TOC_margin_header = $this->sizeConverter->convert($attr['TOC-MARGIN-HEADER'], $this->mpdf->w, $this->mpdf->FontSize, false);
802 $this->TOC_margin_footer = $this->sizeConverter->convert($attr['TOC-MARGIN-FOOTER'], $this->mpdf->w, $this->mpdf->FontSize, false);
876 if ($this->mpdf->y == $this->mpdf->tMargin && (!$this->mpdf->mirrorMargins || ($this->mpdf->mirrorMargins && $this->mpdf->page % 2 == 1))) {
878 $this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
880 $this->TOCmark = $this->mpdf->page;
883 if ($this->mpdf->page == 1 && count($this->mpdf->PageNumSubstitutions) == 0) {
899 $this->mpdf->PageNumSubstitutions[] = ['from' => 1, 'reset' => $resetpagenum, 'type' => $pagenumstyle, 'suppress' => $suppress];