David Stockdale's Scrapcode

Embedding a PDF

So when trying to embed a PDF I found that there are a few annoying hangups with just doing it without a plugin.

Without Pluigin

At first I thought i could simply do something along the lines of a simple iframe such as this:

<iframe src="/wp-content/uploads/2021/03/Character-Entity-Reference-Chart.pdf" width="100%" height="480"></iframe>

However it seems this will only show a download button on Chrome Mobile (although it apart from that it works really well).

With Plugin

This was apparently an inherent flaw of Chrome Mobile thus I decided to resort to a plugin.

Thus came the question of which plugin to use.

Google Doc Embedder

Works on pretty much everyhting (but doesn’t always load annoyingly enough).

[gview file="https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/03/Character-Entity-Reference-Chart.pdf"]

Download (PDF, 363KB)

PDF Embedder

This is in my opinion the best, most up-to-date and easiest to use of the two (as shown here).

Character-Entity-Reference-Chart

Doesn’t provide a download link unless you get the premium version.

But this can be done manually simply by inserting a file download button below.

Leave a Reply