<?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");
?>
PDF_set_info
(PHP 4 >= 4.0.1, PECL pdflib >= 1.0.0)
PDF_set_info — Rellenar el campo de información de un documento
Descripción
bool PDF_set_info
( resource
$p
, string $key
, string $value
)
Rellena el campo de información de un documento key con
value. Devuelve TRUE en caso de éxito o FALSE en caso de error.
many dot uy at hotmail dot com ¶
5 years ago
mrmueller at gmx dot com ¶
6 years ago
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");
