function extractTablesFromFile(file, options): Promise<ExtractedTable[]>

Extracts tables from a file (ImageFile or PdfFile).

Examples

import { extractTablesFromFile } from "@intuned/sdk/ai-extractors";

const tables = await extractTablesFromFile({
  source: {
    type: "url",
    data: "<file url>"
  },
  type: "pdf",
  // pages array is optional, do not pass it if you want to include all pages in the process
  pages: [1, 2]
}, {
  label: "extract_tables"
});

console.log(tables);

Parameters

file: ImageFile | PdfFile | SpreadsheetFile

The file you want to extract the tables from.

options

options.label: string

A label for this extraction process, used for billing and monitoring.

Returns

Promise<ExtractedTable[]>

A promise that resolves to an array of extracted tables.