NativeElixirPdfUtilities.Validators.ResourceValidator (native_elixir_pdf_utilities v1.1.0)

View Source

Authorizes embedded sources before asset mappings, caches, callbacks or reads.

Referenced documents are local files. Inline HTML uses a distinct :srcdoc descriptor. Child dependencies may also use explicitly supplied bytes, but a mapping cannot authorize a remote reference or an out-of-root file. Missing authorized files are load failures, not authorization denials.

Summary

Functions

Identifies an embedded source in diagnostics without selecting or authorizing it.

Validates that document preparation shares the current issued image budget.

Types

dependency_descriptor()

@type dependency_descriptor() :: {:file, String.t()} | {:bytes, binary()}

document_descriptor()

@type document_descriptor() ::
  {:file, String.t()} | {:srcdoc, String.t()} | {:blank, String.t()}

Functions

document_source_label(source)

@spec document_source_label(term()) :: String.t() | nil

Identifies an embedded source in diagnostics without selecting or authorizing it.

validate_preparation_budget(image_budget)

@spec validate_preparation_budget(term()) ::
  :ok | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}

Validates that document preparation shares the current issued image budget.