SetaPDF_Core_Document_Catalog_Names_EmbeddedFiles Class allowing access to embedded files.

File: /SetaPDF v2/Core/Document/Catalog/Names/EmbeddedFiles.php

Class hierarchy

Summary

Properties


Methods

_getTree()

Get the tree instance.

Parameters
$create : boolean
 
Exceptions

Throws SetaPDF_Core_SecHandler_Exception

add()

Adds an embedded file by its file specification.

Parameters
$name : string

The unique name in the name tree for embedded files. This string shall be a PDF string in PDFDoc encoding oder UTF-16BE.

$fileSpecification : SetaPDF_Core_FileSpecification
 
Exceptions

Throws SetaPDF_Core_DataStructure_Tree_KeyAlreadyExistsException

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_SecHandler_Exception

cleanUp()

Release cycled references.

get()

Get an embedded file by its name.

Parameters
$name : string
 
Exceptions

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_SecHandler_Exception

remove()

public SetaPDF_Core_Document_Catalog_Names_EmbeddedFiles::remove (
string $name [, bool $removeObjects = true ]
): bool

Remove an embedded file.

Parameters
$name : string

No encoding is used. The name needs to be passed as it is registered in the name tree.

$removeObjects : bool

If this is set to false only the registration in the name tree is removed. By default also the embedded streams will be deleted.

Exceptions

Throws SetaPDF_Core_Type_Exception

Throws SetaPDF_Core_SecHandler_Exception