PDF_set_info_title
PDF_set_layer_dependency
PDF Functions
PHP Manual

# PDF_set_info

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

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.

Example #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);
?>

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

PDF_set_info_title
PDF_set_layer_dependency
PDF Functions
PHP Manual