当前位置: 首页>>代码示例>>PHP>>正文


PHP pdf_end_page函数代码示例

本文整理汇总了PHP中pdf_end_page函数的典型用法代码示例。如果您正苦于以下问题:PHP pdf_end_page函数的具体用法?PHP pdf_end_page怎么用?PHP pdf_end_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pdf_end_page函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createPDF

 public function createPDF($fname)
 {
     $pdf = pdf_new();
     pdf_open_file($pdf, '');
     $image = pdf_load_image($pdf, "png", $fname, "");
     $w = pdf_get_value($pdf, "imagewidth", $image);
     $h = pdf_get_value($pdf, "imageheight", $image);
     pdf_begin_page($pdf, $w * 2, $h * 2);
     pdf_place_image($pdf, $image, $w / 2, $h / 2, 1);
     pdf_end_page($pdf);
     pdf_close($pdf);
     $mybuf = PDF_get_buffer($pdf);
     $mylen = strlen($mybuf);
     header("Content-type: application/pdf");
     header("Content-Length: {$mylen}");
     header("Content-Disposition: inline; filename=chart.pdf");
     print $mybuf;
     PDF_delete($pdf);
     unlink($fname);
 }
开发者ID:BoulderOWASP,项目名称:SnowFROC_CTF_2013_Exercises,代码行数:20,代码来源:phpchart.class.php

示例2: save

 /**
  * Output the result of the canvas
  *
  * @param array $param Parameter array
  * @abstract
  */
 function save($param = false)
 {
     parent::save($param);
     pdf_end_page($this->_pdf);
     pdf_close($this->_pdf);
     $buf = pdf_get_buffer($this->_pdf);
     $len = strlen($buf);
     $fp = @fopen($param['filename'], 'wb');
     if ($fp) {
         fwrite($fp, $buf, strlen($buf));
         fclose($fp);
     }
     pdf_delete($this->_pdf);
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:20,代码来源:PDF.php

示例3: next_page

 function next_page($height)
 {
     if ($this->_status == PDFLIB_STATUS_PAGE_STARTED) {
         pdf_end_page($this->pdf);
     }
     pdf_begin_page($this->pdf, mm2pt($this->media->width()), mm2pt($this->media->height()));
     // Calculate coordinate of the next page bottom edge
     $this->offset -= $height - $this->offset_delta;
     // Reset the "correction" offset to it normal value
     // Note: "correction" offset is an offset value required to avoid page breaking
     // in the middle of text boxes
     $this->offset_delta = 0;
     pdf_translate($this->pdf, 0, -$this->offset);
     parent::next_page($height);
     $this->_status = PDFLIB_STATUS_PAGE_STARTED;
 }
开发者ID:VUW-SIM-FIS,项目名称:emiemi,代码行数:16,代码来源:output.pdflib.class.php

示例4: next_page

 function next_page()
 {
     $this->_show_watermark();
     $this->current_page++;
     pdf_end_page($this->pdf);
     pdf_begin_page($this->pdf, mm2pt($this->media->width()), mm2pt($this->media->height()));
     // Calculate coordinate of the next page bottom edge
     $this->offset -= $this->height - $this->offset_delta;
     // Reset the "correction" offset to it normal value
     // Note: "correction" offset is an offset value required to avoid page breaking
     // in the middle of text boxes
     $this->offset_delta = 0;
     pdf_translate($this->pdf, 0, -$this->offset);
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:14,代码来源:output.pdflib.class.php

示例5: pdf_restore

pdf_restore($pdf);
/* draw second hand */
pdf_setrgbcolor($pdf, 1.0, 0.0, 0.0);
pdf_setlinewidth($pdf, 2);
pdf_save($pdf);
pdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0));
pdf_moveto($pdf, -$radius / 5, 0.0);
pdf_lineto($pdf, $radius, 0.0);
pdf_stroke($pdf);
pdf_restore($pdf);
/* draw little circle at center */
pdf_circle($pdf, 0, 0, $radius / 30);
pdf_fill($pdf);
pdf_restore($pdf);
/* DONE */
pdf_end_page($pdf);
pdf_close($pdf);
pdf_delete($pdf);
// hides "Generating ..." message:
echo "<script language='JavaScript'>document.getElementById('loading').style.display = 'none';</script>";
if (!file_exists($file)) {
    ?>
    <h2 style="color: red">Error occured: file <?php 
    echo $file;
    ?>
 does not exist!</h2>
<?php 
}
?>
    It is exactly <?php 
echo $stime;
开发者ID:dw4dev,项目名称:Phalanger,代码行数:31,代码来源:clock.php

示例6: my_new_pdf_end_page

 function my_new_pdf_end_page(&$pdf)
 {
     pdf_end_page($pdf);
 }
开发者ID:rickogden,项目名称:web-pres2,代码行数:4,代码来源:display.php

示例7: writeToStream

 function writeToStream($stream)
 {
     pdf_end_page($this->pdf);
     pdf_close($this->pdf);
     $buf = pdf_get_buffer($this->pdf);
     fwrite($stream, $buf);
     pdf_delete($this->pdf);
 }
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:8,代码来源:pdflib.php

示例8: end_page

 function end_page()
 {
     pdf_end_page($this->pdf);
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:4,代码来源:pdf.php


注:本文中的pdf_end_page函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。