setasign\SetaPDF2\Merger\Handler
Tags
File: /SetaPDF v2/Merger/Handler/Tags.php
Class hierarchy
Summary
Properties
$_merger
$_pageObjects
Static Methods
_cleanUpAndPrepareStructTree()
\setasign\SetaPDF2\Core\Type\PdfDictionary $structElement,
array &$foundIds = array ( ),
array &$foundClassNames = array ( ),
array &$foundTagNames = array ( ),
array &$foundNamespaces = array ( )
This method cleans up and prepares the structure elements for further processing.
- Adds the origin document instance ident (for later renaming of IDs)
- Remove unused items from Ref arrays.
Parameters
- $documentIdent : string
- $structElement : \setasign\SetaPDF2\Core\Type\PdfDictionary
- $foundIds : array
- $foundClassNames : array
- $foundTagNames : array
- $foundNamespaces : array
Exceptions
_filterTreeStructure()
\setasign\SetaPDF2\Core\Type\IndirectObjectInterface[] $sourcePageObjects,
bool $parentPgMatch = false,
array &$ensuredObjectsList = array ( )
This function removes unused tags from the structure element.
Unused tags are tags, which are not related to the merged pages. This happens in the "in"-instance of the document.
Parameters
- $structElement : \setasign\SetaPDF2\Core\Type\PdfDictionary
- $sourcePageObjects : \setasign\SetaPDF2\Core\Type\IndirectObjectInterface[]
- $parentPgMatch : bool
Set to true if any in the parent elements Pg entry matches a processed page.
- $ensuredObjectsList : array
_processXObjects()
\setasign\SetaPDF2\Core\Document\Catalog\StructTreeRoot $structTreeRoot,
\setasign\SetaPDF2\Core\DataStructure\Tree\NumberTree $initialParentTree
Parameters
- $canvas : \setasign\SetaPDF2\Core\Canvas\Canvas
- $structTreeRoot : \setasign\SetaPDF2\Core\Document\Catalog\StructTreeRoot
- $initialParentTree : \setasign\SetaPDF2\Core\DataStructure\Tree\NumberTree
Exceptions
Throws \setasign\SetaPDF2\Core\DataStructure\Tree\KeyAlreadyExistsException
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Methods
__construct()
Parameters
- $merger : \setasign\SetaPDF2\Merger\Merger
_applyRenames()
Parameters
- $structTreeRoot : \setasign\SetaPDF2\Core\Document\Catalog\StructTreeRoot
Exceptions
_handleClassMaps()
Parameters
- $sourceDocument : \setasign\SetaPDF2\Core\Document
- $foundClassNames : array
Exceptions
Throws \setasign\SetaPDF2\Merger\Exception
_handleIDTrees()
Parameters
- $sourceDocument : \setasign\SetaPDF2\Core\Document
- $idsFound : array|true
Exceptions
Throws \setasign\SetaPDF2\Core\DataStructure\Tree\KeyAlreadyExistsException
_handleNamespaces()
Parameters
- $foundNamespaces : array
- $foundTagNames : array
Exceptions
_handleRoleMap()
Parameters
- $sourceDocument : \setasign\SetaPDF2\Core\Document
- $foundTagNames : array
Exceptions
checkStructuredDestinationsCallback()
A callback, that removes "SD" entries from destination dictionaries
...if the structure elements were not in the final tree structure.
Parameters
- $document : \setasign\SetaPDF2\Core\Document
- $dict : \setasign\SetaPDF2\Core\Type\PdfDictionary
handle()
Parameters
- $touchedPdfs : array
- $documents : array
Exceptions
Throws \setasign\SetaPDF2\Merger\Exception
Throws \setasign\SetaPDF2\Core\DataStructure\Tree\KeyAlreadyExistsException
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
setHandleTags()
Parameters
- $handleTags : bool
- $subTag : ?string
Exceptions
Throws \setasign\SetaPDF2\Merger\Exception
storePageMapping()
int $resultingPageNumber,
\setasign\SetaPDF2\Core\Type\PdfIndirectObject $sourcePageIndirectObject
Parameters
- $sourceDocument : \setasign\SetaPDF2\Core\Document
- $resultingPageNumber : int
- $sourcePageIndirectObject : \setasign\SetaPDF2\Core\Type\PdfIndirectObject