The WordPress 5.8 comes with a set of developments for the Gutenberg editor that preview the future wordpress development direction. It seems that the focus is on the Gutenberg development, but was it really necessary to ship a PDF viewer in the WordPress core?
As of version 5.8 Gutenberg makes PDF embedding very easy, except that it doesn’t work on mobile devices… isn’t this kind of useless? Previously we had plugins that helped embed PDF files in the Gutenberg editor if you really wanted to do this. With the new version, you can do this in the default editor.
To embed a PDF file you should actually add a file block that will recognize the file as being a PDF and perform the embed function
After clicking on File, you can select a PDF file to upload and people visiting the site from a desktop will have advanced PDF viewing functionalities on the right side arrows like printing, rotating, scrolling pages:
From the right side Gutenberg properties sidebar you can manage the PDF behavior for the desktop – if you want to embed the PDF, the height of the PDF preview, and if you want to show the link to download the PDF file:
The this becomes really not so useful as most phone and tablet browsers won’t display embedded PDFs but a ratio distorted image of the first page of the PDF.