ngx-scanner-text
This library is built with the purpose of automatically getting text in images.
This is the codesandbox.
Installation
npm i ngx-scanner-text --save
Usage
import { NgxScannerTextModule } from "ngx-scanner-text";
@NgModule({
imports: [NgxScannerTextModule],
...
})
export class AppModule {}
<ngx-scanner-text
#scanner
[languages]="['eng']"
[src]="'https://tesseract.projectnaptha.com/img/eng_bw.png'"
(data)="onData($event)"
></ngx-scanner-text>
<pre>
<textarea cols="80" rows="6">{{ scanner?._logger | json }}</textarea>
</pre>
import { Component } from "@angular/core";
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
})
export class AppComponent {
onData(e) {
console.log(e.text);
}
}
Support versions
ng version | version |
---|
Angular 14 | 1.0.0 |
Author: DaiDH
, Tel: 0845882882
License
MIT License. Copyright (c) 2022 DaiDH