NativeElixirPdfUtilities.HtmlToPdf.EmbeddedResource (native_elixir_pdf_utilities v1.1.0)
View SourceLoads authorized child HTML into an isolated document descriptor.
This is resource preparation, not viewport rendering. The normal HTML parser applies input policy and charges the existing cumulative HTML/node budgets. Document mappings and resolvers are deliberately not document sources.
Summary
Functions
Reads exact selected local bytes with an issued child scope and existing source limits.
Prevalidates and loads a child local HTML file or inline srcdoc without resolving mappings.
Reads an initial iframe/frame document once after authorization, retaining its exact bytes and issued source scope.
Loads selected local object HTML after authorization and MIME validation.
Types
@type document() :: %{ context: NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), source: NativeElixirPdfUtilities.Validators.ResourceValidator.document_descriptor(), html: String.t(), dom: NativeElixirPdfUtilities.HtmlToPdf.HtmlParser.dom_tree() }
Functions
@spec load_file( term(), String.t(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), keyword() ) :: {:ok, %{ context: NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), source: {:file, String.t()}, bytes: binary() }} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Reads exact selected local bytes with an issued child scope and existing source limits.
@spec load_html( term(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), keyword() ) :: {:ok, document()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Prevalidates and loads a child local HTML file or inline srcdoc without resolving mappings.
@spec load_initial( term(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), keyword() ) :: {:ok, %{ context: NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), source: NativeElixirPdfUtilities.Validators.ResourceValidator.document_descriptor(), bytes: binary(), kind: :html | :text | :raster | :svg }} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Reads an initial iframe/frame document once after authorization, retaining its exact bytes and issued source scope.
@spec load_object_html( term(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), keyword() ) :: {:ok, document()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Loads selected local object HTML after authorization and MIME validation.