setasign\SetaPDF2\Merger\Handler

Names

File: /SetaPDF v2/Merger/Handler/Names.php

Class hierarchy

Summary

Properties

$_adjustNameCallback

protected callback Names::$_adjustNameCallback

Callback method used for renaming names

See

$_handleNames

protected bool Names::$_handleNames = true

Should names be copied/handled


Methods

__construct()

handle()

public Names::handle (
array $touchedPdfs,
array $namedDestinations,
array $documents
): void
Parameters
$touchedPdfs : array
 
$namedDestinations : array
 
$documents : array
 
Exceptions

Throws \setasign\SetaPDF2\Core\DataStructure\Tree\KeyAlreadyExistsException

Throws \setasign\SetaPDF2\Core\Exception

Throws \setasign\SetaPDF2\Core\SecHandler\Exception

Throws \setasign\SetaPDF2\Core\Type\Exception

Throws \setasign\SetaPDF2\Merger\Exception

rewriteStringNamesCallback()

Callback method for renaming string values of renamed names.

Parameters
$document : \setasign\SetaPDF2\Core\Document

The document instance

$value : \setasign\SetaPDF2\Core\Type\PdfStringInterface

The string value

See

setHandleNames()

public Names::setHandleNames (
bool $handleNames = true,
?callable $adjustNameCallback = null
): void

Defines that the document's name dictionaries are merged into the resulting document.

This behavior is enabled by default. It sadly needs much memory and script runtime, because name trees could be very large.

Parameters
$handleNames : bool

The flag status

$adjustNameCallback : ?callable

See \setasign\SetaPDF2\Core\DataStructure\Tree\AbstractTree::merge() for a detailed description of the callback

writeDictionaryCallback()

Callback method for renaming values of renamed names.

Parameters
$document : \setasign\SetaPDF2\Core\Document

The document instance

$dict : \setasign\SetaPDF2\Core\Type\PdfDictionary

The dictionary

See