Embed a PDF from the Media Library or elsewhere via oEmbed or as a block into an
object tag or Google Doc Viewer as fallback. The URL only has to be world reachable link.
Inspired by Embed PDF and RV Embed PDF.
Many thanks to Alex Kirk for making Embed PDF Viewer compatible with the new block editor.
Development on GitHub. Pull requests are welcome against the
This plugin provides 1 block.
Contributors & Developers
“Embed PDF Viewer” is open source software. The following people have contributed to this plugin.Contributors
“Embed PDF Viewer” has been translated into 9 locales. Thank you to the translators for their contributions.
Translate “Embed PDF Viewer” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
2.3.0 / 2021-07-07
- add @10up GitHub Actions integration for WordPress SVN
2.2.0 / 2021-03-05
- update Toolbar to ToolbarGroup and ToolbarButton
- add limited ’support for block alignment toolbar
- fixes for i18n in block
composer.json, doesn’t work with minimized JS
2.1.2 / 2020-09-15
- use same block name for oembed
- add additional dependencies to enqueue
2.1.1 / 2020-07-20
- update block for deprecated items and minor errors
- update media selector for only PDFs
2.1.0 / 2020-07-20
- update block build process
- add title and description attributes for a11y
- add PDF svg for block
2.0.5 / 2020-03-09
- minor updates to plugin structure on GitHub
- update tested to
2.0.4 / 2019-10-05
- fixed PDF upload within block
2.0.3 / 2019-04-25
- move block registration to it’s own function and hook
- WPCS updates
2.0.2 / 2019-02-03
- update WordPress requirements
2.0.1 / 2019-01-11
composer.jsonand automatically create POT with
- added check for
register_block_type()for WP 4.9.x and below
2.0.0 / 2018-12-20 🎂
- a proper PDF block was added with much help from Alex Kirk, many thanks
1.6.1 / 2018-11-25
- properly initialize
1.6.0 / 2018-07-22
- added filter
- added paragraph tag around link to PDF
1.5.0 / 2016-12-17
- added CSS to fallback to
iframeon iOS as
objectisn’t scrollable 😛
- switch to using
iframeas fallback display method
- inserting anything other than PDF from Media Library now works as expected.
- fixed a couple of PHP warnings
- inserting a PDF from the Media Library now simply inserts the URL for oEmbed
- oEmbed a PDF from any source
instance()just a little more
- rename instance variable to
$instanceand make private
- update DocBlocks
$attsis an array
- bugfix for not returning media item when not PDF, Bad Andy 🙁
- add to DocBlocks
- refactor to put embed code in one function
- add assets
- initial commit