Document New in 0.1.0 Version 0.4.0

Describes single document

Properties

Name Type Access Description
$info DocumentInfo Read Only Stores document meta informations
$pages New in 0.2.0 PageCollection Read Only Stores pages list

Methods

Name Type Description
No methods

Examples

Document with information
Create new document with meta informations in single instruction.

$document = new Document([
  'title' => 'My document',
  'author' => 'Josh Smith',
  'subject' => 'New math project',
  'keywords' => 'math, project, science'
]);

Adding new specified page to document
Creates new page and adds it to the document. Page orientation and size information can be passed as method argument.

$page = $document->pages->add([
  'orientation' => PageOrientationInfo::getPortrait(),
  'size' => PageSizeInfo::getA5()
]);