Package Exports
- pdfviewer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pdfviewer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PDF Viewer
Lightweight PDF viewer using Mozilla's PDF JS.
Screenshot

Pre-requirments
npm install
npm run build Deploy dist to your own static server.
Usage
See example in test directory
Options
The options PdfViewer accepts are:
pdfUrl(required): URL to your pdf file, can be relative or absolute. If it is a cross-domain path, the remote server must support CORS.
staticHost(required): Static files host, PdfViewer dependents on Mozila's
PDF.jsand ourviewer.js, which must be served.onerror(optional): A custom
onerrorcallback function, if error occurs when reading or rendering your pdf file, this function will be called. If omitted, our viewer's default error handler will be used.
Examples
To get a demo:
- Run command:
npm start- Test viewer.js:
http://localhost:9000- Test pdfviewer.js (viewer.js in iframe):
http://localhost:9001Who's using
- Teambition: https://www.teambition.com/