Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function __construct($map, $orientation, $units, $format, $pdfSettings, $prefmap = true, $layers) {
- parent::__construct($orientation, $units, $format, true, $encoding = 'ISO-8859-1');
- // only for tcpdf version >= 3
- // - font not well defined --> errors
- // - header and footer printed = lines on top and bottom
- $this->setPrintHeader(false);
- $this->setPrintFooter(false);
- $mapW = $pdfSettings['width'];
- $mapH = $pdfSettings['height'];
- $this->pdfSettings = $pdfSettings;
- $this->prefmap = $prefmap;
- foreach ($layers as $l) {
- // this function init all position parameters, legend, ...
- $this->initDimensions($mapW, $mapH);
- // add layer
- $_SESSION["groups"] = array();
- $_SESSION["groups"][] = $l['name'];
- // set scale
- $scale = $l['scale'] * 1; //*1 because it comes as string
- $printScale = $scale;
- // printmap creation done in derivated classes :
- $this->createPrintMap($map, $mapW, $mapH, $printScale, 'pdf', 144, false, false, $pdfSettings);
- // avoid bad title
- $title = $pdfSettings['printtitle'] ? $pdfSettings['printtitle'] : $pdfSettings['pdftitle'];
- $this->initPDF($pdfSettings['author'], $title, $pdfSettings['defFont'], $pdfSettings['defFontSize']);
- $this->printPDF($map, $mapW, $mapH, $this->printUrlList, $printScale, $l);
- }
- }
Add Comment
Please, Sign In to add comment