Skip to content

Commit ef7056a

Browse files
committed
Readme update
1 parent 505d9dc commit ef7056a

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

README.MD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
</a>
99
</p>
1010

11-
***🎉 Thanks a ton to the community - Now standing tall over 350,000 downloads!!!***
11+
***🎉 Thanks a ton to the community - Now standing tall over 400,000 downloads!!!***
1212

13-
*Pull requests and contributions are much appreciated.*
13+
***Pull requests and contributions are much appreciated.***
1414

1515
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).
1616

dist/README.MD

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
</a>
99
</p>
1010

11-
***🎉 Thanks a ton to the community - Now standing tall over 350,000 downloads!!!***
11+
***🎉 Thanks a ton to the community - Now standing tall over 400,000 downloads!!!***
1212

13-
*Looking for contributors to this project. Reach at [email protected]*
13+
***Pull requests and contributions are much appreciated.***
1414

1515
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).
1616

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.
@@ -53,7 +53,7 @@ Some of below features are unique to this component, which is unavailable in nat
5353
<img src="/sampledoc/ng2pdfjsviewerExternal.JPG" alt="angular 8 pdfjs viewer in new window"/>
5454

5555
### Embed pdf into any angular component/page
56-
<img src="/sampledoc/ng2pdfjsviewerEmbedded.jpg" alt="angular 8 pdfjs viewer embedded"/>
56+
<img src="/sampledoc/ng2pdfjsviewerEmbedded.JPG" alt="angular 8 pdfjs viewer embedded"/>
5757

5858
## Installation
5959

@@ -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` |

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ var PdfJsViewerComponent = /** @class */ (function () {
354354
PdfJsViewerComponent.decorators = [
355355
{ type: Component, args: [{
356356
selector: 'ng2-pdfjs-viewer',
357-
template: "<iframe [hidden]=\"externalWindow || (!externalWindow && !pdfSrc)\" #iframe width=\"100%\" height=\"100%\"></iframe>"
357+
template: "<iframe title=\"ng2-pdfjs-viewer\" [hidden]=\"externalWindow || (!externalWindow && !pdfSrc)\" #iframe width=\"100%\" height=\"100%\"></iframe>"
358358
},] },
359359
];
360360
PdfJsViewerComponent.propDecorators = {

0 commit comments

Comments
 (0)