Guest User

Untitled

a guest
Mar 28th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1.     function __construct($map, $orientation, $units, $format, $pdfSettings, $prefmap = true, $layers) {
  2.         parent::__construct($orientation, $units, $format, true, $encoding = 'ISO-8859-1');
  3.        
  4.         // only for tcpdf version >= 3
  5.         // - font not well defined --> errors
  6.         // - header and footer printed = lines on top and bottom
  7.         $this->setPrintHeader(false);
  8.         $this->setPrintFooter(false);
  9.  
  10.         $mapW = $pdfSettings['width'];
  11.         $mapH = $pdfSettings['height'];
  12.  
  13.         $this->pdfSettings = $pdfSettings;
  14.         $this->prefmap = $prefmap;
  15.  
  16.         foreach ($layers as $l) {
  17.  
  18.             // this function init all position parameters, legend, ...
  19.             $this->initDimensions($mapW, $mapH);
  20.    
  21.             // add layer
  22.             $_SESSION["groups"] = array();
  23.             $_SESSION["groups"][] = $l['name'];
  24.  
  25.             // set scale
  26.             $scale = $l['scale'] * 1; //*1 because it comes as string
  27.             $printScale = $scale;
  28.            
  29.             // printmap creation done in derivated classes :
  30.             $this->createPrintMap($map, $mapW, $mapH, $printScale, 'pdf', 144, false, false, $pdfSettings);
  31.            
  32.             // avoid bad title
  33.             $title = $pdfSettings['printtitle'] ? $pdfSettings['printtitle'] : $pdfSettings['pdftitle'];
  34.             $this->initPDF($pdfSettings['author'], $title, $pdfSettings['defFont'], $pdfSettings['defFontSize']);
  35.             $this->printPDF($map, $mapW, $mapH, $this->printUrlList, $printScale, $l);
  36.         }
  37.     }
Add Comment
Please, Sign In to add comment