SetaPDF_Core_Document_Catalog A class representing the document catalog

File: /SetaPDF/Core/Document/Catalog.php

Class hierarchy

Summary

Properties

$_acroForm

$_additionalActions

$_document

$_optionalContent

$_outlines

$_pageLabels

$_viewerPreferences


Static Methods

getDocumentMagicMethods()

static public array SetaPDF_Core_Document_Catalog::getDocumentMagicMethods ( void )

Returns method names which should be available in a documents instance too.


Methods

__construct()

public SetaPDF_Core_Document_Catalog::__construct ( SetaPDF_Core_Document $document )

The constructor.

Parameters
$document : SetaPDF_Core_Document
 

cleanUp()

public void SetaPDF_Core_Document_Catalog::cleanUp ( void )

Release cycled references / memory.

getAcroForm()

public SetaPDF_Core_Document_Catalog_AcroForm SetaPDF_Core_Document_Catalog::getAcroForm ( void )

Get the documents AcroForm object.

This method resolves or creates the AcroForm dictionary and returns it.

getAdditionalActions()

public SetaPDF_Core_Document_Catalog_AdditionalActions SetaPDF_Core_Document_Catalog::getAdditionalActions ( void )

Get the additional actions object.

getBaseUri()

public null|string SetaPDF_Core_Document_Catalog::getBaseUri ( void )

Get the base URI that shall be used in resolving relative URI references.

URI actions within the document may specify URIs in partial form, to be interpreted relative to this base address. If no base URI is specified, such partial URIs shall be interpreted relative to the location of the document itself.

getDictionary()

public null|SetaPDF_Core_Type_Dictionary SetaPDF_Core_Document_Catalog::getDictionary ( [ boolean $create = false ] )

Get the catalog dictionary.

Parameters
$create : boolean
 

getDocument()

public SetaPDF_Core_Document SetaPDF_Core_Document_Catalog::getDocument ( void )

Get the document instance.

getExtensions()

public SetaPDF_Core_Document_Catalog_Extensions SetaPDF_Core_Document_Catalog::getExtensions ( void )

Get the extensions helper instance.

getMetadata()

public null|string SetaPDF_Core_Document_Catalog::getMetadata ( void )

Get the metadata stream.

This is a method for low level access to the XMP stream data. The SetaPDF_Core_Document_Info class offers a same named method, that allows you to access the XMP package via a DOMDocument instance.

The class also allows you to automatically sync Info dictionary data with the XMP metadata.

Return Values

Null if no document metadata are available.
A string if the desired structure is available.

getNames()

public SetaPDF_Core_Document_Catalog_Names SetaPDF_Core_Document_Catalog::getNames ( void )

Get a names object from the document.

getOpenAction()

public null|SetaPDF_Core_Document_Action|SetaPDF_Core_Document_Destination SetaPDF_Core_Document_Catalog::getOpenAction ( void )

Get the open action.

The open action entry specifies a destination that shall be displayed or an action that shall be executed when the document is opened.

Additional document related actions could be get or set in the SetaPDF_Core_Document_Catalog_AdditionalActions class that could be get with the getAdditionalActions() method.

Return Values

An action or destination instance or null if no open action is defined.

Exceptions

Throws SetaPDF_Core_Exception

getOptionalContent()

public SetaPDF_Core_Document_Catalog_OptionalContent SetaPDF_Core_Document_Catalog::getOptionalContent ( void )

Get the documents optional content object.

getOutlines()

public SetaPDF_Core_Document_Catalog_Outlines SetaPDF_Core_Document_Catalog::getOutlines ( void )

Get the documents outline object.

getOutputIntents()

public SetaPDF_Core_Document_Catalog_OutputIntents SetaPDF_Core_Document_Catalog::getOutputIntents ( void )

Get the output intents object.

getPageLabels()

public SetaPDF_Core_Document_Catalog_PageLabels SetaPDF_Core_Document_Catalog::getPageLabels ( void )

Get the documents page labels object.

getPageLayout()

public string SetaPDF_Core_Document_Catalog::getPageLayout ( void )

Get the page layout.

See
  • PDF 32000-1:2008 - 7.7.2 Document Catalog

getPageMode()

public string SetaPDF_Core_Document_Catalog::getPageMode ( void )

Get the page mode.

See
  • PDF 32000-1:2008 - 7.7.2 Document Catalog

getPages()

public SetaPDF_Core_Document_Catalog_Pages SetaPDF_Core_Document_Catalog::getPages ( void )

Get a pages object from the document.

getPermissions()

public SetaPDF_Core_Document_Catalog_Permissions SetaPDF_Core_Document_Catalog::getPermissions ( void )

Get the permission object.

getVersion()

public string|null SetaPDF_Core_Document_Catalog::getVersion ( void )

Get the value of the Version entry of the catalog dictionary.

This value defines the version of the PDF specification to which the document conforms if later than the version specified in the file's header.

getViewerPreferences()

public SetaPDF_Core_Document_Catalog_ViewerPreferences SetaPDF_Core_Document_Catalog::getViewerPreferences ( void )

Get a viewer preferences object.

setBaseUri()

public void SetaPDF_Core_Document_Catalog::setBaseUri ( string $uri )

Set the base URI.

Parameters
$uri : string
 
See

setMetadata()

public void SetaPDF_Core_Document_Catalog::setMetadata ( string $metadata )

Set the metadata stream.

To remove the metadata just pass null to this method.

Parameters
$metadata : string
 

setOpenAction()

public void SetaPDF_Core_Document_Catalog::setOpenAction ( SetaPDF_Core_Document_Destination|SetaPDF_Core_Document_Action $openAction )

Set the open action.

The open action entry specifies a destination that shall be displayed or an action that shall be executed when the document is opened.

Additional document related actions could be get or set in the SetaPDF_Core_Document_Catalog_AdditionalActions class that could be get with the getAdditionalActions() method.

Parameters
$openAction : SetaPDF_Core_Document_Destination|SetaPDF_Core_Document_Action

An SetaPDF_Core_Document_Action or SetaPDF_Core_Document_Destination object

Exceptions

Throws InvalidArgumentException

setPageLayout()

public void SetaPDF_Core_Document_Catalog::setPageLayout ( string $pageLayout )

Set the page layout.

Possible values are declared as class constants in the SetaPDF_Core_Document_PageLayout class.

Parameters
$pageLayout : string

The name of the page layout

See

setPageMode()

public void SetaPDF_Core_Document_Catalog::setPageMode ( string $pageMode )

Set the page mode.

Possible values are declared as class constants in the SetaPDF_Core_Document_PageMode class.

Parameters
$pageMode : string

The name of the page mode

See

setVersion()

public void SetaPDF_Core_Document_Catalog::setVersion ( string $version )

Set the version of the PDF specification to which the document conforms.

Parameters
$version : string