Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
25.77 KB
MD5: 0f781fdce63b8797fc621b2e688f211e
SHA-1: 73418d6cbe41b8bbe387b1703beddc81ed649f05
SHA-256: 3e5a04a7191527f34962d0a458afa437cccb401f4336a622ab59502bd6efc4e0
Download zip
38.8 KB
MD5: f7888cfe88036e1eebd3eaca794faa3e
SHA-1: 73e2778b91571396b184819e7c260938bd353999
SHA-256: bedae080a5bf47e719d889a5fd3d7e93aa7eaf806b3a5c862ebee94e9221991e
Release notes
Complete rewrite for Drupal 10.3 / 11 (not an upgrade path from 7.x/8.x). Re-select the "ViewerJS" formatter on your displays.
New in alpha3
drush viewerjs:install-librarydownloads PDF.js (pdfjs-dist) from the npm registry, verifies its checksum and installs it intolibraries/pdfjs-dist, without asset-packagist or Composer repository setup. Run it again to update;--pdfjs-versionselects a release. Releases older than 4.2.67 are refused.- The Status report now points to the command when PDF.js is missing or outdated.
Since alpha1
- Field formatter for file and image fields: overlay, new window or inline preview.
- PDFs rendered with PDF.js in a sandboxed frame with a strict Content-Security-Policy and Drupal file access checks (private files supported). Toolbar: page indicator, zoom, fit width, fullscreen, download, print.
- The ViewerJS/WebODF library (a 2014 PDF.js fork with known vulnerabilities) and ODF preview are gone.
Known limitations: no text selection/search layer yet; very large PDFs open slowly. See the README for the security notes.