Lines Matching refs:this

80 		$this->mpdf = $mpdf;
81 $this->sizeConverter = $sizeConverter;
83 $this->_toc = [];
84 $this->TOCmark = 0;
85 $this->m_TOC = [];
93 $this->tocTocPaintBegun = true;
166 $this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
167 $this->m_TOC[$toc_id]['TOCoutdent'] = $tocoutdent;
168 $this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation;
169 $this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking;
170 $this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging;
173 $this->m_TOC[$toc_id]['TOCpreHTML'] = $toc_preHTML;
176 $this->m_TOC[$toc_id]['TOCpostHTML'] = $toc_postHTML;
179 $this->m_TOC[$toc_id]['TOCbookmarkText'] = $toc_bookmarkText;
182 $this->m_TOC[$toc_id]['TOC_margin_left'] = $toc_mgl;
183 $this->m_TOC[$toc_id]['TOC_margin_right'] = $toc_mgr;
184 $this->m_TOC[$toc_id]['TOC_margin_top'] = $toc_mgt;
185 $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $toc_mgb;
186 $this->m_TOC[$toc_id]['TOC_margin_header'] = $toc_mgh;
187 $this->m_TOC[$toc_id]['TOC_margin_footer'] = $toc_mgf;
188 $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $toc_ohname;
189 $this->m_TOC[$toc_id]['TOC_even_header_name'] = $toc_ehname;
190 $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $toc_ofname;
191 $this->m_TOC[$toc_id]['TOC_even_footer_name'] = $toc_efname;
192 $this->m_TOC[$toc_id]['TOC_odd_header_value'] = $toc_ohvalue;
193 $this->m_TOC[$toc_id]['TOC_even_header_value'] = $toc_ehvalue;
194 $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $toc_ofvalue;
195 $this->m_TOC[$toc_id]['TOC_even_footer_value'] = $toc_efvalue;
196 $this->m_TOC[$toc_id]['TOC_page_selector'] = $toc_pagesel;
197 $this->m_TOC[$toc_id]['TOC_resetpagenum'] = $toc_resetpagenum; // mPDF 6
198 $this->m_TOC[$toc_id]['TOC_pagenumstyle'] = $toc_pagenumstyle; // mPDF 6
199 $this->m_TOC[$toc_id]['TOC_suppress'] = $toc_suppress; // mPDF 6
200 $this->m_TOC[$toc_id]['TOCsheetsize'] = $toc_sheetsize;
202 $this->TOCmark = $this->mpdf->page;
203 $this->TOCoutdent = $tocoutdent;
204 $this->TOCorientation = $toc_orientation;
205 $this->TOCuseLinking = $TOCuseLinking;
206 $this->TOCusePaging = $TOCusePaging;
209 $this->TOCpreHTML = $toc_preHTML;
212 $this->TOCpostHTML = $toc_postHTML;
215 $this->TOCbookmarkText = $toc_bookmarkText;
218 $this->TOC_margin_left = $toc_mgl;
219 $this->TOC_margin_right = $toc_mgr;
220 $this->TOC_margin_top = $toc_mgt;
221 $this->TOC_margin_bottom = $toc_mgb;
222 $this->TOC_margin_header = $toc_mgh;
223 $this->TOC_margin_footer = $toc_mgf;
224 $this->TOC_odd_header_name = $toc_ohname;
225 $this->TOC_even_header_name = $toc_ehname;
226 $this->TOC_odd_footer_name = $toc_ofname;
227 $this->TOC_even_footer_name = $toc_efname;
228 $this->TOC_odd_header_value = $toc_ohvalue;
229 $this->TOC_even_header_value = $toc_ehvalue;
230 $this->TOC_odd_footer_value = $toc_ofvalue;
231 $this->TOC_even_footer_value = $toc_efvalue;
232 $this->TOC_page_selector = $toc_pagesel;
233 $this->TOC_resetpagenum = $toc_resetpagenum; // mPDF 6
234 $this->TOC_pagenumstyle = $toc_pagenumstyle; // mPDF 6
235 $this->TOC_suppress = $toc_suppress; // mPDF 6
236 $this->TOCsheetsize = $toc_sheetsize;
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;
281 $this->m_TOC[$toc_id]['TOCoutdent'] = $tocoutdent;
282 $this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation;
283 $this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking;
284 $this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging;
285 $this->m_TOC[$toc_id]['TOC_resetpagenum'] = $toc_resetpagenum; // mPDF 6
286 $this->m_TOC[$toc_id]['TOC_pagenumstyle'] = $toc_pagenumstyle; // mPDF 6
287 $this->m_TOC[$toc_id]['TOC_suppress'] = $toc_suppress; // mPDF 6
289 $this->TOCmark = $this->mpdf->page;
290 $this->TOCoutdent = $tocoutdent;
291 $this->TOCorientation = $toc_orientation;
292 $this->TOCuseLinking = $TOCuseLinking;
293 $this->TOCusePaging = $TOCusePaging;
294 $this->TOC_resetpagenum = $toc_resetpagenum; // mPDF 6
295 $this->TOC_pagenumstyle = $toc_pagenumstyle; // mPDF 6
296 $this->TOC_suppress = $toc_suppress; // mPDF 6
305 * To do this, the current class is deep cloned and then the TOC functionality run. The correct page
312 if (!$this->tocTocPaintBegun) {
314 $tocClassClone = $copier->copy($this);
317 $this->_toc = $tocClassClone->_toc;
321 if ($this->TOCmark) {
324 $notocs += count($this->m_TOC);
330 if (count($this->m_TOC)) {
331 reset($this->m_TOC);
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);
346 if ($toci == 0 && $this->TOCmark) {
348 $toc_page = $this->TOCmark;
349 $tocoutdent = $this->TOCoutdent;
350 $toc_orientation = $this->TOCorientation;
351 $TOCuseLinking = $this->TOCuseLinking;
352 $TOCusePaging = $this->TOCusePaging;
353 $toc_preHTML = $this->TOCpreHTML;
354 $toc_postHTML = $this->TOCpostHTML;
355 $toc_bookmarkText = $this->TOCbookmarkText;
356 $toc_mgl = $this->TOC_margin_left;
357 $toc_mgr = $this->TOC_margin_right;
358 $toc_mgt = $this->TOC_margin_top;
359 $toc_mgb = $this->TOC_margin_bottom;
360 $toc_mgh = $this->TOC_margin_header;
361 $toc_mgf = $this->TOC_margin_footer;
362 $toc_ohname = $this->TOC_odd_header_name;
363 $toc_ehname = $this->TOC_even_header_name;
364 $toc_ofname = $this->TOC_odd_footer_name;
365 $toc_efname = $this->TOC_even_footer_name;
366 $toc_ohvalue = $this->TOC_odd_header_value;
367 $toc_ehvalue = $this->TOC_even_header_value;
368 $toc_ofvalue = $this->TOC_odd_footer_value;
369 $toc_efvalue = $this->TOC_even_footer_value;
370 $toc_page_selector = $this->TOC_page_selector;
371 $toc_resetpagenum = $this->TOC_resetpagenum; // mPDF 6
372 $toc_pagenumstyle = $this->TOC_pagenumstyle; // mPDF 6
373 $toc_suppress = $this->TOC_suppress; // mPDF 6
374 $toc_sheet_size = (isset($this->TOCsheetsize) ? $this->TOCsheetsize : '');
376 $arr = current($this->m_TOC);
378 $toc_id = key($this->m_TOC);
379 $toc_page = $this->m_TOC[$toc_id]['TOCmark'];
380 $tocoutdent = $this->m_TOC[$toc_id]['TOCoutdent'];
381 $toc_orientation = $this->m_TOC[$toc_id]['TOCorientation'];
382 $TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking'];
383 $TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging'];
384 if (isset($this->m_TOC[$toc_id]['TOCpreHTML'])) {
385 $toc_preHTML = $this->m_TOC[$toc_id]['TOCpreHTML'];
389 if (isset($this->m_TOC[$toc_id]['TOCpostHTML'])) {
390 $toc_postHTML = $this->m_TOC[$toc_id]['TOCpostHTML'];
394 if (isset($this->m_TOC[$toc_id]['TOCbookmarkText'])) {
395 $toc_bookmarkText = $this->m_TOC[$toc_id]['TOCbookmarkText'];
399 $toc_mgl = $this->m_TOC[$toc_id]['TOC_margin_left'];
400 $toc_mgr = $this->m_TOC[$toc_id]['TOC_margin_right'];
401 $toc_mgt = $this->m_TOC[$toc_id]['TOC_margin_top'];
402 $toc_mgb = $this->m_TOC[$toc_id]['TOC_margin_bottom'];
403 $toc_mgh = $this->m_TOC[$toc_id]['TOC_margin_header'];
404 $toc_mgf = $this->m_TOC[$toc_id]['TOC_margin_footer'];
405 $toc_ohname = $this->m_TOC[$toc_id]['TOC_odd_header_name'];
406 $toc_ehname = $this->m_TOC[$toc_id]['TOC_even_header_name'];
407 $toc_ofname = $this->m_TOC[$toc_id]['TOC_odd_footer_name'];
408 $toc_efname = $this->m_TOC[$toc_id]['TOC_even_footer_name'];
409 $toc_ohvalue = $this->m_TOC[$toc_id]['TOC_odd_header_value'];
410 $toc_ehvalue = $this->m_TOC[$toc_id]['TOC_even_header_value'];
411 $toc_ofvalue = $this->m_TOC[$toc_id]['TOC_odd_footer_value'];
412 $toc_efvalue = $this->m_TOC[$toc_id]['TOC_even_footer_value'];
413 $toc_page_selector = $this->m_TOC[$toc_id]['TOC_page_selector'];
414 $toc_resetpagenum = $this->m_TOC[$toc_id]['TOC_resetpagenum']; // mPDF 6
415 $toc_pagenumstyle = $this->m_TOC[$toc_id]['TOC_pagenumstyle']; // mPDF 6
416 $toc_suppress = $this->m_TOC[$toc_id]['TOC_suppress']; // mPDF 6
417 $toc_sheet_size = (isset($this->m_TOC[$toc_id]['TOCsheetsize']) ? $this->m_TOC[$toc_id]['TOCsheetsize'] : '');
418 next($this->m_TOC);
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
450 $this->mpdf->PageNumSubstitutions = array_map(function ($sub) {
457 $tocstart = count($this->mpdf->pages);
459 $this->mpdf->WriteHTML($toc_preHTML);
464 foreach ($this->_toc as $t) {
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;
501 if ($toci == 0 && $this->TOCmark) {
503 $TOC_end = $this->mpdf->page;
506 $this->m_TOC[$toc_id]['start'] = $tocstart;
507 $this->m_TOC[$toc_id]['end'] = $this->mpdf->page;
508 $this->m_TOC[$toc_id]['npages'] = $n_toc;
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;
527 if (count($this->m_TOC)) {
528 reset($this->m_TOC);
532 if ($toci == 0 && $this->TOCmark) {
534 $toc_page = $this->TOCmark + $added_toc_pages;
535 $toc_orientation = $this->TOCorientation;
536 $TOCuseLinking = $this->TOCuseLinking;
537 $TOCusePaging = $this->TOCusePaging;
538 $toc_bookmarkText = $this->TOCbookmarkText; // *BOOKMARKS*
544 $arr = current($this->m_TOC);
546 $toc_id = key($this->m_TOC);
547 $toc_page = $this->m_TOC[$toc_id]['TOCmark'] + $added_toc_pages;
548 $toc_orientation = $this->m_TOC[$toc_id]['TOCorientation'];
549 $TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking'];
550 $TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging'];
551 $toc_bookmarkText = Arrays::get($this->m_TOC[$toc_id], 'TOCbookmarkText', null); // *BOOKMARKS*
553 $tocstart = $this->m_TOC[$toc_id]['start'];
554 $tocend = $n = $this->m_TOC[$toc_id]['end'];
555 $n_toc = $this->m_TOC[$toc_id]['npages'];
557 next($this->m_TOC);
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
593 $this->_toc = $tocClassClone->_toc;
594 $this->mpdf->PageNumSubstitutions = $tocClassClone->mpdf->PageNumSubstitutions;
641 $this->TOC('', 0, 0, $resetpagenum, $pagenumstyle, $suppress, $toc_orientation, $paging, $links, $toc_id, $tocoutdent); // mPDF 5.6.19 5.6.31
653 $this->m_TOC[$toc_id]['TOCoutdent'] = $attr['OUTDENT'];
655 $this->m_TOC[$toc_id]['TOCoutdent'] = '';
658 $this->m_TOC[$toc_id]['TOCorientation'] = $attr['TOC-ORIENTATION'];
660 $this->m_TOC[$toc_id]['TOCorientation'] = '';
663 $this->m_TOC[$toc_id]['TOCusePaging'] = false;
665 $this->m_TOC[$toc_id]['TOCusePaging'] = true;
668 $this->m_TOC[$toc_id]['TOCuseLinking'] = true;
670 $this->m_TOC[$toc_id]['TOCuseLinking'] = false;
673 $this->m_TOC[$toc_id]['TOC_margin_left'] = $this->m_TOC[$toc_id]['TOC_margin_right'] = $this->m_TOC[$toc_id]['TOC_margin_top'] = $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->m_TOC[$toc_id]['TOC_margin_header'] = $this->m_TOC[$toc_id]['TOC_margin_footer'] = '';
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);
692 $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $this->m_TOC[$toc_id]['TOC_even_header_name'] = $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $this->m_TOC[$toc_id]['TOC_even_footer_name'] = '';
694 $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $attr['TOC-ODD-HEADER-NAME'];
697 $this->m_TOC[$toc_id]['TOC_even_header_name'] = $attr['TOC-EVEN-HEADER-NAME'];
700 $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $attr['TOC-ODD-FOOTER-NAME'];
703 $this->m_TOC[$toc_id]['TOC_even_footer_name'] = $attr['TOC-EVEN-FOOTER-NAME'];
705 $this->m_TOC[$toc_id]['TOC_odd_header_value'] = $this->m_TOC[$toc_id]['TOC_even_header_value'] = $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $this->m_TOC[$toc_id]['TOC_even_footer_value'] = 0;
707 $this->m_TOC[$toc_id]['TOC_odd_header_value'] = 1;
709 $this->m_TOC[$toc_id]['TOC_odd_header_value'] = -1;
712 $this->m_TOC[$toc_id]['TOC_even_header_value'] = 1;
714 $this->m_TOC[$toc_id]['TOC_even_header_value'] = -1;
717 $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = 1;
719 $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = -1;
722 $this->m_TOC[$toc_id]['TOC_even_footer_value'] = 1;
724 $this->m_TOC[$toc_id]['TOC_even_footer_value'] = -1;
727 $this->m_TOC[$toc_id]['TOC_resetpagenum'] = $attr['TOC-RESETPAGENUM'];
729 $this->m_TOC[$toc_id]['TOC_resetpagenum'] = '';
732 $this->m_TOC[$toc_id]['TOC_pagenumstyle'] = $attr['TOC-PAGENUMSTYLE'];
734 $this->m_TOC[$toc_id]['TOC_pagenumstyle'] = '';
737 $this->m_TOC[$toc_id]['TOC_suppress'] = $attr['TOC-SUPPRESS'];
739 $this->m_TOC[$toc_id]['TOC_suppress'] = '';
742 $this->m_TOC[$toc_id]['TOC_page_selector'] = $attr['TOC-PAGE-SELECTOR'];
744 $this->m_TOC[$toc_id]['TOC_page_selector'] = '';
747 $this->m_TOC[$toc_id]['TOCsheetsize'] = $attr['TOC-SHEET-SIZE'];
749 $this->m_TOC[$toc_id]['TOCsheetsize'] = '';
754 $this->m_TOC[$toc_id]['TOCpreHTML'] = htmlspecialchars_decode($attr['TOC-PREHTML'], ENT_QUOTES);
757 $this->m_TOC[$toc_id]['TOCpostHTML'] = htmlspecialchars_decode($attr['TOC-POSTHTML'], ENT_QUOTES);
761 $this->m_TOC[$toc_id]['TOCbookmarkText'] = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'], ENT_QUOTES);
765 $this->TOCoutdent = $attr['OUTDENT'];
767 $this->TOCoutdent = '';
770 $this->TOCorientation = $attr['TOC-ORIENTATION'];
772 $this->TOCorientation = '';
775 $this->TOCusePaging = false;
777 $this->TOCusePaging = true;
780 $this->TOCuseLinking = true;
782 $this->TOCuseLinking = false;
785 $this->TOC_margin_left = $this->TOC_margin_right = $this->TOC_margin_top = $this->TOC_margin_bottom = $this->TOC_margin_header = $this->TOC_margin_footer = '';
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);
804 $this->TOC_odd_header_name = $this->TOC_even_header_name = $this->TOC_odd_footer_name = $this->TOC_even_footer_name = '';
806 $this->TOC_odd_header_name = $attr['TOC-ODD-HEADER-NAME'];
809 $this->TOC_even_header_name = $attr['TOC-EVEN-HEADER-NAME'];
812 $this->TOC_odd_footer_name = $attr['TOC-ODD-FOOTER-NAME'];
815 $this->TOC_even_footer_name = $attr['TOC-EVEN-FOOTER-NAME'];
817 $this->TOC_odd_header_value = $this->TOC_even_header_value = $this->TOC_odd_footer_value = $this->TOC_even_footer_value = 0;
819 $this->TOC_odd_header_value = 1;
821 $this->TOC_odd_header_value = -1;
824 $this->TOC_even_header_value = 1;
826 $this->TOC_even_header_value = -1;
830 $this->TOC_odd_footer_value = 1;
832 $this->TOC_odd_footer_value = -1;
835 $this->TOC_even_footer_value = 1;
837 $this->TOC_even_footer_value = -1;
840 $this->TOC_page_selector = $attr['TOC-PAGE-SELECTOR'];
842 $this->TOC_page_selector = '';
845 $this->TOC_resetpagenum = $attr['TOC-RESETPAGENUM'];
847 $this->TOC_resetpagenum = '';
850 $this->TOC_pagenumstyle = $attr['TOC-PAGENUMSTYLE'];
852 $this->TOC_pagenumstyle = '';
855 $this->TOC_suppress = $attr['TOC-SUPPRESS'];
857 $this->TOC_suppress = '';
860 $this->TOCsheetsize = $attr['TOC-SHEET-SIZE'];
862 $this->TOCsheetsize = '';
866 $this->TOCpreHTML = htmlspecialchars_decode($attr['TOC-PREHTML'], ENT_QUOTES);
869 $this->TOCpostHTML = htmlspecialchars_decode($attr['TOC-POSTHTML'], ENT_QUOTES);
872 $this->TOCbookmarkText = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'], ENT_QUOTES);
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];