setasign\SetaPDF2\Merger\Handler
FormFields
File: /SetaPDF v2/Merger/Handler/FormFields.php
Class hierarchy
Summary
Properties
$_merger
Methods
__construct()
Parameters
- $merger : \setasign\SetaPDF2\Merger\Merger
_copyDefaultResources()
\setasign\SetaPDF2\Core\Document\Catalog\AcroForm $resAcroForm,
\setasign\SetaPDF2\Core\Document $resDocument
Helper method that copies the default resources in the AcroForm dictionary.
Parameters
- $acroForm : \setasign\SetaPDF2\Core\Document\Catalog\AcroForm
- $resAcroForm : \setasign\SetaPDF2\Core\Document\Catalog\AcroForm
- $resDocument : \setasign\SetaPDF2\Core\Document
Exceptions
_handleAcroFormsByMergingSameNamedFields()
array $documents
Handles AcroForm data by merging same named form fields.
Parameters
- $touchedPdfs : array
- $documents : array
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Merger\Exception
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\Reader\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\RecursionException
Throws \setasign\SetaPDF2\Exception
_handleAcroFormsByRenamingSameNamedFields()
array $documents
Handles AcroForm data by renaming same named form fields.
Parameters
- $touchedPdfs : array
- $documents : array
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Merger\Exception
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\Reader\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\RecursionException
Throws \setasign\SetaPDF2\Exception
_removeFormFieldFromFieldTree()
Removes a form field in its parent fields array
Parameters
- $fieldObject : \setasign\SetaPDF2\Core\Type\IndirectObjectInterface
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\Reader\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Exception
handle()
Parameters
- $touchedPdfs : array
- $documents : array
Exceptions
Throws \setasign\SetaPDF2\Core\Document\ObjectNotFoundException
Throws \setasign\SetaPDF2\Merger\Exception
Throws \setasign\SetaPDF2\Core\SecHandler\Exception
Throws \setasign\SetaPDF2\Core\Exception
Throws \setasign\SetaPDF2\Core\Parser\Pdf\InvalidTokenException
Throws \setasign\SetaPDF2\Core\Reader\Exception
Throws \setasign\SetaPDF2\Core\Type\Exception
Throws \setasign\SetaPDF2\Core\Type\IndirectReference\Exception
Throws \setasign\SetaPDF2\Exception
setRenameSameNamedFormFields()
Set the flag defining if same named form fields should be renamed (default behavior).
If this flag is set to false the fields will be merged so that all same named fields will have the same value. Notice that this could occur in an incorrect appearance if the initial values are different.
Parameters
- $renameSameNamedFormFields : bool
The flag status