Table of contents
Namespace: Com\Tecnick\Pdf\Import
final class FontInspector
Source: src/Import/FontInspector.php:38
Walks the font resources of an imported page and reports the fonts whose program is not embedded in the source document. Such a font is copied into the destination document as it stands, which no conformance mode requiring embedded fonts accepts (ISO 19005-1 clause 6.3.4, ISO 19005-2 and ISO 19005-3 clause 6.2.11.4.1).
Constants
MAX_RESOURCE_NODES
Maximum number of resource dictionaries visited in a single walk.
public const MAX_RESOURCE_NODES = 1024
Source: src/Import/FontInspector.php:43
Methods
__construct()
Constructor.
public __construct()
Source: src/Import/FontInspector.php:65
findNonEmbeddedFonts()
Return the base font names, in resource order, of the fonts used by the given page resources whose program is not embedded in the source.
The walk follows the /Font entries of the page resources and of every nested Form XObject, and stops after MAX_RESOURCE_NODES dictionaries.
public findNonEmbeddedFonts(array<string,mixed> $resources, SourceDocument $src): array<int,string>
Parameters:
$resources(array<string,mixed>): Resolved page resource dictionary.$src(SourceDocument): Source document the resources belong to.
Returns: array<int,string>
Source: src/Import/FontInspector.php:82
walkWasTruncated()
Return true when the last walk stopped on MAX_RESOURCE_NODES, so the returned font list may be incomplete.
public walkWasTruncated(): bool
Returns: bool
Source: src/Import/FontInspector.php:117