Embedded PDF
JamsEDU uses EmbedPDF to display PDF files directly on your pages. Add a div with a data-pdf attribute pointing to your PDF file, or use an embed element whose src ends in .pdf. JamsEDU turns either one into an in-page reader with zoom and scrolling. Make sure the file is somewhere your site can serve it, such as /assets/docs/.
<div data-pdf="/assets/docs/your-handout.pdf"></div>
You can customize how the PDF viewer behaves by editing jamsEduConfig.embedPdf in assets/js/main.js. Set only the properties you need and anything you omit will use the default values. To disable the viewer entirely, set the whole key to false. For more on how jamsEduConfig works across all built-ins, see Optional Settings.
useMutationObserver- When
true(default), new[data-pdf]orembed[src$=".pdf"]elements added to the page after load are automatically mounted through the shared DOM watcher. Whenfalse, only elements present in the DOM at load time are mounted. version- The
@embedpdf/snippetversion to load from jsDelivr. Currently defaults to2.14.0. minZoom,maxZoom- Minimum and maximum zoom levels for the viewer. Currently default to
0.5and3. scrollPageGap- Pixel gap between pages in continuous scroll mode. Currently defaults to
12. disabledCategories- An array of toolbar category IDs to hide. Setting this replaces the default list entirely. The defaults hide
form,redaction,document-open,document-close,document-capture,document-protect, andcapture. fullscreenProxy- When
true(default), adds extra fullscreen control wiring for the viewer UI.
Live example
The embed below uses the demo PDF shipped with this documentation site.