PDF_set_info

(PHP 4 >= 4.0.1, PECL)

PDF_set_info -- Fills a field of the document information

Description

void pdf_set_info ( int pdf document, string fieldname, string value )

The PDF_set_info() function sets an information field of a pdf document. Possible values for the fieldname are 'Subject', 'Title', 'Creator', 'Author', 'Keywords' and one user-defined name. It can be called before beginning a page.

Ejemplo 1. Setting document information

<?php 
$fd = fopen("test.pdf", "w");
$pdfdoc = pdf_open($fd);
pdf_set_info($pdfdoc, "Author", "Uwe Steinmann");
pdf_set_info($pdfdoc, "Creator", "Uwe Steinmann");
pdf_set_info($pdfdoc, "Title", "Testing Info Fields");
pdf_set_info($pdfdoc, "Subject", "Test");
pdf_set_info($pdfdoc, "Keywords", "Test, Fields");
pdf_set_info($pdfdoc, "CustomField", "What ever makes sense");
pdf_begin_page($pdfdoc, 595, 842);
pdf_end_page($pdfdoc);
pdf_close($pdfdoc);
?>

Nota: This function replaces PDF_set_info_keywords(), PDF_set_info_title(), PDF_set_info_subject(), PDF_set_info_creator(), PDF_set_info_sybject().

Hosting by: hurra.com
Generated: 2007-01-26 18:01:04