Пример #1
0
 $pagewidth = $pagesize[0] = $width;
 $pageheight = $pagesize[1] = $height;
 $pdf = new MYPDF("portrait", "in", $size, true, 'UTF-8', false);
 $pdf->SetFont($annotate_font, '', 8);
 // set document information
 $pdf->SetCreator(PDF_CREATOR);
 $pdf->SetAuthor($userfullname);
 if ($is_collection) {
     $pdf->SetTitle(i18n_get_collection_name($collectiondata) . ' ' . $date);
 } else {
     $pdf->SetTitle(i18n_get_translated($resourcedata['field' . $view_title_field]) . ' ' . $date);
 }
 $pdf->SetSubject($lang['annotations']);
 $pdf->setPrintHeader(false);
 $pdf->setPrintFooter(false);
 $pdf->setMargins(0.5, 0.5, 0.5);
 // add a page
 for ($n = 0; $n < count($resources); $n++) {
     $pdf->AddPage();
     $resourcedata = $resources[$n];
     $ref = $resources[$n]['ref'];
     $access = get_resource_access($resources[$n]['ref']);
     // feed get_resource_access the resource array rather than the ref, since access is included.
     $use_watermark = check_use_watermark();
     $imgpath = get_resource_path($ref, true, "hpr", false, "jpg", -1, 1, $use_watermark);
     if (!file_exists($imgpath)) {
         $imgpath = get_resource_path($ref, true, "lpr", false, "jpg", -1, 1, $use_watermark);
     }
     if (!file_exists($imgpath)) {
         $imgpath = get_resource_path($ref, true, "scr", false, "jpg", -1, 1, $use_watermark);
     }
Пример #2
0
		public function Footer() {
			if ($this->page != 1) {
	            // Position at 15 mm from bottom
	            $this->SetY(-15);
	            // Set font
	            $this->SetFont('times', '', 11);
	            // Page number
	          	$this->Cell(0, 0, $this->getAliasNumPage(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
	        }     
        }    
	}
	$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false, 'test');
	$pdf->setStoryTitle($title[0]['title']);
	$pdf->finished($finished[0]['date']);
	$pdf->setstoryWriters($writers);
	$pdf->setHeaderFont(array('times', '', 25));
	$pdf->setFooterData(array(0,64,0), array(0,64,128));
	$pdf->setMargins(10,30,10,30);
	$pdf->AddPage();
	$pdf->AddPage();
	$text = '';
	foreach($words as $word) {
		$text .= ' ' . $word['words'];
	}
	$pdf->Text(9,35,$text,0);
	$pdf->SetFont('courier');
	$pdf->setCellHeightRatio(3);
	// $pdf->MultiCell(0, 0, 0, 0, 'L', false, 1, 10, 30, true, 2, false, true, 0, 'T', true);
	$pdf->Output('GN_' . $title[0]['title'] . '.pdf', 'I');

?>