修改数据中心名称;增加无缩略图的处理
This commit is contained in:
parent
92324ade27
commit
fc22b57557
|
@ -443,7 +443,7 @@ class ServiceController extends Zend_Controller_Action
|
|||
$pdf->metadata=$row;
|
||||
$pdf->Draw();
|
||||
$pdf->setTitle($row['title'],true);
|
||||
$pdf->setAuthor('中国西部环境与生态科学数据中心',true);
|
||||
$pdf->setAuthor('寒区旱区科学数据中心',true);
|
||||
$this->getResponse()->setHeader('Content-Type', 'application/pdf');
|
||||
//->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"');
|
||||
$pdf->Output($row['title'].'.pdf','I');
|
||||
|
|
|
@ -28,10 +28,10 @@ class MetadataPDF extends PDF_Unicode
|
|||
$this->Image('http://westdc.westgis.ac.cn/images/westdc_logo_white.gif',80,30,0,0,'','http://westdc.westgis.ac.cn/');
|
||||
$this->SetFont('uGB','B',20);
|
||||
$this->setXY(0,70);
|
||||
$this->Cell(0,0,'中国西部环境与生态科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/');
|
||||
$this->Cell(0,0,'寒区旱区科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/');
|
||||
$imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid'];
|
||||
$imgsize=getimagesize($imgurl);
|
||||
if ($imgsize)
|
||||
if (this->metadata['filetype'] && $imgsize)
|
||||
{
|
||||
if ($imgsize[0]/$imgsize[1]>200/180)
|
||||
$this->Image($imgurl,5,110,200,0,$this->metadata['filetype']);
|
||||
|
@ -104,7 +104,7 @@ class MetadataPDF extends PDF_Unicode
|
|||
$this->ln(5);
|
||||
$x=$this->getX();$y=$this->getY();
|
||||
$w=50*abs(($this->metadata['north']-$this->metadata['south'])/($this->metadata['west']-$this->metadata['east']));
|
||||
$this->Image('http://'.$_SERVER['SERVER_NAME'].'/service/thumb/uuid/'.$this->metadata['uuid'],$x+80+$w,$y,0,50,$this->metadata['filetype']);
|
||||
if ($this->metadata['filetype']) $this->Image('http://'.$_SERVER['SERVER_NAME'].'/service/thumb/uuid/'.$this->metadata['uuid'],$x+80+$w,$y,0,50,$this->metadata['filetype']);
|
||||
$this->rect($x+50,$y,$w,50);
|
||||
$this->setXY($x+55,$y-4);
|
||||
$this->write(5,'N:'.$this->metadata['north']);
|
||||
|
|
Loading…
Reference in New Issue