1.1.0 • Published 6 months ago

ngx-pdf-previewer v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
6 months ago

NgxPdfPreviewer

As its name indicates, this is a library for viewing pdf files in Angular projects.

Getting started

For now, NgxPdfRreviewer can be installed using npm :

npm install ngx-pdf-previewer

Then, it's simple to include it in your Angular components:

  1. Import the PdfViewerComponent in your component :
import { PdfViewerComponent } from "ngx-pdf-previewer";
  1. Add it to the imports array of your component:
// ...
// import { PdfViewerComponent } from 'ngx-pdf-previewer';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [PdfViewerComponent],
  // templateUrl: ``
})
// ...
  1. After that, in your component' HTML template use :
<lib-pdf-viewer src="assets/law.pdf" [zoom]="1"></lib-pdf-viewer>

The src specifies the path to your Pdf file with the zoom level.

Note that zoom is a number and not a string. The default value for zoom is 1.5

1.1.0

6 months ago

1.0.0

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago