Skip to content
Elisabeth Pointal edited this page Feb 23, 2018 · 5 revisions

formater-pdf-viewer-vjs

Note

Your pdf file must be on the same domain than your html page
Or You must add an Access-Control-Allow-Origin directive when you serve your pdf file

Examples

Sample

Only insert this code in your html page,

  <formater-pdf-viewer src="url/file.pdf" lang="fr" ></formater-pdf-viewer>
  <script src="https://cdn.rawgit.com/terresolide/formater-pdf-viewer-vjs/0.1.6/dist/formater-pdf-viewer-vjs.js"></script> 

With FontAwesome

If you want use font-awesome icon for the buttons, you can do with adding the font-awesome script in head tag

<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>

And in formater-pdf-viewer tag add the property fa like in the following lines.

  <formater-pdf-viewer src="url/file.pdf" lang="fr" fa="true"></formater-pdf-viewer>
  <script src="https://cdn.rawgit.com/terresolide/formater-pdf-viewer-vjs/0.1.6/dist/formater-pdf-viewer-vjs.js"></script> 
Clone this wiki locally