8 public function open($attr, &$ahtml, &$ihtml)
10 if (isset($attr['NAME']) && $attr['NAME'] != '') {
13 if ($this->mpdf
->anchor2Bookmark
) {
15 $objattr['CONTENT'] = htmlspecialchars_decode($attr['NAME'], ENT_QUOTES
);
16 $objattr['type'] = 'bookmark';
17 if (!empty($attr['LEVEL'])) {
18 $objattr['bklevel'] = $attr['LEVEL'];
20 $objattr['bklevel'] = 0;
22 $e = "\xbb\xa4\xactype=bookmark,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
24 /* -- END BOOKMARKS -- */
25 if ($this->mpdf
->tableLevel
) { // *TABLES*
26 $this->mpdf
->_saveCellTextBuffer($e, '', $attr['NAME']); // *TABLES*
29 $this->mpdf
->_saveTextBuffer($e, '', $attr['NAME']); //an internal link (adds a space for recognition)
32 if (isset($attr['HREF'])) {
33 $this->mpdf
->InlineProperties
['A'] = $this->mpdf
->saveInlineProperties();
34 $properties = $this->cssManager
->MergeCSS('INLINE', 'A', $attr);
35 if (!empty($properties)) {
36 $this->mpdf
->setCSS($properties, 'INLINE');
38 $this->mpdf
->HREF
= $attr['HREF']; // mPDF 5.7.4 URLs
42 public function close(&$ahtml, &$ihtml)
44 $this->mpdf
->HREF
= '';
45 if (isset($this->mpdf
->InlineProperties
['A'])) {
46 $this->mpdf
->restoreInlineProperties($this->mpdf
->InlineProperties
['A']);
48 unset($this->mpdf
->InlineProperties
['A']);