Here’s a working example from my project:
To install JS dependency: npm install pdfjs-dist
JS:
- purple/pdf.js at master · knoebber/purple · GitHub
- purple/app.js at master · knoebber/purple · GitHub
LiveView:
It has simple pagination and zoom controls. It’s a bit hacky and the JS is messy but hopefully it can help others get started…