Skip to content

Commit ff4980f

Browse files
committed
Documentation update
1 parent 5e495da commit ff4980f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.MD

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This is a super simple angular 8 component for displaying pdfs inline(embedded)
1717
## What is new?
1818
1. **Direct access to underlying viewer** - Exposed PDFViewerApplication and PDFViewerApplicationOptions objects opens a whole world of customizable PDFJS and ViewerJS properties and methods, allowing to change them programmatically; thus producing a unique viewer experience.
1919
2. **Dynamic page number** - Getter/Setter added for page number. Change page number after document loaded, or access current page in parent component.
20-
3. **Support for events** - You may now register several events such as document load, page change, before print, after print etc.
20+
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.
2121

2222
## Tutorials, Demos & Examples
2323
**Hosted Demo app showing unique use cases**: https://ng2-pdfjs-viewer.azurewebsites.net
@@ -30,7 +30,7 @@ Some of below features are unique to this component, which is unavailable in nat
3030
✔️ **Direct access to underlying viewer** 👨‍💻👩‍💻- Exposed PDFViewerApplication and PDFViewerApplicationOptions objects opens a whole world of customizable PDFJS and ViewerJS properties and methods, allowing to change them programmatically; thus producing a unique viewer experience.
3131
✔️ **Embed pdf** 🗎 - Embeds viewer and pdf inside your web page/component.
3232
✔️ **Blob and byte arrays** 🔟 - Have pdf as a byte array? Still works.
33-
✔️ **Events** ⚡ - Catch events such as document loaded, page change, before/after print etc.
33+
✔️ **Events** ⚡ - Catch events such as document loaded, page change, before/after print etc.Please make sure to provide `viewerId` for events to work properly.
3434
✔️ **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.
3535
✔️ **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.
3636
✔️ **Auto download** 💾 - This option allows you to download the pdf file to user device automatically without manually invoking the download.
@@ -119,10 +119,10 @@ _Please note if you decide to put `pdfjs` folder anywhere else other than the `a
119119
| `[viewerFolder]` | Set path to _pdfjs's_ `web` and `build` folders. | `string` | `assets` folder path |
120120
| `[externalWindow]` | Open in new tab. Set to `true` to open document in a new tab | `boolean` | `false` |
121121
| `externalWindowOptions` | External window options. For allowed comma separated values, refer to https://developer.mozilla.org/en-US/docs/Web/API/Window/open | `string` | |
122-
| `(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` | |
123-
| `(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` | |
124-
| `(onBeforePrint)` | Event to be invoked before document gets printed. E.g. `(onBeforePrint)="testBeforePrint()"` | `Function` | |
125-
| `(onAfterPrint)` | Event to be invoked after document gets printed. E.g. `(onAfterPrint)="testAfterPrint()"` | `Function` | |
122+
| `(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` | |
123+
| `(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` | |
124+
| `(onBeforePrint)` | Event to be invoked before document gets printed(Must provide `viewerId`). E.g. `(onBeforePrint)="testBeforePrint()"` | `Function` | |
125+
| `(onAfterPrint)` | Event to be invoked after document gets printed(Must provide `viewerId`). E.g. `(onAfterPrint)="testAfterPrint()"` | `Function` | |
126126
| `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 |
127127
| `[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` |
128128
| `[lastPage]` | Show last page of the document once it is loaded(If set to `true`). If you use this option along with _`page`_ option, undesired effects might occur | `boolean` | `false` |

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng2-pdfjs-viewer",
3-
"version": "5.0.5",
3+
"version": "5.0.6",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/intbot/ng2-pdfjs-viewer"

0 commit comments

Comments
 (0)