-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Elisabeth Pointal edited this page Feb 23, 2018
·
5 revisions
Your pdf file must be on the same domain than your html page
Or You must add anAccess-Control-Allow-Origin
directive when you serve your pdf file
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>
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>