You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2024. It is now read-only.
The `on-page-load` function is each time a page is loaded and will pass the page number.
126
+
When the scale changes all pages are unloaded, so `on-page-load` will be called again for each page.
127
+
_If `onPageLoad()` returns `false`, the page will not be marked as loaded and `onPageLoad` will be called again for that page on the next (200ms) interval._
The `<pdfjs-viewer>` directive automatically expands to the height and width of its first immediate parent, in the case of the example `.some-pdf-container`.
142
+
If no parent container is given the html `body` will be used. Height and width are required to properly display the contents of the pdf.
143
+
144
+
## Demo
145
+
You can test out a [demo](https://github.com/legalthings/angular-pdfjs-viewer/tree/master/demo) of this directive.
146
+
You must run the node server first due to CORS. First make sure the dependencies are installed.
99
147
100
148
cd demo
101
149
npm install
@@ -108,7 +156,6 @@ Afterwards run the server like so.
108
156
The server will be running on localhost:8080
109
157
110
158
## Advanced configuration
111
-
112
159
By default the location of PDF.js assets are automatically determined. However if you place them on alternative
113
160
locations they may not be found. If so, you can configure these locations.
114
161
@@ -129,4 +176,3 @@ Note that a number of images used in the PDF.js viewer are loaded by the `viewer
129
176
through JavaScript. Instead you need to compile the `viewer.less` file as
0 commit comments