PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
mpdf
/
mpdf
/
src
/
Tag
<?php namespace Mpdf\Tag; use Mpdf\Mpdf; class PageFooter extends Tag { public function open($attr, &$ahtml, &$ihtml) { $tag = $this->getTagName(); $this->mpdf->ignorefollowingspaces = true; $pname = '_nonhtmldefault'; if ($attr['NAME']) { $pname = $attr['NAME']; } // mPDF 6 $p = []; // mPDF 6 $p['L'] = []; $p['C'] = []; $p['R'] = []; $p['L']['font-style'] = ''; $p['C']['font-style'] = ''; $p['R']['font-style'] = ''; if (isset($attr['CONTENT-LEFT'])) { $p['L']['content'] = $attr['CONTENT-LEFT']; } if (isset($attr['CONTENT-CENTER'])) { $p['C']['content'] = $attr['CONTENT-CENTER']; } if (isset($attr['CONTENT-RIGHT'])) { $p['R']['content'] = $attr['CONTENT-RIGHT']; } if (isset($attr['HEADER-STYLE']) || isset($attr['FOOTER-STYLE'])) { // font-family,size,weight,style,color if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE']); } if (isset($properties['FONT-FAMILY'])) { $p['L']['font-family'] = $properties['FONT-FAMILY']; $p['C']['font-family'] = $properties['FONT-FAMILY']; $p['R']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['L']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; $p['C']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; $p['R']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['L']['font-style'] = 'B'; $p['C']['font-style'] = 'B'; $p['R']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['L']['font-style'] .= 'I'; $p['C']['font-style'] .= 'I'; $p['R']['font-style'] .= 'I'; } if (isset($properties['COLOR'])) { $p['L']['color'] = $properties['COLOR']; $p['C']['color'] = $properties['COLOR']; $p['R']['color'] = $properties['COLOR']; } } if (isset($attr['HEADER-STYLE-LEFT']) || isset($attr['FOOTER-STYLE-LEFT'])) { if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE-LEFT']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE-LEFT']); } if (isset($properties['FONT-FAMILY'])) { $p['L']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['L']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['L']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['L']['font-style'] .='I'; } if (isset($properties['COLOR'])) { $p['L']['color'] = $properties['COLOR']; } } if (isset($attr['HEADER-STYLE-CENTER']) || isset($attr['FOOTER-STYLE-CENTER'])) { if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE-CENTER']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE-CENTER']); } if (isset($properties['FONT-FAMILY'])) { $p['C']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['C']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['C']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['C']['font-style'] .= 'I'; } if (isset($properties['COLOR'])) { $p['C']['color'] = $properties['COLOR']; } } if (isset($attr['HEADER-STYLE-RIGHT']) || isset($attr['FOOTER-STYLE-RIGHT'])) { if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE-RIGHT']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE-RIGHT']); } if (isset($properties['FONT-FAMILY'])) { $p['R']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['R']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['R']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['R']['font-style'] .= 'I'; } if (isset($properties['COLOR'])) { $p['R']['color'] = $properties['COLOR']; } } if (!empty($attr['LINE'])) { // 0|1|on|off $lineset = 0; if ($attr['LINE'] == '1' || strtoupper($attr['LINE']) === 'ON') { $lineset = 1; } $p['line'] = $lineset; } // mPDF 6 if ($tag === 'PAGEHEADER') { $this->mpdf->DefHeaderByName($pname, $p); } else { $this->mpdf->DefFooterByName($pname, $p); } } public function close(&$ahtml, &$ihtml) { } }
[-] Sup.php
[edit]
[-] Footer.php
[edit]
[-] Strong.php
[edit]
[-] TBody.php
[edit]
[-] H3.php
[edit]
[-] Dt.php
[edit]
[-] HGroup.php
[edit]
[-] H4.php
[edit]
[-] WatermarkText.php
[edit]
[-] Ttz.php
[edit]
[-] Meter.php
[edit]
[-] TocPageBreak.php
[edit]
[-] H1.php
[edit]
[-] NewPage.php
[edit]
[-] Section.php
[edit]
[-] Small.php
[edit]
[-] Input.php
[edit]
[-] IndexInsert.php
[edit]
[-] Pre.php
[edit]
[-] PageBreak.php
[edit]
[-] Option.php
[edit]
[+]
..
[-] BlockQuote.php
[edit]
[-] Big.php
[edit]
[-] PageFooter.php
[edit]
[-] Address.php
[edit]
[-] Columns.php
[edit]
[-] H5.php
[edit]
[-] Span.php
[edit]
[-] WatermarkImage.php
[edit]
[-] Legend.php
[edit]
[-] TocEntry.php
[edit]
[-] Bdo.php
[edit]
[-] Div.php
[edit]
[-] SubstituteTag.php
[edit]
[-] TFoot.php
[edit]
[-] Form.php
[edit]
[-] Table.php
[edit]
[-] Tts.php
[edit]
[-] I.php
[edit]
[-] Ol.php
[edit]
[-] Samp.php
[edit]
[-] Bdi.php
[edit]
[-] Kbd.php
[edit]
[-] P.php
[edit]
[-] Img.php
[edit]
[-] Tta.php
[edit]
[-] S.php
[edit]
[-] Header.php
[edit]
[-] Details.php
[edit]
[-] Code.php
[edit]
[-] A.php
[edit]
[-] Mark.php
[edit]
[-] IndexEntry.php
[edit]
[-] Bookmark.php
[edit]
[-] DotTab.php
[edit]
[-] THead.php
[edit]
[-] Main.php
[edit]
[-] Progress.php
[edit]
[-] Article.php
[edit]
[-] Center.php
[edit]
[-] Dl.php
[edit]
[-] Ul.php
[edit]
[-] SetPageHeader.php
[edit]
[-] Del.php
[edit]
[-] Figure.php
[edit]
[-] FieldSet.php
[edit]
[-] FormFeed.php
[edit]
[-] Ins.php
[edit]
[-] Cite.php
[edit]
[-] Strike.php
[edit]
[-] PageHeader.php
[edit]
[-] Summary.php
[edit]
[-] H6.php
[edit]
[-] NewColumn.php
[edit]
[-] TextArea.php
[edit]
[-] Tr.php
[edit]
[-] H2.php
[edit]
[-] Td.php
[edit]
[-] SetHtmlPageHeader.php
[edit]
[-] B.php
[edit]
[-] Select.php
[edit]
[-] Toc.php
[edit]
[-] Caption.php
[edit]
[-] Sub.php
[edit]
[-] Font.php
[edit]
[-] BarCode.php
[edit]
[-] Q.php
[edit]
[-] FigCaption.php
[edit]
[-] SetPageFooter.php
[edit]
[-] U.php
[edit]
[-] Hr.php
[edit]
[-] Nav.php
[edit]
[-] ColumnBreak.php
[edit]
[-] Time.php
[edit]
[-] Br.php
[edit]
[-] Dd.php
[edit]
[-] SetHtmlPageFooter.php
[edit]
[-] VarTag.php
[edit]
[-] Annotation.php
[edit]
[-] Aside.php
[edit]
[-] Li.php
[edit]
[-] Acronym.php
[edit]
[-] BlockTag.php
[edit]
[-] Tt.php
[edit]
[-] Tag.php
[edit]
[-] Em.php
[edit]
[-] Th.php
[edit]
[-] InlineTag.php
[edit]
[-] TextCircle.php
[edit]