isSaved) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$this->outputFileName.'"'); header('Pragma: public'); ob_end_flush(); $this->objPdf->Output($this->outputFileName,'S'); } else die("PDF output not rendered yet."); } public function returnAbsoluteUrl() { $mbjson = new Mapbender_JSON(); if ($this->isSaved) { if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") $prot = "https://"; else $prot = "http://"; $absoluteUrlToPdf = $prot.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/printPDF_download.php?f=".$this->outputFileName."&".SID; return $mbjson->encode(array("outputFileName"=>$absoluteUrlToPdf)); } else return $mbjson->encode(array("error"=>"Possibly no map urls delivered.")); } public function returnUrl() { $mbjson = new Mapbender_JSON(); if ($this->isSaved) { return $mbjson->encode(array("outputFileName"=>TMPDIR."/".$this->outputFileName)); } else return $mbjson->encode(array("error"=>"Possibly no map urls delivered.")); } } ?>