PHP Doku:: Erzeugt virtuelle PDFlib-Datei - function.pdf-create-pvf.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenPDFPDF FunktionenPDF_create_pvf

Ein Service von Reinhard Neidl - Webprogrammierung.

PDF Funktionen

<<PDF_create_gstate

PDF_create_textflow>>

PDF_create_pvf

(PECL pdflib >= 2.0.0)

PDF_create_pvfErzeugt virtuelle PDFlib-Datei

Beschreibung

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

Erzeugt eine benannte schreibgeschützte (read-only) Datei aus Daten im Speicher.


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
Norbert Bruder
27.02.2008 17:28
<?php
$im
= @ImageCreate (50, 100)
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 1, 5, 5, "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_id, 50, 770, 1);                        //Places the image in the PDF-file
?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)