ng-ocr-editor
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Angular OCR Editor

Angular component that enabling viewing and editing of OCR image data in UI.

npm npm npm


Usage

app.component.html

<ng-ocr-editor-component
    [(document)]="demoDocument" [boudingBoxStyle]="boundingBoxStyle"
></ng-ocr-editor-component>

<img src="assets/demoImage.jpg" #demoImage hidden (load)="onImageLoad()"/>

app.component.ts

  boundingBoxStyle: BoundingBoxStyle = {
    color: '#627320',
    width: 2,
    selectedColor: '#4F4742',
    selectedWidth: 5,
    contrastColor: '#fff6f0',
    constastWidth: 1,
  };

  @ViewChild('demoImage') imageElement: ElementRef;
  demoMenu: demoDocument | null = null;

  onImageLoad() {
    this.demoDocument = {
      imageElement: this.imageElement.nativeElement,
      markup: [
        {
          text: 'Text',
          x1: 75, x2: 410, y1: 250, y2: 300,
        },
      ],
    };
  }

Issues

If you identify any errors in this module, or have an idea for an improvement, please open an issue.

Readme

Keywords

none

Package Sidebar

Install

npm i ng-ocr-editor

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

275 kB

Total Files

24

Last publish

Collaborators

  • creeston