A PDF on the page. The toolbar with zoom, the page number, fullscreen and Download stays in view while you scroll.
SoftIcon Document Viewer adds a Document Viewer block to the block editor. Pick a PDF, Word (DOCX), Excel (XLSX, XLS) or CSV file from the Media Library, upload one, or paste a link.
The plugin stores no data, sets no cookies and contacts no outside service. Your files are read by the visitor’s browser straight from your site. If you link a file on another website, the visitor’s browser loads it from there.
PDF.js 6.5.438 (npm package pdfjs-dist) by Mozilla – github.com/mozilla/pdf.js – Apache License 2.0. Bundled as build/pdfjs.js and build/pdfjs/pdf.worker.min.js (minified upstream build); license in build/pdfjs/LICENSE.txt.
Also from the pdfjs-dist package: the JavaScript builds of the OpenJPEG (BSD-2) and JBIG2 (BSD-3) image decoders in build/pdfjs/decoders, the Foxit (BSD-3) and Liberation (GPLv2 with font exception) standard fonts in build/pdfjs/standard_fonts, and the Adobe CMaps (BSD-3) in build/pdfjs/cmaps, each with its license file. The fonts and CMaps are binary data files; the build stores each one unchanged as a base64 string in a .json file, which the plugin decodes back to the original bytes for pdf.js.
docx-preview 0.4.1 (npm package docx-preview) by Volodymyr Baydalka – github.com/VolodymyrBaydalka/docxjs – Apache License 2.0. Bundled in build/docx-preview.js; license in build/docx-preview-LICENSE.txt.
JSZip 3.10.2 (npm package jszip) by Stuart Knightley – github.com/Stuk/jszip – MIT License or GPLv3 (used here under the MIT License). Bundled in build/docx-preview.js, it opens the DOCX file (a zip archive); license in build/jszip-LICENSE.txt.
SheetJS Community Edition 0.20.3 (package xlsx) by SheetJS LLC – sheetjs.com / git.sheetjs.com/sheetjs/sheetjs – Apache License 2.0. Bundled in build/xlsx.js; license in build/xlsx-LICENSE.txt. Installed from the official SheetJS tarball (cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz, as SheetJS recommends), not from the older npm release.
The unminified source of this plugin is in the src folder, with package.json and webpack.config.js. Build it with npm install and npm run build; the build copies the pdf.js files from node_modules/pdfjs-dist.