News
Modify document properties with PHPDocX
- Jun 03, 2011
One may easily modify the document properties with PHPDocX.
Besides the standard options, like title, subject or creator, etcetera, one may add custom properties in a simple manner as follows:
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$paramsProperties = array(
'title' => 'my title',
'subject' => 'my subject',
'creator' => 'the creator',
'keywords' => 'my keywords',
'description' => 'my description',
'category' => 'my category',
'custom' => array(
array(
'title' => 'my title 1',
'value' => 'my content 1'),
array(
'title' => 'my title 2',
'value' => 'my content 2'),
array(
'title' => 'my title 3',
'value' => 'my content 3')
)
);
$docx->addProperties($paramsProperties);
$docx->createDocx('example_properties');