Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/naptha/tesseract.js.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalearica <admin@scribeocr.com>2022-09-18 01:01:06 +0300
committerGitHub <noreply@github.com>2022-09-18 01:01:06 +0300
commitdd6c40b6818468f45cf006e844501e6afdb377b1 (patch)
tree23473863c021b15c8cfe5c827fbb299a7ffacc45
parent5ff17fdeb14486c41450099e93f4d0f90e988ae2 (diff)
Updated types per #606 and #580 (#663)
-rw-r--r--src/index.d.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.d.ts b/src/index.d.ts
index 2a7f265..ce697f8 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -25,6 +25,7 @@ declare namespace Tesseract {
recognize(image: ImageLike, options?: Partial<RecognizeOptions>, jobId?: string): Promise<RecognizeResult>
detect(image: ImageLike, jobId?: string): Promise<DetectResult>
terminate(jobId?: string): Promise<ConfigResult>
+ getPDF(title?: string, textonly?: boolean, jobId?: string):Promise<GetPDFResult>
}
interface WorkerOptions {
@@ -62,6 +63,10 @@ declare namespace Tesseract {
jobId: string
data: Page
}
+ interface GetPDFResult {
+ jobId: string
+ data: number[]
+ }
interface DetectResult {
jobId: string
data: DetectData
@@ -99,6 +104,7 @@ declare namespace Tesseract {
SINGLE_CHAR = '10',
SPARSE_TEXT = '11',
SPARSE_TEXT_OSD = '12',
+ RAW_LINE = '13'
}
type ImageLike = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
| CanvasRenderingContext2D | File | Blob | ImageData | Buffer;