@squidcloud/client
    Preparing search index...

    Interface ExtractDataFromDocumentOptions

    Options for customizing how data is extracted from a document.

    interface ExtractDataFromDocumentOptions {
        collectDocumentMetadata?: boolean;
        discardOriginalFile?: boolean;
        extractImages?: boolean;
        imageMinSizePixels?: number;
        pageIndexes?: number[];
        preferredExtractionMethod?: DocumentExtractionMethod;
        textFormat?: "auto" | "markdown" | "html" | "plain";
    }
    Index

    Properties

    collectDocumentMetadata?: boolean

    Whether to read document-level properties (title/author/dates) from the source container and return them as documentMetadata. Off by default: container parsing has a real per-file cost (zip/PDF re-parse), so callers opt in only when the owning knowledge base declares metadata fields.

    Honored only by file-based extraction (which owns the original buffer for every format); URL-based extraction ignores it and never returns documentMetadata.

    discardOriginalFile?: boolean

    Whether Squid keeps or discards the original file.

    Keeping the original file allows reprocessing and the ability for the user to download it later.

    Defaults to false.

    extractImages?: boolean

    Whether to extract embedded images from the document.

    imageMinSizePixels?: number

    Minimum width/height (in pixels) of images to extract. Smaller images will be ignored.

    pageIndexes?: number[]

    Specific page indexes to extract from the document (0-based). If omitted, all pages are extracted.

    preferredExtractionMethod?: DocumentExtractionMethod

    The preferred method for extracting data from the document.

    textFormat?: "auto" | "markdown" | "html" | "plain"

    Format hint for text-based extraction (markdown / HTML). When omitted, the format is detected from the content. Only consulted by extractors that handle text input.