PDF 函数
在线手册:中文  英文

PDF_create_pvf

(PECL pdflib >= 2.0.0)

PDF_create_pvfCreate PDFlib virtual file

说明

bool PDF_create_pvf ( resource $pdfdoc , string $filename , string $data , string $optlist )

Creates a named virtual read-only file from data provided in memory.


PDF 函数
在线手册:中文  英文

用户评论:

Norbert Bruder (2008-02-27 08:28:17)

<?php
$im 
= @ImageCreate (50100)
$background_color ImageColorAllocate ($im255255255);
$text_color ImageColorAllocate ($im2331491);
ImageString ($im155"Test"$text_color);

ob_start();                                                        //turn output buffering on
ImagePNG ($im);                                                    //create PNG
$img_buffer ob_get_contents();                                   //get the PNG of the output buffer 
ob_end_clean();                                                    //clear and turns off this output buffering
pdf_create_pvf($pdf"/pvf/image/image.png"$img_buffer"");     //create a named virtual read-only file 
$img_id pdf_load_image($pdf"png""/pvf/image/image.png"""); //open the named virtual read-only file
pdf_place_image($pdf$img_id507701);                        //Places the image in the PDF-file 
?>

易百教程