Google Drive vs. Docs: Embedding Documents into Posts

You may have run into a scenario where a document, like a PDF, had to be embedded into one of your blog posts. There’s an official support article present here on how you can do that, but it only deals with Google Docs.

In this post, I’m going to talk about why you should rather use Google Drive for embedding documents and how to actually do it, because the embed code from Drive doesn’t currently work on A slight modification is required in the URL.

A bit about Drive

Google Drive, the cloud storage platform by Google, also has the ability to store documents (.doc, .pdf etc.) and unlike Docs, it retains their original format once uploaded. It’s also a lot more easy to manage the documents in Drive—you can upload, view and share them, however, the ability to edit is only available in Docs.

Why Drive over Docs?

It’s in the layout! Documents from Drive embedded into posts look quite different from the ones embedded from Docs. Pics or it didn’t happen! Yes, I know, nothing is better than a visual illustration, so here is a comparison of a single PDF embedded via both the services:

Can you see the difference? Click to enlarge.

The PDF from Docs is shown in a layout where you have to scroll horizontally to read the lines. Moreover, you can’t even select any text, as the embedded PDF from Docs shows up as an ‘image’.

On the other hand, the embed from Drive not only fits the frame but also has an on-screen zoom control and a button for popping out the document in a new window. Makes for a better reading experience!

How to embed Google Drive documents

Now onto the practical part!

Upload the PDF or any other supported format and share it with the desired audience. To do this, right-click the document and select Share. To make it public, click Get shareable link:








After it’s shared, double-click the document which opens up a preview, then select the pop-out button:




Next, click Embed Item under the options menu:






Copy the embed code and paste it in the post:






Now, wait before publishing the post!

There’s one change you got to make in the code. Where it says, change it to If you don’t make this change, will turn the code into a simple hyperlink and the embed will not work. 

They haven’t added the domain to their whitelist yet, so until it’s resolved, you have to use this method. Rest of the code should remain the same, except width and height which you can modify according to your liking.

Happy embedding, and let me know which embed source you personally prefer! 🙂

Troubleshooting: Is It You or a Glitch?

Had an early morning start to the day, went for a jog and after having a shwarma in the breakfast, started working on a few projects. Just as I thought it’s going to be a wonderful afternoon, stumbled upon my blog and found the menus totally vanished!

Not a problem, I said to myself; setting them up in the menu editor would fix it like a magic wand! Next second I was in the new dashboard, trying to assign the menus:

Menus had changed to “Default Menu”.

I set the Primary and Social Links Menu to the appropriate items and hit the Save button. This should’ve fixed it, right? Refreshed my blog but disappointment! No emergence of the menus so far. Must be a browser issue; after all, I had about 150 tabs open in Chrome! Off I went to my trusted Firefox, repeated the exercise, but apparently, luck wasn’t on my side.

By now I had a feeling that the new dashboard must be the culprit. Classic editor to the rescue! Here I was trying to apply the menus to their appropriate locations:


After selecting the corresponding menus, hitting Save Changes was showing the all-clear ‘locations updated’ message. But did you notice something? The ‘Assigned Menu’ column was still asking me to select a menu, whereas it should’ve shown the name of the assigned menus. That was it—if even the classic editor is giving up on me, I knew it has to be an internal glitch.

Off I went to the support forum, where usually I try to help out awesome fellow bloggers, but I needed their help today (that’s how brotherhood works!). And there I saw the same issue being reported in mass numbers; a flux of threads on header images getting disappeared, CSS customizations vanishing and even menus turning into Arabic!

That’s when I realized it’s not specific to my site, it’s neither me nor my browser, rather a site-wide issue. A sigh of relief, I knew engineers would be on their way and must be trying their best to fix the glitch.

And that’s what happened too, one of the Staff replied on the main thread that the issue was due to an update which is now fixed. It indeed was; things were automatically restored and back to normal.

Made me think, must be a tough job to not only maintain the codebase and configuration but also provide timely support to an enormous user base. The geographical distribution of their team is of a big help here I believe—this issue occurred when North America is deep asleep, Asia and Europe is awake!

Why I Shifted Back to

It was in the year 2010 that I first created a free blog at Didn’t have my own domain back then and used to post on ehtis subdomain, but eventually got one a couple of years later. That was the time I started to think I’ve outgrown the features that I need on the hosted platform, and would need to move to my own self-hosted WordPress install—AdSense and the ability to add popup plugins was on my mind.

Fast forward to 2015, after years of being on a self-hosted blog, I began to realize that I didn’t actually need the features which were initially on my mind, for a personal blog. Taking care of updates, themes, server administration (I have my own VPS server) and uptime was an unnecessary labor for a personal blog, where the intention is just to write and not worry too much about customization, geo-targeting and capturing leads. I finally made the switch and following are the main reasons for it.

Stability and Uptime

It wasn’t like my VPS server was going down every other day, the situation wasn’t this bleak, but my web host used to be a target of an occasional DDoS attack, resulting in degraded service or downtime for a few hours. Most mid-level hosts don’t have the bandwidth to thwart several Gb/s attacks, and this is where shines. They have the bandwidth to deal with waves of traffic and hold their own against the menace of DDoS—many top websites rely on them to serve millions of page views. The infrastructure is obviously scalable, which includes load-balancers, memory and bandwidth to name a few.

Here are a few uptime stats which I’ve gathered:

Recent stats of all Automattic websites
Recent stats of all Automattic websites uptime stats from 2014 uptime stats from 2014 has almost 100% uptime since October 2014, not even one day of downtime in 10 months. You can check out the complete history here, which shows 99.97%+ uptime since September 2012, the only anomaly was February 2013 with a 99.91% figure.

Where your blog gets ranked in Google depends on several factors, uptime and speed are one of those signals. You’ve got them covered here, so just focus on creating quality content!

Security and Updates

Critical security vulnerabilities can strike your installation any time as they’re discovered. Recently an XSS bug was discovered, which prompted the release of version 4.2.3 on July 23rd. Goes without saying how much damage they can cause, from sensitive information leakage to defacements.

Yes, you can set your blog to auto-update, but that may cause issues with your theme or plugins in some cases, so many like to take the manual route. Being on’s hosted platform, there’s a bit of peace of mind in this regard, you’re not exposed and the platform is timely updated.

Reader and Community

Just like other social media sites, has its own ecosystem of bloggers and readers who can find relevant content through the Reader. It’s a nice little way to get more visitors to your blog, who I’ve found will be more engaging than the search engine audience. Expect a comment if they find your content interesting!

I’ve been having a good time in the community, moving has also helped me learn many new features of the platform which is helpful because I’m trying to get into this amazing company Automattic—the brains behind 🙂

And Wait, Everything is Not Perfect!

These were the prime reasons which prompted me to move my personal blog. Your scenario can be different, perhaps you’re looking for a platform where you have the ability add third party plugins. You could be looking for revenue through AdSense (there’s a WordAds program here too, just in case) or just have a requirement which is not supported here. In that case, you’re free to go the route, have your own hosting and customize all you want! 😉