Manuals

 

SetaPDF_MetaManager::setPageData()

Description

class SetaPDF_MetaManager extends SetaPDF {
mixed setPageData ( integer $pageNo, mixed $key[, $value=null] ) }

Sets page related data.

Parameters

$pageNo

The page number of the page you want to add/change values.

$key

The key or an array of key and value pairs of the values you want to set.

Possible keys:

  • MediaBox
  • CropBox
  • BleedBox
  • TrimBox
  • ArtBox
  • LastModified
  • Rotate

$value

The value of the $key.

The box type values (MediaBox, CropBox,...) have to be in the following structure:

array(
   'llx' => ..., // Lower Left X
   'lly' => ..., // Lower Left Y
   'urx' => ..., // Upper Right X
   'ury' => ...  // Upper Right Y
);

The Rotate has to be an integer value (0 or a multiple of 90).

The LastModified value has to be a datetime string (see PDF Reference 3.8.3).

Return Value

An array of new page data values on success, a SetaPDF_Error object if an error occurs.

Version

Available since version 1.1.