• Bookmark at: Del.icio.us
  • Bookmark at: Mister Wong
  • Bookmark at: Linkarena
  • Bookmark at: Digg
  • Bookmark at: Yahoo
  • Bookmark at: Google
  • Bookmark at: Icio

Manuals

 

SetaPDF_MetaManager::setInfoData()

Description

class SetaPDF_MetaManager extends SetaPDF {
mixed setInfoData ( mixed $key[, string $value=null] ) }

Sets the data of the document information dictionary (for example Title, Author, Sibject, Keywords, Creator, Producer, CreationDate, ModDate, Trapped).

Actually the API doesn't automatically synchronize the values between XMP metadata and metadata in the document information dictionary.

Parameters

$key

The key for entry in the document information dictionary.

The PDF specification predefines follwing keys:

  • Title - The document's title
  • Author - The name of the person who created the document.
  • Subject - The subject of the document.
  • Keywords - Keywords associated with the document.
  • Creator - The name of the application that created the original document from which the PDF document was converted.
  • Producer - The application that created the PDF document.
  • CreationDate - The date and time the document was created.
  • ModDate - The date and time the document was most recently modified.

For details about the above entries see the PDF Reference 10.2.1.

New keys should be choosen with care so that they make sense to users.

This parameter also takes an array of key and value pairs!

$value

The string value for the desired key.

If you use a date value (CreationDate and/or ModDate) make sure you use the right format (see PDF Reference 3.8.3). The ModDate will be changed by default when the document is saved and you've not defined an own value for it. If you set the ModDate your own, make sure that it's after or the same as set in the XMP metadata.

To delete an entry from the document information dictionary just pass "null" as value.

Return Value

True for success, a SetaPDF_Error object if an error occurs.