PHP Doku:: Füllt Dokumentinfofeld - function.pdf-set-info.html

Verlauf / Chronik / History: (1) anzeigen

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

Ein Service von Reinhard Neidl - Webprogrammierung.

PDF Funktionen

<<PDF_set_info_title

PDF_set_layer_dependency>>

PDF_set_info

(PHP 4 >= 4.0.1, PECL pdflib >= 1.0.0)

PDF_set_infoFüllt Dokumentinfofeld

Beschreibung

bool PDF_set_info ( resource $p , string $key , string $value )

Trägt value in das Dokumentinfofeld key ein. Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.


2 BenutzerBeiträge:
- Beiträge aktualisieren...
many dot uy at hotmail dot com
13.06.2008 18:48
<?php
$pdf
= pdf_new();

pdf_open_file($pdf, "test.pdf");

// set PDF properties
pdf_set_info($pdf, "Author", "Martín Gonzalez");
pdf_set_info($pdf, "Title", "Test PDF");
pdf_set_info($pdf, "Creator", "Martín Gonzalez");
pdf_set_info($pdf, "Subject", "Test  PDF");

?>
mrmueller at gmx dot com
10.09.2006 17:00
If the first example does'nt show the correct dcoument property in Acrobat Reader, you should change first letters of the paramentes in capital letter. Instead "author" you should type "Author"...

// $pdf is the name of the pdf ducoment you created.
pdf_set_info($pdf, "Author", "Ahmed");
pdf_set_info($pdf, "Title", "PDF tutorial");
pdf_set_info($pdf, "Subject" , "PDF tutorial");
pdf_set_info($pdf, "Creator", "phpnet");



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",...)