Embed Document options
To embed a document directly in your post or page, select a Drive file from the list in the Drive Embedder dialog box, then click on the Embed document option.
You will be able to enter a width and height (in pixels, or use ‘100%’ to match the parent container width).
You may also see a checkbox labelled ‘Embed as Drive doc’ – this will be available for non-native file types (e.g. PDF or Word doc, but not Google Spreadsheets etc). Checking this will use Google Drive itself to host the file preview that your viewers will see. That means they will need to be logged in to a Google account with correct permissions to view – unless sharing for the document is set to ‘Anyone with the link can view’ or higher. This style of embed will give similar results to the options to embed available from the File menu if you open the file fully in Drive itself.
Leaving ‘Embed as Drive doc’ unchecked will use a separate piece of Google technology (their document viewer) to present your file. That is separate from Drive (except that the viewer will obtain the PDF from Drive). To make this work, you will always need the file to be shared as ‘Anyone with the link can view’ or higher.
Ultimately, the Embed as Drive doc option gives you two different styles of embedding – if you’re unsure which you need, just experiment between the two and find out which suits your needs best!
Why is the option for Viewer / Download / Embed disabled for some files?
Download isn’t normally enabled for native Google file types.
Embed should be enabled for many non-native file types (e.g. PDF, Word DOC). If not, you may need to increase sharing settings within Google Drive to ‘anyone with the link may view’, or higher.
If that still doesn’t work, your file type may not be supported. Please get in touch (send your file or share with us if possible), and we will see if it can be supported – email us.
To embed Google Drive Folders or image file types, you will require the premium version of the plugin. You will be notified if that is the case for your selected file.
How does the plugin respect Google Drive sharing settings?
Google Drive Embedder will show different behavior depending on your document’s type and its sharing settings within Google Drive.
Generally, we recommend setting files’ Sharing settings to at least ‘anyone with the link can view’, in order for them to be visible to all visitors.
This setting is essential for third-party file types such as Word and PDF (otherwise all visitors will see unintelligible content).
You can use lower sharing settings for Google documents (e.g. share only within the organization, or with specific users), but in that case you will need your users to be logged in to a Google account that is authorized to view the content (otherwise, they will be told they do not have permission).
When using ‘anyone with the link can view’, you must understand that any visitors to your WordPress site will be able to obtain that document’s link and potentially open the document outside of your WordPress site.
I embed a (non-Google) document, but I just see some HTML in the published post
Specifically, you see something starting:
<!DOCTYPE html>
<html…
<head…
Most likely, you need to increase sharing settings for the file. In your Google Drive, find the file and click ‘Share’. Click ‘Change’, and then on ‘Anyone with the link can view’. Click ‘Done’.
If you reload your published page or post in WordPress, it should now display properly, or at least give a message saying that the document type is unsupported. Please get in touch if not!