setasign\SetaPDF2\FormFiller\Field\FlattenTaggingHandler

TagAsFigureHandler Tags a flattened field as a Figure

File: /SetaPDF v2/FormFiller/Field/FlattenTaggingHandler/TagAsFigureHandler.php

This tagging handler can be used if the flattened field will display an image/a figure. The layout bounding box in the Figure tag will be set to the bounding box of the initial form field.

By passing a callback to the constructor you can adjust other attributes or properties, such as e.g. the Alt text.

Class hierarchy

Implements

Summary

Properties

$_callback

$_tagName

protected string TagAsFigureHandler::$_tagName = 'Figure'

The tag-name that is used to mark the content.


Static Methods

ensureAttributeDictionaryByOwner()

Helper method that ensures a dictionary by an owner name.

Parameters
$structElemDict: \setasign\SetaPDF2\Core\Type\PdfDictionary
 
$owner: string
 

Methods

__construct()

Parameters
$callback: ?callable(
\setasign\SetaPDF2\FormFiller\Field\AbstractField $field, \setasign\SetaPDF2\Core\Type\IndirectObjectInterface $parentObject
): bool

A callback that allows you to access/modify the parent structure element during the flattening process. If it returns true, the internal _updateAttributes() method is executed. If false, it is not executed.