ng2-pdfjs-viewer
Advanced tools
Comparing version 5.0.5 to 5.0.6
{ | ||
"name": "ng2-pdfjs-viewer", | ||
"version": "5.0.5", | ||
"version": "5.0.6", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -13,3 +13,3 @@ # Angular 8 PDFJS viewer with Mozilla's ViewerJS (Supports Angular 2/4/5/6/7/8) | ||
*Looking for contributors to this project. Reach at codehippie1@gmail.com* | ||
*Pull requests and contributions are much appreciated.* | ||
@@ -21,3 +21,3 @@ This is a super simple angular 8 component for displaying pdfs inline(embedded) OR in a new tab along with a feature rich viewer. It uses mozilla's pdfjs viewer(v2.2.171) behind the scenes and supports angular(2/4/5/6/7/8). Extremely lightweight, easiest to integrate and use, most reliable, this library has only one dependancy (@angular/core). | ||
2. **Dynamic page number** - Getter/Setter added for page number. Change page number after document loaded, or access current page in parent component. | ||
3. **Support for events** - You may now register several events such as document load, page change, before print, after print etc. | ||
3. **Support for events** - You may now register several events such as document load, page change, before print, after print etc. Please make sure to provide `viewerId` for events to work properly. | ||
@@ -35,3 +35,3 @@ ## Tutorials, Demos & Examples | ||
✔️ **Blob and byte arrays** 🔟 - Have pdf as a byte array? Still works. | ||
✔️ **Events** ⚡ - Catch events such as document loaded, page change, before/after print etc. | ||
✔️ **Events** ⚡ - Catch events such as document loaded, page change, before/after print etc.Please make sure to provide `viewerId` for events to work properly. | ||
✔️ **Print preview** 🖨️ - You can set the pdf to open in a new tab or another browser window and provide an immediate print preview, A use case will be a 'Print' button opening pdf in new window with print dialog. | ||
@@ -59,3 +59,3 @@ ✔️ **Defaults** - There are a ton of built in functionality Mozilla's viewer supports; such as print, download, bookmark, fullscreen, open file, zoom, search, pan, spread, navigate, attachments etc which is also available as-is in this viewer. Not mentioning them individually. | ||
### Embed pdf into any angular component/page | ||
<img src="/sampledoc/ng2pdfjsviewerEmbedded.jpg" alt="angular 8 pdfjs viewer embedded"/> | ||
<img src="/sampledoc/ng2pdfjsviewerEmbedded.JPG" alt="angular 8 pdfjs viewer embedded"/> | ||
@@ -126,6 +126,6 @@ ## Installation | ||
| `externalWindowOptions` | External window options. For allowed comma separated values, refer to https://developer.mozilla.org/en-US/docs/Web/API/Window/open | `string` | | | ||
| `(onDocumentLoad)` | Event to be invoked once document is fully loaded. Also returns number of pages in the `$event` parameter. E.g. `(onDocumentLoad)="testPagesLoaded($event)""` | `Function` | | | ||
| `(onPageChange)` | Event to be invoked when user scrolls through pages. Also returns current page number user is at in the `$event` parameter. E.g. `(onPageChange)="testPageChange($event)""` | `Function` | | | ||
| `(onBeforePrint)` | Event to be invoked before document gets printed. E.g. `(onBeforePrint)="testBeforePrint()"` | `Function` | | | ||
| `(onAfterPrint)` | Event to be invoked after document gets printed. E.g. `(onAfterPrint)="testAfterPrint()"` | `Function` | | | ||
| `(onDocumentLoad)` | Event to be invoked once document is fully loaded(Must provide `viewerId`). Also returns number of pages in the `$event` parameter. E.g. `(onDocumentLoad)="testPagesLoaded($event)""` | `Function` | | | ||
| `(onPageChange)` | Event to be invoked when user scrolls through pages(Must provide `viewerId`). Also returns current page number user is at in the `$event` parameter. E.g. `(onPageChange)="testPageChange($event)""` | `Function` | | | ||
| `(onBeforePrint)` | Event to be invoked before document gets printed(Must provide `viewerId`). E.g. `(onBeforePrint)="testBeforePrint()"` | `Function` | | | ||
| `(onAfterPrint)` | Event to be invoked after document gets printed(Must provide `viewerId`). E.g. `(onAfterPrint)="testAfterPrint()"` | `Function` | | | ||
| `downloadFileName` | Sets/Changes the name of document to be downloaded. If the file name does not ends in `.pdf`, the component will automatically add it for you. | `string` | Actual name of the document | | ||
@@ -132,0 +132,0 @@ | `[page]` | Show specific page. E.g _page=3_. You may also get/set the page number from your component using '.' notation explicitly, after document is loaded. E.g. `myPdfViewer.page = 3;` | `number` | `1` | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11949840