Pdf Embed is a plugin that adds a Gutenberg block to embed pdf files within WordPress pages using the official Adobe PDF embed API.
Requirements
- Editor Gutenberg
- Key Adobe PDF Embed API
Add key
You can request a free key here.
Once you have created your project in the Adobe Developer Console, add the Adobe PDF Embed service and create a key. Remember to specify the domain it references.
Add a pdf file
Within your pages or posts, add a new Pdf Embed block. If you have not yet added your key, you will be shown a form to enter it.
Once you have added the key you can choose the pdf file to view. You can choose a file from the media library or specify an external url.
After choosing your pdf you can change the settings as you like, using the panel on the right.
Open PDF in lightbox
With Pdf Embed you can also choose to open a pdf in a lightbox.
Add a button and insert a link to the pdf file. A button to activate lightbox mode will appear in the block controls.