PDF Web SDK Documentation

Comprehensive Guide for Developers: UI & SDK Integration, Configuration, and API Reference

PDF Web SDK
    Preparing search index...

    Interface IOcrCommandData

    Shared input for online-tool commands (convert / ocr / translate) that hand the document to a long-running, page-scoped API operation.

    interface IOcrCommandData {
        abortSignal: AbortSignal;
        advanced?: boolean;
        autorotatePage?: boolean;
        backgroundCallbackUrl?: string;
        callback: (progress: number) => void;
        client: IOcrClient;
        createBookmarks?: boolean;
        deskew: boolean;
        detectTextOrientation?: boolean;
        embedFonts?: boolean;
        imageCompressionQuality?: number;
        language?: string;
        languages?: string[];
        onFileTooLargeError?: () => void;
        onMovedToBackground?: () => void;
        onStep?: (step: ProcessingStep) => void;
        onUnauthorizedError?: () => void;
        pages: number[];
        password?: string;
        pdfType?: IrisOcrPdfType;
        useJpeg?: boolean;
        workDepth?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    abortSignal: AbortSignal
    advanced?: boolean

    Routes the request to the Iris-specific /iris-ocr/v1 endpoint (richer parameter set) instead of the generic /ocr/v1 one, and enables the fields below.

    autorotatePage?: boolean

    Rotate page (Iris API's autorotatePage). Iris-only.

    backgroundCallbackUrl?: string

    Webhook handed to the API as X-Callback-Url when the operation outruns the poll window — see executeApiOperation.

    callback: (progress: number) => void
    client: IOcrClient
    createBookmarks?: boolean

    Create bookmarks in the result document. Iris-only.

    deskew: boolean
    detectTextOrientation?: boolean

    Detect text orientation. Iris-only.

    embedFonts?: boolean

    Embed fonts in the result document. Iris-only.

    imageCompressionQuality?: number

    Image compression quality factor (0-255), used only when useJpeg is true. Iris-only.

    language?: string
    languages?: string[]

    Recognition languages as ISO codes, e.g. ['en']. Iris-only.

    onFileTooLargeError?: () => void
    onMovedToBackground?: () => void

    Called once the API has accepted that background re-submission.

    onStep?: (step: ProcessingStep) => void
    onUnauthorizedError?: () => void
    pages: number[]

    Page indices to process. When this is a strict subset of the document, the command extracts those pages into a temporary PDF and processes that whole; otherwise it processes the document's own bytes.

    password?: string
    pdfType?: IrisOcrPdfType

    How recognized text is combined with the page image. Iris-only.

    useJpeg?: boolean

    Use JPEG 2000 compression. Iris-only.

    workDepth?: number

    Processing work depth (0-255): 0 = best speed, 255 = best accuracy. Iris-only.