tc-lib-pdf

tc-lib-pdf API reference

Com\Tecnick\Pdf

Classes:

Enums:

  • AFRelationship: Backed enum for the PDF/A-3 embedded file /AFRelationship value, as validated by JavaScript::addEmbeddedFile().
  • DisplayZoom: Backed enum for the named document zoom modes accepted by Tcpdf::setDisplayMode() (in addition to a numeric zoom factor).
  • HybridConformance: Backed enum for the conformance level of the XML payload of a hybrid electronic document, written as the ConformanceLevel XMP property by MetaInfo::setFacturX().
  • HybridProfile: Backed enum for the standard followed by a hybrid electronic document: a PDF/A-3 file carrying a structured XML payload as an embedded file, as produced by MetaInfo::setFacturX().
  • PdfConformance: Backed enum for the PDF conformance mode accepted by Tcpdf::setPDFMode(): the empty string (no special conformance), a PDF/A level, a PDF/X profile or a PDF/UA profile.
  • TextFitMode: Backed enum for the text-cell auto-fit mode: ’’ disables auto-fit, otherwise T, S or F select a fit strategy (see Text::normalizeTextCellFitMode()).
  • TextHAlign: Backed enum for the horizontal alignment of text inside a cell: L (left), C (center), R (right) or J (justify).
  • TextVAlign: Backed enum for the vertical alignment of text inside a cell: T (top), C (center), B (bottom), A (center on font ascent), L (center on font baseline) or D (center on font descent).

Com\Tecnick\Pdf\CSS

Classes:

  • CascadeContext: Tracks the global source position across all CSS sources (external stylesheets, embedded styles, inline styles) to keep the cascade order deterministic.
  • ImportanceNormalizer: Propagates !important from a shorthand declaration to all of its longhands.
  • ListStyle: Resolves list marker types and generates the counter text for list items.
  • SelectorMatcher: CSS selector compiler and matcher for the SVG cascade.
  • Specificity: CSS 2.1 specificity (a,b,c) tuple calculator and comparator: - a = number of ID selectors - b = number of class selectors, attribute selectors, and pseudo-classes - c = number of type selectors and ps

Com\Tecnick\Pdf\Cache

Classes:

  • FontSubsetCacheAdapter: Bridges a generic tc-lib-pdf CacheInterface to the font library’s FontSubsetCacheInterface, so a single shared cache backend can also store font subset programs.
  • ImageCacheAdapter: Bridges a generic tc-lib-pdf CacheInterface to the image library’s ImageCacheInterface, so a single shared cache backend can also store processed image data.

Interfaces:

  • CacheInterface: Optional external cache that tc-lib-pdf reuses across the sub-libraries that support caching (font subsets and processed images).
  • SelectiveCacheInterface: Optional extension of CacheInterface for backends that only want to cache some of the cacheable subsystems (for example font subsets but not images).

Enums:

  • CacheType: Backed enum for the cacheable subsystem type.

Com\Tecnick\Pdf\Import

Classes:

  • DictParser: Converts the raw object arrays returned by the PDF parser into PHP associative arrays.
  • FontInspector: Walks the font resources of an imported page and reports the fonts whose program is not embedded in the source document.
  • ImportCorruptedSourceException: Thrown when a source PDF appears malformed or cannot be parsed.
  • Importer: Orchestrates PDF import: loads source documents, resolves pages, clones resources, builds Form XObjects, and registers them for deferred output via getOutImportedObjects().
  • ImportException: Base exception for PDF import errors.
  • ImportPageOutOfRangeException: Thrown when the requested page number does not exist in the source document.
  • ImportResourceLimitException: Thrown when a parsing limit of the source document prevents an object from being resolved.
  • ImportSourceNotFoundException: Thrown when an import source cannot be found or loaded.
  • ImportUnsupportedFeatureException: Thrown when an import requires an unsupported feature (e.g.
  • ObjectMap: Tracks the mapping from source object references to destination PDF object numbers and maintains a queue of objects that still need to be serialized into the output PDF.
  • PageResolver: Traverses the PDF page tree and returns the effective page dictionary with all inherited attributes (MediaBox, CropBox, Rotate, Resources …) resolved for a 1-based page number.
  • PageTemplate: Immutable value object representing a page that has been imported as a Form XObject.
  • PdfName: Serializes decoded PDF name objects (PDF 32000-1 7.3.5).
  • ResourceCloner: Deep-copies objects from the source document into the destination PDF using an ObjectMap for reference remapping.
  • SourceDocument: Wraps a parsed source PDF document and provides access to its objects and trailer.

Interfaces:

Com\Tecnick\Pdf\Signature

Classes:

  • Appearance: Fluent sub-facade for the signature widget appearance, reached through Tcpdf::signature()->appearance().
  • External: Fluent sub-facade for the external / remote signing workflow, reached through Tcpdf::signature()->external().
  • Facade: Fluent entry point for the signature subsystem, returned by Tcpdf::signature().

Enums:

  • ExternalSignatureEncoding: Backed enum for the encoding of an externally-produced signature value passed to Tcpdf::applyExternalSignature(): binary, base64 or hex.
  • SignatureAppearanceMode: Backed enum for the signature widget appearance stream slot: N (normal), R (rollover) or D (down), as validated by Tcpdf::setSignatureAppearanceStream().

A

B

C

D

E

F

H

I

J

L

M

O

P

R

S

T