Generate PDF in Angular 2

First of all you need to install following javascript libraries:

Then add following in angular-cli.json:

Create a component


component ts:

Share This:

One thought on “Generate PDF in Angular 2

  1. daniel

    Hi! sir Please explain these lines.

    providers: [
    { provide: 'Window', useValue: window }

    @Inject('Window') private window: Window,
    ) { }

Leave a Reply

Your email address will not be published. Required fields are marked *