NativeElixirPdfUtilities.Validators.CssPositionValidator (native_elixir_pdf_utilities v1.1.0)

View Source

Resolves validated CSS positions against actual fitted or background image space.

Summary

Functions

Prepares the selected-font CSS math environment using a real point percentage basis.

Checks the numeric type of a position calculation without loading fonts or images.

Resolves a position in points using actual remaining space and the selected font style.

Checks prepared CSS position dimensions through the shared math grammar and numeric bounds.

Functions

math_environment(style, remaining)

@spec math_environment(map(), number()) :: {:ok, map()} | {:error, {atom(), map()}}

Prepares the selected-font CSS math environment using a real point percentage basis.

prepare_math(value)

@spec prepare_math(String.t()) ::
  {:ok, {:css_position_math, String.t()}} | :error | {:error, {atom(), map()}}

Checks the numeric type of a position calculation without loading fonts or images.

resolve(position, remaining, style)

@spec resolve(term(), number(), map()) :: {:ok, float()} | {:error, {atom(), map()}}

Resolves a position in points using actual remaining space and the selected font style.

valid_prepared?(position)

@spec valid_prepared?(term()) :: boolean()

Checks prepared CSS position dimensions through the shared math grammar and numeric bounds.