Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kunder-lab/kunder-pdf-viewer
Bower plugin for viewing PDFs in ionic apps
https://github.com/kunder-lab/kunder-pdf-viewer
Last synced: 1 day ago
JSON representation
Bower plugin for viewing PDFs in ionic apps
- Host: GitHub
- URL: https://github.com/kunder-lab/kunder-pdf-viewer
- Owner: kunder-lab
- License: mit
- Created: 2016-05-13T13:02:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-23T20:01:57.000Z (about 6 years ago)
- Last Synced: 2024-12-08T12:34:41.691Z (17 days ago)
- Language: JavaScript
- Size: 349 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# kunder-pdf-viewer
## About
kunder-pdf viewer is an angular directive that uses [PDF.js](https://github.com/mozilla/pdf.js) to show PDF files inside your ionic app. It transforms
the PDF data (a String in base64) to images and then adds them dinamically inside a custom div. It has zoom in, zoom out and scroll
functionalities implemented by default.## Installation
1. Install the bower component,a new folder should be created in your /lib.`bower install kunder-pdf-viewer`
2. Import the following files to your index.html.```
```
3. Include the pdfViewer module as a dependency when defining your angular app.``` js
angular.module('myApp', ['kunder.pdfViewer,...'])
```## Use
1. Declare the directive in the selected HTML file, here you should define your ideal scale (WARNING: for best performance
keep it around 1.0) and the PDF data that should be transformed, be sure to have it as a String and loaded before the directive gets initialized.``` html
```## Optionals
The directive also accepts "onScrollBottom" and "noScrollBottom" function parameters. "onScrollBottom" is called when the bottom
end of the PDF is reached. "noScrollBottom" gets called after "onScrollBottom" is invoked and the user performs another scroll on the document.
``` html
`
```[Read the license!](./LICENSE)