1.0.1 • Published 2 years ago

reveal-pdf v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

reveal-pdf

npm version npm publish

A reveal.js plugin for viewing PDF page as image:

demo

Check out the live demo.

The images are generated using pdf.js.


Installation

  1. Download and install the package in your project:

    npm install --save reveal-pdf

    or

    yarn add reveal-pdf

    or just download dist/reveal-pdf.js into the plugin folder of your reveal.js presentation, e.g.. plugins/reveal-pdf.

  2. Add the plugins to the dependencies in your presentation

    <script src="node_modules/reveal-pdf/dist/reveal-pdf.js"></script>
    // ...
    Reveal.initialize({
      // ...
      plugins: [
          // ...
          RevealPdf,
      ]
    });

    If you're using reveal-md you can add a script to load the plugin:

    options.plugins.push(RevealPdf)

    and then add a reference to this script along with node_modules/reveal-pdf/dist/timeline.js to the scripts object inside reveal-md.json config file.

For reference, take a look at the demo package in this repo.