0.0.18 • Published 3 years ago

ngx-sign-gen v0.0.18

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

NgxSignGen

This library is an Angular-based wrapper class for text-signature.

This library was generated with Angular CLI version 10.2.3.

Installation

Using npm:

$ npm i ngx-sign-gen

Usage

Import NgxSignGenModule into your app.module.ts file as follows:

// Other imports
import { NgxSignGenModule } from 'ngx-sign-gen';

@NgModule({
imports: [
// ...
NgxSignGenModule
],
providers: [],
})
export class AppModule { }

Available Options

OptionRequired?Description
signGenSrctrueThe text variable that you want to convert into a signature
signGenConfigtrueThe configuration to use to generate the signature image
(signGenImg)trueAn event handler to capture the signature image generated

Usage

You can use the options listed above as follows:

In your component file app.component.ts:

export class AppComponent {
// ...
img: string = '';
username: string = '';

config: any = {
width: 500,
height: 150,
paddingX: 50,
paddingY: 80,
font: ["50px", "'Homemade Apple'"],
color: "black",
customFont: {
name: "'Homemade Apple'",
url: "http://fonts.googleapis.com/css?family=Homemade+Apple"
}
};

getImage(data) {
this.img = data;
}
}

In your html file app.component.html:

<img class="img-fluid bd rounded" style="height: 5rem; width: 100%; border: 1px solid lightgray;" alt="Signature" [src]="img">
<input type="text" [(ngModel)]="username" [signGenSrc]="username" [signGenConfig]="config" (signGenImg)="getImage($event)">

Output

NgxSignGenModule Demo

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.3

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.8

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago