SetaPDF_Core_Document_Catalog A class representing the document catalog
File: /SetaPDF v2/Core/Document/Catalog.php
Class hierarchy
Summary
Methods
- __construct()
- cleanUp()
- getAcroForm()
- getAdditionalActions()
- getBaseUri()
- getDests()
- getDictionary()
- getDocument()
- getExtensions()
- getLang()
- getMarkInfo()
- getMetadata()
- getNames()
- getOpenAction()
- getOptionalContent()
- getOutlines()
- getOutputIntents()
- getPageLabels()
- getPageLayout()
- getPageMode()
- getPages()
- getPermissions()
- getStructTreeRoot()
- getVersion()
- getViewerPreferences()
- setBaseUri()
- setLang()
- setMetadata()
- setOpenAction()
- setPageLayout()
- setPageMode()
- setVersion()
Properties
$_additionalActions
The additional actions object
$_optionalContent
The optional content object
$_outputIntents
The output intent object
$_structTreeRoot
The root structure tree object
$_viewerPreferences
The viewer preferences object
Static Methods
getDocumentMagicMethods()
Returns method names which should be available in a documents instance too.
Methods
__construct()
getAcroForm()
Get the documents AcroForm object.
This method resolves or creates the AcroForm dictionary and returns it.
getAdditionalActions()
Get the additional actions object.
getBaseUri()
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.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
getDictionary()
Get the catalog dictionary.
Parameters
- $create : boolean
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
getExtensions()
Get the extensions helper instance.
getLang()
Get the language identifier.
Parameters
- $encoding : string
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
getMetadata()
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.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
getOpenAction()
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()
Get the documents optional content object.
getOutputIntents()
Get the output intents object.
getPageLabels()
Get the documents page labels object.
getPageLayout()
Get the page layout.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
See
- PDF 32000-1:2008 - 7.7.2 Document Catalog
getPageMode()
Get the page mode.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
See
- PDF 32000-1:2008 - 7.7.2 Document Catalog
getPermissions()
Get the permission object.
getStructTreeRoot()
Get the documents structure tree root object.
getVersion()
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.
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
getViewerPreferences()
Get a viewer preferences object.
setBaseUri()
Set the base URI.
Parameters
- $uri : string|null
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
See
- self::getBaseUri()
setLang()
Set the language identifier.
Parameters
- $lang : string
- $encoding : string
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
setMetadata()
Set the metadata stream.
To remove the metadata just pass null to this method.
Parameters
- $metadata : string
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
setOpenAction()
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|null
Exceptions
Throws InvalidArgumentException
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
setPageLayout()
Set the page layout.
Possible values are declared as class constants in the SetaPDF_Core_Document_PageLayout
class.
Parameters
- $pageLayout : string|null
The name of the page layout
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
See
setPageMode()
Set the page mode.
Possible values are declared as class constants in the SetaPDF_Core_Document_PageMode
class.
Parameters
- $pageMode : string|null
The name of the page mode
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception
See
setVersion()
Set the version of the PDF specification to which the document conforms.
Parameters
- $version : string|null
Exceptions
Throws SetaPDF_Core_SecHandler_Exception
Throws SetaPDF_Core_Type_Exception