How to easily share a downloadable copy of your Google Doc document (in any file format)
Blog , blogging , docs , Documents , edit , Export , Google , Google Docs , Google Drive , Hack , How To , make a copy , Save , share , Spreadsheet , Tip of the Day , Tutorial , view only , Web Design , Website Edit
Recently I have been getting more and more requests to have "edit" permissions on my Google documents that I have shared with other people. I have intentionally set these documents as "view only" with explicit instructions to make a copy of the document if you wish to edit the document.
For example, if I share a file that is view only, when you view the document, you can make a copy but it is not necessarily obvious that you need to make a copy in order to edit the file (even [apparently] if I tell you that you need to make a copy).
This is the URL to a sample file that I am sharing. Click on it to see that it is view only (until you make a copy of course).
Once you go to the menu, you can either make a copy, or "add to my drive." This is pretty simple for most users but is not really obvious when you first go to the page. A better solution would be if you were viewing the copy itself.
Fortunately, this is easy to do. Once you have the document shared as "view only," you can change the URL in your document that says "/edit" and have it say "/copy". (see screen cast below)
Now, once someone clicks on that link, they are forced to make a copy of the document and when they finally view the document, they are actually viewing their own copy and can make any change without changing your original document. Yay!
You can try it by clicking on this link here:
https://docs.google.com/document/d/1-FKZaEt91yvOceDTV8p9xEqwuvUAFkxCyIPAEaeKOTY/copy (notice the /copy at the end of the URL)
One thing to keep in mind; the viewer must be logged into Google for this to work. If they are not then they will get a login prompt and will get a copy of the document after they have logged in.
Share as a downloadable file
After discovering this, I thought it would be cool if you could download directly in other formats as well. Turns out you can! Using the developer tools in Chrome and a lot of trial and error, I figured out how you can share a document as a downloadable Word or PDF file.
Instead of changing "/edit" to "/copy" you can change it to "export?format=whateverformatyouwant."
Here are some examples that you can click on and try:
(Note: Text that needs manual editing is highlighted in yellow)
Save as Microsoft Word .docx format:
Save as open document .odt (LibreOffice) format:
Save as a PDF:
I think you get the idea.
For a document you can export using the following formats: docx, odt, rtf, pdf, txt, html, and epub
How cool is that? You can write a book online and share it directly with others as an EPUB!!
If you are trying to share a spreadsheet, you are allowed the formats: xlsx, ods, pdf, html, csv, and tsv
If you are trying to share a presentation, you are allowed the formats: pptx, pdf, txt, jpg, png, and svg
I think knowing this gives you a much better way to share documents from Google docs rather than having people manually save a copy then manually download that copy.
Have any great ideas for a good use case for this on your website? Write a comment below.