0.0.19 • Published 2 years ago

nano-pdf-book-viewer v0.0.19

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

NanoPdfBookViewer

A small PDF viewer in shape of a book for Angular Angular 13^

Set up

  1. Install the dependency
npm install --save nano-pdf-book-viewer
  1. Add PDF JS scripts to your project so we can load the pdfs
"scripts": [
  "node_modules/nano-pdf-book-viewer/scripts/pdf.2-11-338.worker.min.js",
  "node_modules/nano-pdf-book-viewer/scripts/pdf.2-11-338.min.js"
]
  1. Import the module in your AppModule
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NanoPdfBookViewerModule } from 'nano-pdf-book-viewer';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NanoPdfBookViewerModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

NanoPdfBookViewerComponent properties

  • [pdfSrc] set this property to point to the PDF you'd like to load. Changing this property will result in loading the new PDF. Note that this value needs to be a valid URL
  • [pageNumber] allows the developer to set the current page. It always performs the animation.
  • (loading) emits true and false based on the state of the component; Downloading PDF, Rendering, etc. Once it's done rendering emits true.
  • (pdfPageCount) emits the total number of pages once the PDF has been downloaded and parsed.
0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago