Attributes

Presentational HTML attributes and default element styles.

Namespace: Com\Tecnick\Pdf\HTML

trait Attributes

Source: src/HTML/Attributes.php:41

Presentational HTML attributes and default element styles.

Methods

parseHTMLAttributes()

Parst HTML DOM attributes.

public parseHTMLAttributes(array<int,THTMLDOMNode> &$dom, int $key, bool $thead): void

Parameters:

  • $dom (array<int,THTMLDOMNode>)
  • $key (int): key of the current HTML tag.
  • $thead (bool)

Throws:

Source: src/HTML/Attributes.php:52

setHTMLMonospaceFont()

Set the monospaced font used for <pre>, <code> and <tt> elements.

PDF/UA requires every font to be embedded and the default Courier is a non-embedded standard-14 font, so an embedded monospace font must be set (after inserting it with the font stack) for tagged or accessible PDFs.

public setHTMLMonospaceFont(string $fontname): void

Parameters:

  • $fontname (string)

Source: src/HTML/Attributes.php:474