iink-ts - v3.2.1
    Preparing search index...

    Class RecognizerHTTPV2Configuration

    export class RecognizerHTTPV2Configuration implements TRecognizerHTTPV2Configuration {
    recognition: TRecognizerHTTPV2RecognitionConfiguration
    server: TServerHTTPConfiguration

    constructor(configuration?: PartialDeep<TRecognizerHTTPV2Configuration>)
    {
    this.server = mergeDeep({}, DefaultRecognizerHTTPV2Configuration.server, configuration?.server)
    this.recognition = mergeDeep({}, DefaultRecognizerHTTPV2Configuration.recognition, configuration?.recognition)

    if (configuration?.recognition?.text?.mimeTypes) {
    this.recognition.text.mimeTypes = configuration.recognition.text.mimeTypes as ("text/plain" | "application/vnd.myscript.jiix")[]
    }
    this.recognition.text.mimeTypes = [...new Set(this.recognition.text.mimeTypes)]

    if (configuration?.recognition?.math?.mimeTypes) {
    this.recognition.math.mimeTypes = configuration.recognition.math.mimeTypes as ("application/vnd.myscript.jiix" | "application/x-latex" | "application/mathml+xml")[]
    }
    this.recognition.math.mimeTypes = [...new Set(this.recognition.math.mimeTypes)]

    if (configuration?.recognition?.shape?.mimeTypes) {
    this.recognition.shape.mimeTypes = configuration.recognition.shape.mimeTypes as ("application/vnd.myscript.jiix" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "image/svg+xml")[]
    }
    this.recognition.shape.mimeTypes = [...new Set(this.recognition.shape.mimeTypes)]

    if (configuration?.recognition?.["raw-content"]?.recognition?.types) {
    this.recognition["raw-content"].recognition!.types = configuration?.recognition?.["raw-content"]?.recognition?.types as ("text" | "shape")[]
    }
    if (configuration?.recognition?.["raw-content"]?.classification?.types) {
    this.recognition["raw-content"].classification!.types = configuration?.recognition?.["raw-content"]?.classification?.types as ("text" | "shape")[]
    }

    if (this.server.version) {
    if (!isVersionSuperiorOrEqual(this.server.version, "2.3.0")) {
    delete this.recognition.convert
    }
    if (!isVersionSuperiorOrEqual(this.server.version, "3.2.0")) {
    delete this.recognition.export.jiix.text.lines
    }
    }
    }
    }

    Implements

    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • Optionalconfiguration: {
            recognition?: {
                convert?: { force?: { "on-stylesheet-change"?: boolean } };
                export?: {
                    image?: {
                        guides?: boolean;
                        viewport?: {
                            height?: (...) | (...);
                            width?: (...) | (...);
                            x?: (...) | (...);
                            y?: (...) | (...);
                        };
                    };
                    "image-resolution"?: number;
                    jiix?: {
                        "bounding-box"?: boolean;
                        "full-stroke-ids"?: boolean;
                        ids?: boolean;
                        strokes?: boolean;
                        style?: boolean;
                        text?: {
                            chars?: (...)
                            | (...)
                            | (...);
                            lines?: (...) | (...) | (...);
                            words?: (...) | (...) | (...);
                        };
                    };
                    mathml?: { flavor?: { name?: (...)
                    | (...) } };
                };
                lang?: string;
                math?: {
                    customGrammar?: string;
                    customGrammarContent?: string;
                    customGrammarId?: string;
                    eraser?: { "erase-precisely"?: boolean };
                    margin?: { bottom?: number; left?: number; right?: number; top?: number };
                    mimeTypes?: (
                        | "application/vnd.myscript.jiix"
                        | "application/x-latex"
                        | "application/mathml+xml"
                        | undefined
                    )[];
                    "recognition-timeout"?: number;
                    "session-time"?: number;
                    solver?: {
                        "angle-unit"?: TAngleUnit;
                        "decimal-separator"?: string;
                        enable?: boolean;
                        "fractional-part-digits"?: number;
                        options?: TSolverOptions;
                        "rounding-mode"?: TRoundingMode;
                    };
                    "undo-redo"?: { mode?: TUndoRedoMode };
                };
                "raw-content"?: {
                    classification?: {
                        types?: ((...) | (...) | (...) | (...) | (...) | (...))[];
                    };
                    eraser?: { "erase-precisely"?: boolean };
                    recognition?: { types?: ((...) | (...) | (...) | (...) | (...))[] };
                    "session-time"?: number;
                    text?: {
                        addLKText?: boolean;
                        customLexicon?: ((...) | (...))[];
                        customResources?: ((...) | (...))[];
                    };
                };
                shape?: {
                    beautification?: { enable?: true };
                    convert?: { "match-text-size"?: boolean; types?: ((...) | (...))[] };
                    "enable-sub-blocks"?: boolean;
                    eraser?: { "erase-precisely"?: boolean };
                    mimeTypes?: (
                        | "application/vnd.myscript.jiix"
                        | "application/vnd.openxmlformats-officedocument.presentationml.presentation"
                        | "image/svg+xml"
                        | undefined
                    )[];
                    "session-time"?: number;
                };
                text?: {
                    configuration?: {
                        addLKText?: boolean;
                        customLexicon?: ((...) | (...))[];
                        customResources?: ((...) | (...))[];
                    };
                    eraser?: { "erase-precisely"?: boolean };
                    guides?: {
                        enable?: boolean;
                        "line-gap-mm"?: number;
                        "origin-y-mm"?: number;
                    };
                    margin?: { bottom?: number; left?: number; right?: number; top?: number };
                    mimeTypes?: ("text/plain" | "application/vnd.myscript.jiix" | undefined)[];
                    text?: boolean;
                };
                type?: TRecognitionV2Type;
            };
            server?: {
                applicationKey?: string;
                hmacKey?: string
                | {};
                host?: string;
                scheme?: TScheme;
                version?: string;
            };
        }

      Returns RecognizerHTTPV2Configuration

    Properties