NativeElixirPdfUtilities.Limits (native_elixir_pdf_utilities v0.13.0)

View Source

Runtime resource limits used by PDF parsing, text extraction, merging, and HTML-to-PDF rendering.

Applications can override individual defaults in config/config.exs or config/runtime.exs:

config :native_elixir_pdf_utilities,
  limits: [
    max_svg_bytes: 10_000_000,
    max_svg_raster_dimension: 16_284
  ]

Configuration is validated when the library application starts. Values are process-wide, and changing them requires restarting the application.

Summary

Types

A configurable resource-limit name.

t()

The complete validated resource-limit configuration.

Functions

Returns the library's built-in resource limits.

Returns the effective resource limits loaded for this application instance.

Types

key()

@type key() ::
  :max_svg_bytes
  | :max_svg_raster_dimension
  | :max_svg_raster_pixels
  | :max_image_count
  | :max_image_source_bytes
  | :max_aggregate_image_source_bytes
  | :max_decoded_image_bytes
  | :max_aggregate_decoded_image_bytes
  | :max_background_image_tiles
  | :max_layout_cardinality
  | :max_pdf_input_bytes
  | :max_pdf_objects
  | :max_pdf_object_stream_entries
  | :max_pdf_pages
  | :max_pdf_page_tree_depth
  | :max_pdf_reference_chain_depth
  | :max_pdf_reference_resolution_work
  | :max_pdf_value_depth
  | :max_pdf_decoded_stream_bytes
  | :max_pdf_decompression_ratio
  | :max_pdf_xref_length_candidates
  | :max_pdf_xref_revisions
  | :max_pdf_info_value_bytes
  | :max_pdf_info_total_bytes
  | :max_merge_inputs
  | :max_aggregate_merge_input_bytes
  | :max_merged_objects
  | :max_merged_pages
  | :max_text_decoded_content_bytes
  | :max_text_parsed_instructions
  | :max_text_stream_uses
  | :max_text_instruction_uses
  | :max_text_form_expansions
  | :max_text_spans
  | :max_cmap_bytes
  | :max_cmap_entries
  | :max_cid_width_entries
  | :max_form_xobject_depth
  | :max_font_cache_entries

A configurable resource-limit name.

t()

@type t() :: %{required(key()) => pos_integer()}

The complete validated resource-limit configuration.

Functions

defaults()

@spec defaults() :: t()

Returns the library's built-in resource limits.

effective()

@spec effective() :: t()

Returns the effective resource limits loaded for this application instance.