Variable ScanbotDocumentConst

ScanbotDocument: {
    addPages(params): Promise<DocumentData>;
    analyzeQualityOnImage(params): Promise<DocumentQualityAnalyzerResult>;
    cloneDocument(documentUuid): Promise<DocumentData>;
    createDocumentFromImages(params): Promise<DocumentData>;
    createDocumentFromLegacyPages(params): Promise<DocumentData>;
    createDocumentFromPdf(params): Promise<DocumentData>;
    deleteAllDocuments(): Promise<void>;
    deleteDocument(documentUuid): Promise<void>;
    documentExists(documentUuid): Promise<boolean>;
    getStoredDocumentUuids(): Promise<string[]>;
    loadDocument(documentUuid): Promise<DocumentData>;
    modifyPage(params): Promise<DocumentData>;
    movePage(params): Promise<DocumentData>;
    removeAllPages(documentUuid): Promise<DocumentData>;
    removePages(params): Promise<DocumentData>;
    scanFromImage(params): Promise<DocumentScanningResult>;
    startCroppingScreen(configuration): Promise<ResultWrapper<DocumentData>>;
    startScanner(configuration): Promise<ResultWrapper<DocumentData>>;
}

Entry point for all document features.

Type declaration

  • addPages:function
    • Adds new pages from the provided images to the document with the specified Uuid.

      Parameters

      • params: {
            documentUuid: string;
            images: ImageInput[];
            options?: AddPageOptions;
        }
        • documentUuid: string

          The Uuid of the document to which pages will be added.

        • images: ImageInput[]

          The images to be added as new pages.

        • Optional options?: AddPageOptions

          The options to be used when adding pages.

      Returns Promise<DocumentData>

      • Updated document with added pages.
  • analyzeQualityOnImage:function
  • cloneDocument:function
    • Clones the document with the specified Uuid.

      Parameters

      • documentUuid: string

        The Uuid of the document to be cloned.

      Returns Promise<DocumentData>

      • Cloned document.
  • createDocumentFromImages:function
  • createDocumentFromLegacyPages:function
    • Creates a document from the provided legacy pages with the specified image size limit.

      Parameters

      • params: {
            documentImageSizeLimit?: number;
            pages: Page[];
        }
        • Optional documentImageSizeLimit?: number

          The maximum size of the longest edge of the document image. If the image exceeds this limit, it will be downscaled proportionally. Default is 0

        • pages: Page[]

          The legacy pages to be used for document creation. Legacy filters that are set on the pages will be ignored. Please switch to ParametricFilters instead.

      Returns Promise<DocumentData>

      • Created document.

      Deprecated

  • createDocumentFromPdf:function
    • Creates a document from the provided PDF file with the specified options.

      Parameters

      • params: {
            options?: CreateDocumentOptions;
            pdfFileUri: string;
        }
        • Optional options?: CreateDocumentOptions

          The options to be used for document creation.

        • pdfFileUri: string

          The PDF file uri to be used for document creation.

      Returns Promise<DocumentData>

      • Created document.
  • deleteAllDocuments:function
    • Deletes all stored documents.

      Returns Promise<void>

  • deleteDocument:function
    • Deletes the document with the specified Uuid.

      Parameters

      • documentUuid: string

        The Uuid of the document to be deleted.

      Returns Promise<void>

  • documentExists:function
    • Checks if a document with the specified Uuid exists.

      Parameters

      • documentUuid: string

        The Uuid of the document.

      Returns Promise<boolean>

      • True if the document exists, false otherwise.
  • getStoredDocumentUuids:function
    • Retrieves the Uuids of all stored documents.

      Returns Promise<string[]>

      • List of stored document Uuids.
  • loadDocument:function
    • Loads the document with the specified Uuid.

      Parameters

      • documentUuid: string

        The Uuid of the document.

      Returns Promise<DocumentData>

      • Loaded document.
  • modifyPage:function
    • Modifies a page within the document using the specified options.

      Parameters

      • params: {
            documentUuid: string;
            options?: ModifyPageOptions;
            pageUuid: string;
        }
        • documentUuid: string

          The Uuid of the document containing the page to be modified.

        • Optional options?: ModifyPageOptions

          The options specifying the modifications to be made to the page.

        • pageUuid: string

          The Uuid of the page to be modified.

      Returns Promise<DocumentData>

      • Updated document with the modified page.
  • movePage:function
    • Moves a page within the document to a new position.

      Parameters

      • params: {
            documentUuid: string;
            fromIndex: number;
            toIndex: number;
        }
        • documentUuid: string

          The Uuid of the document containing the page to be moved.

        • fromIndex: number

          The index of the page to be moved.

        • toIndex: number

          The new index position for the page.

      Returns Promise<DocumentData>

      • Updated document with the page moved to the new position.
  • removeAllPages:function
    • Removes all pages from the document with the specified Uuid.

      Parameters

      • documentUuid: string

        The Uuid of the document from which all pages will be removed.

      Returns Promise<DocumentData>

      • Updated document with all pages removed.
  • removePages:function
    • Removes pages with the specified Uuids from the document.

      Parameters

      • params: {
            documentUuid: string;
            pageUuids: string[];
        }
        • documentUuid: string

          The Uuid of the document from which pages will be removed.

        • pageUuids: string[]

          The Uuids of the pages to be removed.

      Returns Promise<DocumentData>

      • Updated document with the specified pages removed.
  • scanFromImage:function
  • startCroppingScreen:function
  • startScanner:function