Skip to content

calderalabs/ember-pdf-js

 
 

Repository files navigation

Ember-pdf-js

Standard - JavaScript Style Guide Latest NPM release Ember Observer Score License Dependencies Dev Dependencies Build Status

This is a simple addon to wrap PDF.js in ember.

Addon's "API"

To use it in a really simple way just use the pdf-js component:

{{pdf-js pdf=urlOfYourPdf}}

In most cases, you will want to "extend" the toolbar component, you can develop your own component and make ember-pdf-js use it:

{{pdf-js pdf=urlOfYourPdf toolbarComponent="your-component-here"}}

Your toolbar component should extends the original component:

import PdfJsToolbar from 'ember-pdf-js/components/pdf-js-toolbar';
import layout from '../../templates/components/pdf-js/toolbar';

export default PdfJsToolbar.extend({
  layout
  })

A word about the current page update

There are some limitation ATM on how the current page is updated. The "scroll" need to be placed on the .pdfViewerContainer. For an example on how to do it, check the dummy app's style sheet

About

Happy wrapper for PDF.JS in Ember!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.5%
  • HTML 13.4%
  • CSS 1.1%