// Generated by alef. Do not edit by hand.
@file:Suppress(
    "ktlint:standard:trailing-comma-on-call-site",
    "ktlint:standard:trailing-comma-on-declaration-site",
    "ktlint:standard:spacing-between-declarations-with-comments",
    "ktlint:standard:spacing-between-declarations-with-annotations",
    "ktlint:standard:when-entry-bracing",
    "ktlint:standard:blank-line-between-when-conditions",
    "ktlint:standard:blank-line-before-declaration",
    "ktlint:standard:chain-method-continuation",
    "ktlint:standard:annotation",
    "ktlint:standard:max-line-length",
    "ktlint:standard:no-semi",
    "ktlint:standard:statement-wrapping",
    "MaxLineLength",
    "TooManyFunctions",
    "FunctionParameterNaming",
    "LongParameterList",
    "CyclomaticComplexMethod",
    "LongMethod",
)

package dev.kreuzberg

/** PDF-specific configuration. */
data class PdfConfig(
    /** Extract images from PDF */
    val extractImages: Boolean = false,
    /**
     * Extract tables from PDF.
     *
     * When `true` (default), runs pdf_oxide's native grid detector and, if it
     * finds nothing, falls back to the heuristic text-layer reconstruction in
     * `pdf.oxide.table.extract_tables_heuristic`. Set to `false` to skip
     * both passes — `tables` will then be empty in the result.
     */
    val extractTables: Boolean = true,
    /** List of passwords to try when opening encrypted PDFs */
    val passwords: List<String>? = null,
    /** Extract PDF metadata */
    val extractMetadata: Boolean = true,
    /** Hierarchy extraction configuration (None = hierarchy extraction disabled) */
    val hierarchy: HierarchyConfig? = null,
    /**
     * Extract PDF annotations (text notes, highlights, links, stamps).
     * Default: false
     */
    val extractAnnotations: Boolean = false,
    /**
     * Top margin fraction (0.0–1.0) of page height to exclude headers/running heads.
     * Default: 0.06 (6%)
     */
    val topMarginFraction: Float? = null,
    /**
     * Bottom margin fraction (0.0–1.0) of page height to exclude footers/page numbers.
     * Default: 0.05 (5%)
     */
    val bottomMarginFraction: Float? = null,
    /**
     * Allow single-column pseudo tables in extraction results.
     *
     * By default, tables with fewer than 2 columns (layout-guided) or 3 columns
     * (heuristic) are rejected. When `true`, the minimum column count is relaxed
     * to 1, allowing single-column structured data (glossaries, itemized lists)
     * to be emitted as tables. Other quality filters (density, sparsity, prose
     * detection) still apply.
     */
    val allowSingleColumnTables: Boolean = false,
    /**
     * Perform OCR on inline images extracted from PDF pages and attach the
     * recognized text to each `ExtractedImage.ocr_result`. Requires Tesseract
     * to be available; if `ExtractionConfig.ocr` is `null` the extractor
     * falls back to `TesseractConfig.default()`. Per-image failures degrade
     * gracefully (the image is returned without OCR text rather than failing
     * the whole extraction). Default: `false`.
     */
    val ocrInlineImages: Boolean = false,
)
