Current section

Files

Jump to
xberg lib xberg image_extraction_config.ex
Raw

lib/xberg/image_extraction_config.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:b2c29ab80fb9cdb8c5190a7808ad862ad890f416ad887092447b282a5b1b69e0
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.ImageExtractionConfig do
@moduledoc "Image extraction configuration."
@typedoc "Image extraction configuration."
@type t :: %__MODULE__{
extract_images: boolean(),
target_dpi: integer(),
max_image_dimension: integer(),
inject_placeholders: boolean(),
auto_adjust_dpi: boolean(),
min_dpi: integer(),
max_dpi: integer(),
max_images_per_page: non_neg_integer() | nil,
classify: boolean(),
include_page_rasters: boolean(),
run_ocr_on_images: boolean(),
ocr_text_only: boolean(),
append_ocr_text: boolean(),
output_format: String.t() | nil,
svg: Xberg.SvgOptions.t(),
include_data_base64: boolean()
}
defstruct extract_images: true,
target_dpi: 300,
max_image_dimension: 4_096,
inject_placeholders: true,
auto_adjust_dpi: true,
min_dpi: 72,
max_dpi: 600,
max_images_per_page: nil,
classify: false,
include_page_rasters: false,
run_ocr_on_images: true,
ocr_text_only: false,
append_ocr_text: false,
output_format: :native,
svg: nil,
include_data_base64: false
defimpl Jason.Encoder do
@doc false
def encode(value, opts) do
value
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> v == nil end)
|> Enum.into(%{})
|> Jason.Encoder.encode(opts)
end
end
end