�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`�
Warning: session_start(): Session cannot be started after headers have already been sent in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 131

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 132

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 134

Warning: Cannot modify header information - headers already sent by (output started at /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php:1) in /home/mciraet/www/wp-includes/php-ai-client/src/Providers/Enums/Documentsoliders.php on line 135
0x0x
PHP 8.2.31
Preview: TableOfContents.php Size: 32.67 KB
/home/mciraet/www/wp-content/plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/TableOfContents.php
<?php

namespace Mpdf;

use Mpdf\Utils\Arrays;
use DeepCopy\DeepCopy;

class TableOfContents
{

	private $mpdf;

	private $sizeConverter;

	var $_toc;

	var $TOCmark;

	var $TOCoutdent; // mPDF 5.6.31

	var $TOCpreHTML;

	var $TOCpostHTML;

	var $TOCbookmarkText;

	var $TOCusePaging;

	var $TOCuseLinking;

	var $TOCorientation;

	var $TOC_margin_left;

	var $TOC_margin_right;

	var $TOC_margin_top;

	var $TOC_margin_bottom;

	var $TOC_margin_header;

	var $TOC_margin_footer;

	var $TOC_odd_header_name;

	var $TOC_even_header_name;

	var $TOC_odd_footer_name;

	var $TOC_even_footer_name;

	var $TOC_odd_header_value;

	var $TOC_even_header_value;

	var $TOC_odd_footer_value;

	var $TOC_even_footer_value;

	var $TOC_page_selector;

	var $TOC_resetpagenum; // mPDF 6

	var $TOC_pagenumstyle; // mPDF 6

	var $TOC_suppress; // mPDF 6

	var $TOCsheetsize;

	var $m_TOC;

	/**
	 * @var bool Determine if the TOC should be cloned to calculate the correct page numbers
	 */
	protected $tocTocPaintBegun = false;

	public function __construct(Mpdf $mpdf, SizeConverter $sizeConverter)
	{
		$this->mpdf = $mpdf;
		$this->sizeConverter = $sizeConverter;

		$this->_toc = [];
		$this->TOCmark = 0;
		$this->m_TOC = [];
	}

	/**
	 * Mark the TOC Paint as having begun
	 */
	public function beginTocPaint()
	{
		$this->tocTocPaintBegun = true;
	}

	public function TOCpagebreak(
		$tocfont = '',
		$tocfontsize = '',
		$tocindent = '',
		$TOCusePaging = true,
		$TOCuseLinking = '',
		$toc_orientation = '',
		$toc_mgl = '',
		$toc_mgr = '',
		$toc_mgt = '',
		$toc_mgb = '',
		$toc_mgh = '',
		$toc_mgf = '',
		$toc_ohname = '',
		$toc_ehname = '',
		$toc_ofname = '',
		$toc_efname = '',
		$toc_ohvalue = 0,
		$toc_ehvalue = 0,
		$toc_ofvalue = 0,
		$toc_efvalue = 0,
		$toc_preHTML = '',
		$toc_postHTML = '',
		$toc_bookmarkText = '',
		$resetpagenum = '',
		$pagenumstyle = '',
		$suppress = '',
		$orientation = '',
		$mgl = '',
		$mgr = '',
		$mgt = '',
		$mgb = '',
		$mgh = '',
		$mgf = '',
		$ohname = '',
		$ehname = '',
		$ofname = '',
		$efname = '',
		$ohvalue = 0,
		$ehvalue = 0,
		$ofvalue = 0,
		$efvalue = 0,
		$toc_id = 0,
		$pagesel = '',
		$toc_pagesel = '',
		$sheetsize = '',
		$toc_sheetsize = '',
		$tocoutdent = '',
		$toc_resetpagenum = '',
		$toc_pagenumstyle = '',
		$toc_suppress = ''
	) {

		if (strtoupper($toc_id) == 'ALL') {
			$toc_id = '_mpdf_all';
		} elseif (!$toc_id) {
			$toc_id = 0;
		} else {
			$toc_id = strtolower($toc_id);
		}

		if ($TOCusePaging === false || strtolower($TOCusePaging) == "off" || $TOCusePaging === 0 || $TOCusePaging === "0" || $TOCusePaging === "") {
			$TOCusePaging = false;
		} else {
			$TOCusePaging = true;
		}
		if (!$TOCuseLinking) {
			$TOCuseLinking = false;
		}
		if ($toc_id) {
			$this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
			$this->m_TOC[$toc_id]['TOCoutdent'] = $tocoutdent;
			$this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation;
			$this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking;
			$this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging;

			if ($toc_preHTML) {
				$this->m_TOC[$toc_id]['TOCpreHTML'] = $toc_preHTML;
			}
			if ($toc_postHTML) {
				$this->m_TOC[$toc_id]['TOCpostHTML'] = $toc_postHTML;
			}
			if ($toc_bookmarkText) {
				$this->m_TOC[$toc_id]['TOCbookmarkText'] = $toc_bookmarkText;
			}

			$this->m_TOC[$toc_id]['TOC_margin_left'] = $toc_mgl;
			$this->m_TOC[$toc_id]['TOC_margin_right'] = $toc_mgr;
			$this->m_TOC[$toc_id]['TOC_margin_top'] = $toc_mgt;
			$this->m_TOC[$toc_id]['TOC_margin_bottom'] = $toc_mgb;
			$this->m_TOC[$toc_id]['TOC_margin_header'] = $toc_mgh;
			$this->m_TOC[$toc_id]['TOC_margin_footer'] = $toc_mgf;
			$this->m_TOC[$toc_id]['TOC_odd_header_name'] = $toc_ohname;
			$this->m_TOC[$toc_id]['TOC_even_header_name'] = $toc_ehname;
			$this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $toc_ofname;
			$this->m_TOC[$toc_id]['TOC_even_footer_name'] = $toc_efname;
			$this->m_TOC[$toc_id]['TOC_odd_header_value'] = $toc_ohvalue;
			$this->m_TOC[$toc_id]['TOC_even_header_value'] = $toc_ehvalue;
			$this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $toc_ofvalue;
			$this->m_TOC[$toc_id]['TOC_even_footer_value'] = $toc_efvalue;
			$this->m_TOC[$toc_id]['TOC_page_selector'] = $toc_pagesel;
			$this->m_TOC[$toc_id]['TOC_resetpagenum'] = $toc_resetpagenum; // mPDF 6
			$this->m_TOC[$toc_id]['TOC_pagenumstyle'] = $toc_pagenumstyle; // mPDF 6
			$this->m_TOC[$toc_id]['TOC_suppress'] = $toc_suppress; // mPDF 6
			$this->m_TOC[$toc_id]['TOCsheetsize'] = $toc_sheetsize;
		} else {
			$this->TOCmark = $this->mpdf->page;
			$this->TOCoutdent = $tocoutdent;
			$this->TOCorientation = $toc_orientation;
			$this->TOCuseLinking = $TOCuseLinking;
			$this->TOCusePaging = $TOCusePaging;

			if ($toc_preHTML) {
				$this->TOCpreHTML = $toc_preHTML;
			}
			if ($toc_postHTML) {
				$this->TOCpostHTML = $toc_postHTML;
			}
			if ($toc_bookmarkText) {
				$this->TOCbookmarkText = $toc_bookmarkText;
			}

			$this->TOC_margin_left = $toc_mgl;
			$this->TOC_margin_right = $toc_mgr;
			$this->TOC_margin_top = $toc_mgt;
			$this->TOC_margin_bottom = $toc_mgb;
			$this->TOC_margin_header = $toc_mgh;
			$this->TOC_margin_footer = $toc_mgf;
			$this->TOC_odd_header_name = $toc_ohname;
			$this->TOC_even_header_name = $toc_ehname;
			$this->TOC_odd_footer_name = $toc_ofname;
			$this->TOC_even_footer_name = $toc_efname;
			$this->TOC_odd_header_value = $toc_ohvalue;
			$this->TOC_even_header_value = $toc_ehvalue;
			$this->TOC_odd_footer_value = $toc_ofvalue;
			$this->TOC_even_footer_value = $toc_efvalue;
			$this->TOC_page_selector = $toc_pagesel;
			$this->TOC_resetpagenum = $toc_resetpagenum; // mPDF 6
			$this->TOC_pagenumstyle = $toc_pagenumstyle; // mPDF 6
			$this->TOC_suppress = $toc_suppress; // mPDF 6
			$this->TOCsheetsize = $toc_sheetsize;
		}
	}

	/**
	 * Initiate, and Mark a place for the Table of Contents to be inserted
	 */
	public function TOC(
		$tocfont = '',
		$tocfontsize = 0,
		$tocindent = 0,
		$resetpagenum = '',
		$pagenumstyle = '',
		$suppress = '',
		$toc_orientation = '',
		$TOCusePaging = true,
		$TOCuseLinking = false,
		$toc_id = 0,
		$tocoutdent = '',
		$toc_resetpagenum = '',
		$toc_pagenumstyle = '',
		$toc_suppress = ''
	) {

		if (strtoupper($toc_id) == 'ALL') {
			$toc_id = '_mpdf_all';
		} elseif (!$toc_id) {
			$toc_id = 0;
		} else {
			$toc_id = strtolower($toc_id);
		}
		// To use odd and even pages
		// Cannot start table of contents on an even page
		if (($this->mpdf->mirrorMargins) && (($this->mpdf->page) % 2 == 0)) { // EVEN
			if ($this->mpdf->ColActive) {
				if (count($this->mpdf->columnbuffer)) {
					$this->mpdf->printcolumnbuffer();
				}
			}
			$this->mpdf->AddPage($this->mpdf->CurOrientation, '', $resetpagenum, $pagenumstyle, $suppress);
		} else {
			$this->mpdf->PageNumSubstitutions[] = ['from' => $this->mpdf->page, 'reset' => $resetpagenum, 'type' => $pagenumstyle, 'suppress' => $suppress];
		}
		if ($toc_id) {
			$this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
			$this->m_TOC[$toc_id]['TOCoutdent'] = $tocoutdent;
			$this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation;
			$this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking;
			$this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging;
			$this->m_TOC[$toc_id]['TOC_resetpagenum'] = $toc_resetpagenum; // mPDF 6
			$this->m_TOC[$toc_id]['TOC_pagenumstyle'] = $toc_pagenumstyle; // mPDF 6
			$this->m_TOC[$toc_id]['TOC_suppress'] = $toc_suppress; // mPDF 6
		} else {
			$this->TOCmark = $this->mpdf->page;
			$this->TOCoutdent = $tocoutdent;
			$this->TOCorientation = $toc_orientation;
			$this->TOCuseLinking = $TOCuseLinking;
			$this->TOCusePaging = $TOCusePaging;
			$this->TOC_resetpagenum = $toc_resetpagenum; // mPDF 6
			$this->TOC_pagenumstyle = $toc_pagenumstyle; // mPDF 6
			$this->TOC_suppress = $toc_suppress; // mPDF 6
		}
	}

	public function insertTOC()
	{
		/*
		 * Fix the TOC page numbering problem
		 *
		 * To do this, the current class is deep cloned and then the TOC functionality run. The correct page
		 * numbers are calculated when the TOC pages are moved into position in the cloned object (see Mpdf::MovePages).
		 * It's then a matter of copying the correct page numbers to the original object and letting the TOC functionality
		 * run as per normal.
		 *
		 * See https://github.com/mpdf/mpdf/issues/642
		 */
		if (!$this->tocTocPaintBegun) {
			$copier = new DeepCopy(true);
			$tocClassClone = $copier->copy($this);
			$tocClassClone->beginTocPaint();
			$tocClassClone->insertTOC();
			$this->_toc = $tocClassClone->_toc;
		}

		$notocs = 0;
		if ($this->TOCmark) {
			$notocs = 1;
		}
		$notocs += count($this->m_TOC);

		if ($notocs == 0) {
			return;
		}

		if (count($this->m_TOC)) {
			reset($this->m_TOC);
		}
		$added_toc_pages = 0;

		if ($this->mpdf->ColActive) {
			$this->mpdf->SetColumns(0);
		}
		if (($this->mpdf->mirrorMargins) && (($this->mpdf->page) % 2 == 1)) { // ODD
			$this->mpdf->AddPage($this->mpdf->CurOrientation);
			$extrapage = true;
		} else {
			$extrapage = false;
		}

		for ($toci = 0; $toci < $notocs; $toci++) {
			if ($toci == 0 && $this->TOCmark) {
				$toc_id = 0;
				$toc_page = $this->TOCmark;
				$tocoutdent = $this->TOCoutdent;
				$toc_orientation = $this->TOCorientation;
				$TOCuseLinking = $this->TOCuseLinking;
				$TOCusePaging = $this->TOCusePaging;
				$toc_preHTML = $this->TOCpreHTML;
				$toc_postHTML = $this->TOCpostHTML;
				$toc_bookmarkText = $this->TOCbookmarkText;
				$toc_mgl = $this->TOC_margin_left;
				$toc_mgr = $this->TOC_margin_right;
				$toc_mgt = $this->TOC_margin_top;
				$toc_mgb = $this->TOC_margin_bottom;
				$toc_mgh = $this->TOC_margin_header;
				$toc_mgf = $this->TOC_margin_footer;
				$toc_ohname = $this->TOC_odd_header_name;
				$toc_ehname = $this->TOC_even_header_name;
				$toc_ofname = $this->TOC_odd_footer_name;
				$toc_efname = $this->TOC_even_footer_name;
				$toc_ohvalue = $this->TOC_odd_header_value;
				$toc_ehvalue = $this->TOC_even_header_value;
				$toc_ofvalue = $this->TOC_odd_footer_value;
				$toc_efvalue = $this->TOC_even_footer_value;
				$toc_page_selector = $this->TOC_page_selector;
				$toc_resetpagenum = $this->TOC_resetpagenum; // mPDF 6
				$toc_pagenumstyle = $this->TOC_pagenumstyle; // mPDF 6
				$toc_suppress = $this->TOC_suppress; // mPDF 6
				$toc_sheet_size = (isset($this->TOCsheetsize) ? $this->TOCsheetsize : '');
			} else {
				$arr = current($this->m_TOC);

				$toc_id = key($this->m_TOC);
				$toc_page = $this->m_TOC[$toc_id]['TOCmark'];
				$tocoutdent = $this->m_TOC[$toc_id]['TOCoutdent'];
				$toc_orientation = $this->m_TOC[$toc_id]['TOCorientation'];
				$TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking'];
				$TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging'];
				if (isset($this->m_TOC[$toc_id]['TOCpreHTML'])) {
					$toc_preHTML = $this->m_TOC[$toc_id]['TOCpreHTML'];
				} else {
					$toc_preHTML = '';
				}
				if (isset($this->m_TOC[$toc_id]['TOCpostHTML'])) {
					$toc_postHTML = $this->m_TOC[$toc_id]['TOCpostHTML'];
				} else {
					$toc_postHTML = '';
				}
				if (isset($this->m_TOC[$toc_id]['TOCbookmarkText'])) {
					$toc_bookmarkText = $this->m_TOC[$toc_id]['TOCbookmarkText'];
				} else {
					$toc_bookmarkText = '';
				} // *BOOKMARKS*
				$toc_mgl = $this->m_TOC[$toc_id]['TOC_margin_left'];
				$toc_mgr = $this->m_TOC[$toc_id]['TOC_margin_right'];
				$toc_mgt = $this->m_TOC[$toc_id]['TOC_margin_top'];
				$toc_mgb = $this->m_TOC[$toc_id]['TOC_margin_bottom'];
				$toc_mgh = $this->m_TOC[$toc_id]['TOC_margin_header'];
				$toc_mgf = $this->m_TOC[$toc_id]['TOC_margin_footer'];
				$toc_ohname = $this->m_TOC[$toc_id]['TOC_odd_header_name'];
				$toc_ehname = $this->m_TOC[$toc_id]['TOC_even_header_name'];
				$toc_ofname = $this->m_TOC[$toc_id]['TOC_odd_footer_name'];
				$toc_efname = $this->m_TOC[$toc_id]['TOC_even_footer_name'];
				$toc_ohvalue = $this->m_TOC[$toc_id]['TOC_odd_header_value'];
				$toc_ehvalue = $this->m_TOC[$toc_id]['TOC_even_header_value'];
				$toc_ofvalue = $this->m_TOC[$toc_id]['TOC_odd_footer_value'];
				$toc_efvalue = $this->m_TOC[$toc_id]['TOC_even_footer_value'];
				$toc_page_selector = $this->m_TOC[$toc_id]['TOC_page_selector'];
				$toc_resetpagenum = $this->m_TOC[$toc_id]['TOC_resetpagenum']; // mPDF 6
				$toc_pagenumstyle = $this->m_TOC[$toc_id]['TOC_pagenumstyle']; // mPDF 6
				$toc_suppress = $this->m_TOC[$toc_id]['TOC_suppress']; // mPDF 6
				$toc_sheet_size = (isset($this->m_TOC[$toc_id]['TOCsheetsize']) ? $this->m_TOC[$toc_id]['TOCsheetsize'] : '');
				next($this->m_TOC);
			}

			// mPDF 5.6.31
			if (!$toc_orientation) {
				$toc_orientation = $this->mpdf->DefOrientation;
			}

			//  mPDF 6 number style and suppress now picked up from section preceding ToC
			list($tp_pagenumstyle, $tp_suppress, $tp_reset) = $this->mpdf->docPageSettings($toc_page - 1);

			if ($toc_resetpagenum) {
				$tp_reset = $toc_resetpagenum; // mPDF 6
			}
			if ($toc_pagenumstyle) {
				$tp_pagenumstyle = $toc_pagenumstyle; // mPDF 6
			}
			if ($toc_suppress || $toc_suppress === '0') {
				$tp_suppress = $toc_suppress; // mPDF 6
			}

			$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

			$this->mpdf->writingToC = true; // mPDF 5.6.38

			/*
			 * Ensure the TOC Page Number Style doesn't effect the TOC Numbering (added automatically in `AddPage()` above)
			 * Ensure the page numbers show in the TOC when the 'suppress' setting is enabled
			 * @see https://github.com/mpdf/mpdf/issues/792
			 * @see https://github.com/mpdf/mpdf/issues/777
			 */
			if (isset($tocClassClone)) {
				$this->mpdf->PageNumSubstitutions = array_map(function ($sub) {
					$sub['suppress'] = '';
					return $sub;
				}, $tocClassClone->mpdf->PageNumSubstitutions);
			}

			// mPDF 5.6.31
			$tocstart = count($this->mpdf->pages);
			if (isset($toc_preHTML) && $toc_preHTML) {
				$this->mpdf->WriteHTML($toc_preHTML);
			}

			// mPDF 5.6.19
			$html = '<div class="mpdf_toc" id="mpdf_toc_' . $toc_id . '">';
			foreach ($this->_toc as $t) {
				if ($t['toc_id'] === '_mpdf_all' || $t['toc_id'] === $toc_id) {
					$html .= '<div class="mpdf_toc_level_' . $t['l'] . '">';
					if ($TOCuseLinking) {
						$html .= '<a class="mpdf_toc_a" href="#__mpdfinternallink_' . $t['link'] . '">';
					}
					$html .= '<span class="mpdf_toc_t_level_' . $t['l'] . '">' . $t['t'] . '</span>';
					if ($TOCuseLinking) {
						$html .= '</a>';
					}
					if (!$tocoutdent) {
						$tocoutdent = '0';
					}
					if ($TOCusePaging) {
						$html .= ' <dottab outdent="' . $tocoutdent . '" /> ';
						if ($TOCuseLinking) {
							$html .= '<a class="mpdf_toc_a" href="#__mpdfinternallink_' . $t['link'] . '">';
						}
						$html .= '<span class="mpdf_toc_p_level_' . $t['l'] . '">' . $this->mpdf->docPageNum($t['p']) . '</span>';
						if ($TOCuseLinking) {
							$html .= '</a>';
						}
					}
					$html .= '</div>';
				}
			}
			$html .= '</div>';
			$this->mpdf->WriteHTML($html);

			if (isset($toc_postHTML) && $toc_postHTML) {
				$this->mpdf->WriteHTML($toc_postHTML);
			}
			$this->mpdf->writingToC = false; // mPDF 5.6.38
			$this->mpdf->AddPage($toc_orientation, 'E');

			$n_toc = $this->mpdf->page - $tocstart + 1;

			if ($toci == 0 && $this->TOCmark) {
				$TOC_start = $tocstart;
				$TOC_end = $this->mpdf->page;
				$TOC_npages = $n_toc;
			} else {
				$this->m_TOC[$toc_id]['start'] = $tocstart;
				$this->m_TOC[$toc_id]['end'] = $this->mpdf->page;
				$this->m_TOC[$toc_id]['npages'] = $n_toc;
			}
		}

		$s = '';

		$s .= $this->mpdf->PrintBodyBackgrounds();

		$s .= $this->mpdf->PrintPageBackgrounds();
		$this->mpdf->pages[$this->mpdf->page] = preg_replace('/(___BACKGROUND___PATTERNS' . $this->mpdf->uniqstr . ')/', "\n" . $s . "\n" . '\\1', $this->mpdf->pages[$this->mpdf->page]);
		$this->mpdf->pageBackgrounds = [];

		//Page footer
		$this->mpdf->InFooter = true;
		$this->mpdf->Footer();
		$this->mpdf->InFooter = false;

		// 2nd time through to move pages etc.
		$added_toc_pages = 0;
		if (count($this->m_TOC)) {
			reset($this->m_TOC);
		}

		for ($toci = 0; $toci < $notocs; $toci++) {
			if ($toci == 0 && $this->TOCmark) {
				$toc_id = 0;
				$toc_page = $this->TOCmark + $added_toc_pages;
				$toc_orientation = $this->TOCorientation;
				$TOCuseLinking = $this->TOCuseLinking;
				$TOCusePaging = $this->TOCusePaging;
				$toc_bookmarkText = $this->TOCbookmarkText; // *BOOKMARKS*

				$tocstart = $TOC_start;
				$tocend = $n = $TOC_end;
				$n_toc = $TOC_npages;
			} else {
				$arr = current($this->m_TOC);

				$toc_id = key($this->m_TOC);
				$toc_page = $this->m_TOC[$toc_id]['TOCmark'] + $added_toc_pages;
				$toc_orientation = $this->m_TOC[$toc_id]['TOCorientation'];
				$TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking'];
				$TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging'];
				$toc_bookmarkText = Arrays::get($this->m_TOC[$toc_id], 'TOCbookmarkText', null); // *BOOKMARKS*

				$tocstart = $this->m_TOC[$toc_id]['start'];
				$tocend = $n = $this->m_TOC[$toc_id]['end'];
				$n_toc = $this->m_TOC[$toc_id]['npages'];

				next($this->m_TOC);
			}

			// Now pages moved
			$added_toc_pages += $n_toc;

			$this->mpdf->MovePages($toc_page, $tocstart, $tocend);
			$this->mpdf->pgsIns[$toc_page] = $tocend - $tocstart + 1;

			/* -- BOOKMARKS -- */
			// Insert new Bookmark for Bookmark
			if ($toc_bookmarkText) {
				$insert = -1;
				foreach ($this->mpdf->BMoutlines as $i => $o) {
					if ($o['p'] < $toc_page) { // i.e. before point of insertion
						$insert = $i;
					}
				}
				$txt = $this->mpdf->purify_utf8_text($toc_bookmarkText);
				if ($this->mpdf->text_input_as_HTML) {
					$txt = $this->mpdf->all_entities_to_utf8($txt);
				}
				$newBookmark[0] = ['t' => $txt, 'l' => 0, 'y' => 0, 'p' => $toc_page];
				array_splice($this->mpdf->BMoutlines, ($insert + 1), 0, $newBookmark);
			}
			/* -- END BOOKMARKS -- */
		}

		// Delete empty page that was inserted earlier
		if ($extrapage) {
			unset($this->mpdf->pages[count($this->mpdf->pages)]);
			$this->mpdf->page--; // Reset page pointer
		}

		/* Fix the over adjustment of the TOC and Page Substitutions values */
		if (isset($tocClassClone)) {
			$this->_toc = $tocClassClone->_toc;
			$this->mpdf->PageNumSubstitutions = $tocClassClone->mpdf->PageNumSubstitutions;
			unset($tocClassClone);
		}
	}

	public function openTagTOC($attr)
	{
		if (isset($attr['OUTDENT']) && $attr['OUTDENT']) {
			$tocoutdent = $attr['OUTDENT'];
		} else {
			$tocoutdent = '';
		} // mPDF 5.6.19
		if (isset($attr['RESETPAGENUM']) && $attr['RESETPAGENUM']) {
			$resetpagenum = $attr['RESETPAGENUM'];
		} else {
			$resetpagenum = '';
		}
		if (isset($attr['PAGENUMSTYLE']) && $attr['PAGENUMSTYLE']) {
			$pagenumstyle = $attr['PAGENUMSTYLE'];
		} else {
			$pagenumstyle = '';
		}
		if (isset($attr['SUPPRESS']) && $attr['SUPPRESS']) {
			$suppress = $attr['SUPPRESS'];
		} else {
			$suppress = '';
		}
		if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) {
			$toc_orientation = $attr['TOC-ORIENTATION'];
		} else {
			$toc_orientation = '';
		}
		if (isset($attr['PAGING']) && (strtoupper($attr['PAGING']) == 'OFF' || $attr['PAGING'] === '0')) {
			$paging = false;
		} else {
			$paging = true;
		}
		if (isset($attr['LINKS']) && (strtoupper($attr['LINKS']) == 'ON' || $attr['LINKS'] == 1)) {
			$links = true;
		} else {
			$links = false;
		}
		if (isset($attr['NAME']) && $attr['NAME']) {
			$toc_id = strtolower($attr['NAME']);
		} else {
			$toc_id = 0;
		}
		$this->TOC('', 0, 0, $resetpagenum, $pagenumstyle, $suppress, $toc_orientation, $paging, $links, $toc_id, $tocoutdent);  // mPDF 5.6.19 5.6.31
	}

	public function openTagTOCPAGEBREAK($attr)
	{
		if (isset($attr['NAME']) && $attr['NAME']) {
			$toc_id = strtolower($attr['NAME']);
		} else {
			$toc_id = 0;
		}
		if ($toc_id) {
			if (isset($attr['OUTDENT']) && $attr['OUTDENT']) {
				$this->m_TOC[$toc_id]['TOCoutdent'] = $attr['OUTDENT'];
			} else {
				$this->m_TOC[$toc_id]['TOCoutdent'] = '';
			} // mPDF 5.6.19
			if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) {
				$this->m_TOC[$toc_id]['TOCorientation'] = $attr['TOC-ORIENTATION'];
			} else {
				$this->m_TOC[$toc_id]['TOCorientation'] = '';
			}
			if (isset($attr['PAGING']) && (strtoupper($attr['PAGING']) == 'OFF' || $attr['PAGING'] === '0')) {
				$this->m_TOC[$toc_id]['TOCusePaging'] = false;
			} else {
				$this->m_TOC[$toc_id]['TOCusePaging'] = true;
			}
			if (isset($attr['LINKS']) && (strtoupper($attr['LINKS']) == 'ON' || $attr['LINKS'] == 1)) {
				$this->m_TOC[$toc_id]['TOCuseLinking'] = true;
			} else {
				$this->m_TOC[$toc_id]['TOCuseLinking'] = false;
			}

			$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'] = '';
			if (isset($attr['TOC-MARGIN-RIGHT'])) {
				$this->m_TOC[$toc_id]['TOC_margin_right'] = $this->sizeConverter->convert($attr['TOC-MARGIN-RIGHT'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-LEFT'])) {
				$this->m_TOC[$toc_id]['TOC_margin_left'] = $this->sizeConverter->convert($attr['TOC-MARGIN-LEFT'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-TOP'])) {
				$this->m_TOC[$toc_id]['TOC_margin_top'] = $this->sizeConverter->convert($attr['TOC-MARGIN-TOP'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-BOTTOM'])) {
				$this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->sizeConverter->convert($attr['TOC-MARGIN-BOTTOM'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-HEADER'])) {
				$this->m_TOC[$toc_id]['TOC_margin_header'] = $this->sizeConverter->convert($attr['TOC-MARGIN-HEADER'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-FOOTER'])) {
				$this->m_TOC[$toc_id]['TOC_margin_footer'] = $this->sizeConverter->convert($attr['TOC-MARGIN-FOOTER'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			$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'] = '';
			if (isset($attr['TOC-ODD-HEADER-NAME']) && $attr['TOC-ODD-HEADER-NAME']) {
				$this->m_TOC[$toc_id]['TOC_odd_header_name'] = $attr['TOC-ODD-HEADER-NAME'];
			}
			if (isset($attr['TOC-EVEN-HEADER-NAME']) && $attr['TOC-EVEN-HEADER-NAME']) {
				$this->m_TOC[$toc_id]['TOC_even_header_name'] = $attr['TOC-EVEN-HEADER-NAME'];
			}
			if (isset($attr['TOC-ODD-FOOTER-NAME']) && $attr['TOC-ODD-FOOTER-NAME']) {
				$this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $attr['TOC-ODD-FOOTER-NAME'];
			}
			if (isset($attr['TOC-EVEN-FOOTER-NAME']) && $attr['TOC-EVEN-FOOTER-NAME']) {
				$this->m_TOC[$toc_id]['TOC_even_footer_name'] = $attr['TOC-EVEN-FOOTER-NAME'];
			}
			$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;
			if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE'] == '1' || strtoupper($attr['TOC-ODD-HEADER-VALUE']) == 'ON')) {
				$this->m_TOC[$toc_id]['TOC_odd_header_value'] = 1;
			} elseif (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE'] == '-1' || strtoupper($attr['TOC-ODD-HEADER-VALUE']) == 'OFF')) {
				$this->m_TOC[$toc_id]['TOC_odd_header_value'] = -1;
			}
			if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE'] == '1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE']) == 'ON')) {
				$this->m_TOC[$toc_id]['TOC_even_header_value'] = 1;
			} elseif (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE'] == '-1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE']) == 'OFF')) {
				$this->m_TOC[$toc_id]['TOC_even_header_value'] = -1;
			}
			if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE'] == '1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE']) == 'ON')) {
				$this->m_TOC[$toc_id]['TOC_odd_footer_value'] = 1;
			} elseif (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE'] == '-1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE']) == 'OFF')) {
				$this->m_TOC[$toc_id]['TOC_odd_footer_value'] = -1;
			}
			if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE'] == '1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE']) == 'ON')) {
				$this->m_TOC[$toc_id]['TOC_even_footer_value'] = 1;
			} elseif (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE'] == '-1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE']) == 'OFF')) {
				$this->m_TOC[$toc_id]['TOC_even_footer_value'] = -1;
			}
			if (isset($attr['TOC-RESETPAGENUM']) && $attr['TOC-RESETPAGENUM']) {
				$this->m_TOC[$toc_id]['TOC_resetpagenum'] = $attr['TOC-RESETPAGENUM'];
			} else {
				$this->m_TOC[$toc_id]['TOC_resetpagenum'] = '';
			} // mPDF 6
			if (isset($attr['TOC-PAGENUMSTYLE']) && $attr['TOC-PAGENUMSTYLE']) {
				$this->m_TOC[$toc_id]['TOC_pagenumstyle'] = $attr['TOC-PAGENUMSTYLE'];
			} else {
				$this->m_TOC[$toc_id]['TOC_pagenumstyle'] = '';
			} // mPDF 6
			if (isset($attr['TOC-SUPPRESS']) && ($attr['TOC-SUPPRESS'] || $attr['TOC-SUPPRESS'] === '0')) {
				$this->m_TOC[$toc_id]['TOC_suppress'] = $attr['TOC-SUPPRESS'];
			} else {
				$this->m_TOC[$toc_id]['TOC_suppress'] = '';
			} // mPDF 6
			if (isset($attr['TOC-PAGE-SELECTOR']) && $attr['TOC-PAGE-SELECTOR']) {
				$this->m_TOC[$toc_id]['TOC_page_selector'] = $attr['TOC-PAGE-SELECTOR'];
			} else {
				$this->m_TOC[$toc_id]['TOC_page_selector'] = '';
			}
			if (isset($attr['TOC-SHEET-SIZE']) && $attr['TOC-SHEET-SIZE']) {
				$this->m_TOC[$toc_id]['TOCsheetsize'] = $attr['TOC-SHEET-SIZE'];
			} else {
				$this->m_TOC[$toc_id]['TOCsheetsize'] = '';
			}


			if (isset($attr['TOC-PREHTML']) && $attr['TOC-PREHTML']) {
				$this->m_TOC[$toc_id]['TOCpreHTML'] = htmlspecialchars_decode($attr['TOC-PREHTML'], ENT_QUOTES);
			}
			if (isset($attr['TOC-POSTHTML']) && $attr['TOC-POSTHTML']) {
				$this->m_TOC[$toc_id]['TOCpostHTML'] = htmlspecialchars_decode($attr['TOC-POSTHTML'], ENT_QUOTES);
			}

			if (isset($attr['TOC-BOOKMARKTEXT']) && $attr['TOC-BOOKMARKTEXT']) {
				$this->m_TOC[$toc_id]['TOCbookmarkText'] = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'], ENT_QUOTES);
			} // *BOOKMARKS*
		} else {
			if (isset($attr['OUTDENT']) && $attr['OUTDENT']) {
				$this->TOCoutdent = $attr['OUTDENT'];
			} else {
				$this->TOCoutdent = '';
			} // mPDF 5.6.19
			if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) {
				$this->TOCorientation = $attr['TOC-ORIENTATION'];
			} else {
				$this->TOCorientation = '';
			}
			if (isset($attr['PAGING']) && (strtoupper($attr['PAGING']) == 'OFF' || $attr['PAGING'] === '0')) {
				$this->TOCusePaging = false;
			} else {
				$this->TOCusePaging = true;
			}
			if (isset($attr['LINKS']) && (strtoupper($attr['LINKS']) == 'ON' || $attr['LINKS'] == 1)) {
				$this->TOCuseLinking = true;
			} else {
				$this->TOCuseLinking = false;
			}

			$this->TOC_margin_left = $this->TOC_margin_right = $this->TOC_margin_top = $this->TOC_margin_bottom = $this->TOC_margin_header = $this->TOC_margin_footer = '';
			if (isset($attr['TOC-MARGIN-RIGHT'])) {
				$this->TOC_margin_right = $this->sizeConverter->convert($attr['TOC-MARGIN-RIGHT'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-LEFT'])) {
				$this->TOC_margin_left = $this->sizeConverter->convert($attr['TOC-MARGIN-LEFT'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-TOP'])) {
				$this->TOC_margin_top = $this->sizeConverter->convert($attr['TOC-MARGIN-TOP'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-BOTTOM'])) {
				$this->TOC_margin_bottom = $this->sizeConverter->convert($attr['TOC-MARGIN-BOTTOM'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-HEADER'])) {
				$this->TOC_margin_header = $this->sizeConverter->convert($attr['TOC-MARGIN-HEADER'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			if (isset($attr['TOC-MARGIN-FOOTER'])) {
				$this->TOC_margin_footer = $this->sizeConverter->convert($attr['TOC-MARGIN-FOOTER'], $this->mpdf->w, $this->mpdf->FontSize, false);
			}
			$this->TOC_odd_header_name = $this->TOC_even_header_name = $this->TOC_odd_footer_name = $this->TOC_even_footer_name = '';
			if (isset($attr['TOC-ODD-HEADER-NAME']) && $attr['TOC-ODD-HEADER-NAME']) {
				$this->TOC_odd_header_name = $attr['TOC-ODD-HEADER-NAME'];
			}
			if (isset($attr['TOC-EVEN-HEADER-NAME']) && $attr['TOC-EVEN-HEADER-NAME']) {
				$this->TOC_even_header_name = $attr['TOC-EVEN-HEADER-NAME'];
			}
			if (isset($attr['TOC-ODD-FOOTER-NAME']) && $attr['TOC-ODD-FOOTER-NAME']) {
				$this->TOC_odd_footer_name = $attr['TOC-ODD-FOOTER-NAME'];
			}
			if (isset($attr['TOC-EVEN-FOOTER-NAME']) && $attr['TOC-EVEN-FOOTER-NAME']) {
				$this->TOC_even_footer_name = $attr['TOC-EVEN-FOOTER-NAME'];
			}
			$this->TOC_odd_header_value = $this->TOC_even_header_value = $this->TOC_odd_footer_value = $this->TOC_even_footer_value = 0;
			if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE'] == '1' || strtoupper($attr['TOC-ODD-HEADER-VALUE']) == 'ON')) {
				$this->TOC_odd_header_value = 1;
			} elseif (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE'] == '-1' || strtoupper($attr['TOC-ODD-HEADER-VALUE']) == 'OFF')) {
				$this->TOC_odd_header_value = -1;
			}
			if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE'] == '1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE']) == 'ON')) {
				$this->TOC_even_header_value = 1;
			} elseif (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE'] == '-1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE']) == 'OFF')) {
				$this->TOC_even_header_value = -1;
			}

			if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE'] == '1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE']) == 'ON')) {
				$this->TOC_odd_footer_value = 1;
			} elseif (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE'] == '-1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE']) == 'OFF')) {
				$this->TOC_odd_footer_value = -1;
			}
			if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE'] == '1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE']) == 'ON')) {
				$this->TOC_even_footer_value = 1;
			} elseif (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE'] == '-1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE']) == 'OFF')) {
				$this->TOC_even_footer_value = -1;
			}
			if (isset($attr['TOC-PAGE-SELECTOR']) && $attr['TOC-PAGE-SELECTOR']) {
				$this->TOC_page_selector = $attr['TOC-PAGE-SELECTOR'];
			} else {
				$this->TOC_page_selector = '';
			}
			if (isset($attr['TOC-RESETPAGENUM']) && $attr['TOC-RESETPAGENUM']) {
				$this->TOC_resetpagenum = $attr['TOC-RESETPAGENUM'];
			} else {
				$this->TOC_resetpagenum = '';
			} // mPDF 6
			if (isset($attr['TOC-PAGENUMSTYLE']) && $attr['TOC-PAGENUMSTYLE']) {
				$this->TOC_pagenumstyle = $attr['TOC-PAGENUMSTYLE'];
			} else {
				$this->TOC_pagenumstyle = '';
			} // mPDF 6
			if (isset($attr['TOC-SUPPRESS']) && ($attr['TOC-SUPPRESS'] || $attr['TOC-SUPPRESS'] === '0')) {
				$this->TOC_suppress = $attr['TOC-SUPPRESS'];
			} else {
				$this->TOC_suppress = '';
			} // mPDF 6
			if (isset($attr['TOC-SHEET-SIZE']) && $attr['TOC-SHEET-SIZE']) {
				$this->TOCsheetsize = $attr['TOC-SHEET-SIZE'];
			} else {
				$this->TOCsheetsize = '';
			}

			if (isset($attr['TOC-PREHTML']) && $attr['TOC-PREHTML']) {
				$this->TOCpreHTML = htmlspecialchars_decode($attr['TOC-PREHTML'], ENT_QUOTES);
			}
			if (isset($attr['TOC-POSTHTML']) && $attr['TOC-POSTHTML']) {
				$this->TOCpostHTML = htmlspecialchars_decode($attr['TOC-POSTHTML'], ENT_QUOTES);
			}
			if (isset($attr['TOC-BOOKMARKTEXT']) && $attr['TOC-BOOKMARKTEXT']) {
				$this->TOCbookmarkText = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'], ENT_QUOTES);
			}
		}

		if ($this->mpdf->y == $this->mpdf->tMargin && (!$this->mpdf->mirrorMargins || ($this->mpdf->mirrorMargins && $this->mpdf->page % 2 == 1))) {
			if ($toc_id) {
				$this->m_TOC[$toc_id]['TOCmark'] = $this->mpdf->page;
			} else {
				$this->TOCmark = $this->mpdf->page;
			}
			// Don't add a page
			if ($this->mpdf->page == 1 && count($this->mpdf->PageNumSubstitutions) == 0) {
				$resetpagenum = '';
				$pagenumstyle = '';
				$suppress = '';
				if (isset($attr['RESETPAGENUM'])) {
					$resetpagenum = $attr['RESETPAGENUM'];
				}
				if (isset($attr['PAGENUMSTYLE'])) {
					$pagenumstyle = $attr['PAGENUMSTYLE'];
				}
				if (isset($attr['SUPPRESS'])) {
					$suppress = $attr['SUPPRESS'];
				}
				if (!$suppress) {
					$suppress = 'off';
				}
				$this->mpdf->PageNumSubstitutions[] = ['from' => 1, 'reset' => $resetpagenum, 'type' => $pagenumstyle, 'suppress' => $suppress];
			}
			return [true, $toc_id];
		}

		// No break - continues as PAGEBREAK...
		return [false, $toc_id];
	}

}

Directory Contents

Dirs: 20 × Files: 30
Name Size Perms Modified Actions
Barcode DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Color DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Config DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Container DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Css DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Exception DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
File DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Fonts DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Gif DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Http DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Image DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Language DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Log DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Output DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Pdf DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Shaper DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Tag DIR
- drwxr-xr-x 2026-09-26 10:16:49
Edit Download
Utils DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
Writer DIR
- drwxr-xr-x 2026-08-19 22:05:56
Edit Download
3.54 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
5.92 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
2.32 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
76.41 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
14.58 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
67.39 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
11.59 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
165 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
521 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
34.06 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
731 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
4.97 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
938.82 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
73 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
82 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
248.46 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
163.10 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
1.02 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
2.33 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
5.79 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
3.31 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
1.50 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
32.67 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
7.23 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
169.31 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
14.22 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
128.86 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
49 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
1.17 KB lrw-r--r-- 2026-08-19 22:05:56
Edit Download
887 B lrw-r--r-- 2026-08-19 22:05:56
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 0xNothings — Secure File Manager. All rights reserved. Built with ❤️ & Tailwind x Dark UI