Pages

Saturday, 30 April 2011

Creating a direct link to a PDF stored in Google Docs

I use Google Docs to store allot of my files online, pretty much because I love Google, without their services like Google calender sending reminders to my phone I wouldn't turn up to half the things I'm meant to do! Plus they are cheap for storage space to back up all my photo's and documents for work etc.

Any ways recently I had a bit of trouble trying to create a direct link to a PDF I had uploaded to Google Docs and thought I would share how I finally managed to do it here!!

Some times a Direct link is better then the viewer one it gives you because Google viewer, although good, can mess up PDF's every now and then which was the case with the one I was trying to share.

After searching for a solution to get a direct link I couldn't find one that worked so I managed to do a bit of trickery and figure it out for myself. So heres me giving back and sharing my gained knowledge!


To create a direct link to a PDF create the URL like this:

https://docs.google.com/uc?id=[DOC-ID]&export=download&hl=en

Where you replace the [DOC-ID] with the ID of the document. This can be found by looking at the URL bar when you are viewing the doc you want to share. It will be just after the "srcid=". An example is below:

https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B4HzGLvRBrEKNzYzZDljZjEtZmIwZS00NjRiLWIxOGYtYmM5MDEyYzNhNDA4&hl=en

The bold bit is the bit you want and will always end just before the &! (but don't include the & it will mess it up!)

Enjoy and hope this helps a few people!

No comments:

Post a Comment