| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Embed a PDF from the Media Library or elsewhere via oEmbed or as a block into an iframe tag.
Embed a PDF from the Media Library or elsewhere via oEmbed or as a block into an iframe tag. The URL only has to be world reachable link. Chrome uses Google Doc Viewer as Chrome seems to automatically rendered embedded JS in PDFs automatically. Uses Google Doc Viewer with mobile.
Inspired by Embed PDF and RV Embed PDF.
Many thanks to Alex Kirk for making Embed PDF Viewer compatible with the new block editor.
Pull requests are welcome against the develop branch.
The block is built from source in blocks/ with @wordpress/scripts (Node 20+). blocks/build/ is gitignored — a fresh checkout has no built assets, so build once locally before testing:
cd blocks
nvm use # or: nvm use 20
npm ci
npm run build # one-time build → blocks/build/
# or: npm start # watch mode for developmentThen symlink (or copy) the plugin into a local WordPress install, e.g. wp-content/plugins/embed-pdf-viewer → this checkout. CI rebuilds from source for releases, so build output is disposable locally.
Occasionally Google Doc Viewer will not correctly load the PDF. Reloading the page should correct the issue, though this may need to be done several times.
Embed PDF Viewer block
Select PDF
PDF block and attributes
| Back | FazBrowse Home | New Git URL |