Is it possible to use Google Docs Viewer to view files already in Google Docs?












1















The title is a little confusing. I'll elaborate.



As far as I can tell, the Google Docs Viewer tool accepts a link to a raw document file (e.g. .doc, .pdf, et. al.), and renders its contents in the browser. For example, this url to a pdf http://research.google.com/archive/bigtable-osdi06.pdf when passed to Viewer, returns this link: http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf



What I'm trying to achieve is, use the Viewer to view a document already hosted in Google Docs (i.e. no longer a raw document file). When passing a link to a Google Docs document to the Viewer, the result is not as expected. It renders the link's HTML source instead of the document's contents.



The reason I want to do this is that I want to be able to use the "embed" feature of Viewer to view Google Docs documents. Does Google Docs have a "link to embeddable view" feature?



P.S. Here is a sample snippet to an embedded document. This is what I want, but pointing to an existing Google Docs document.



<iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>









share|improve this question



























    1















    The title is a little confusing. I'll elaborate.



    As far as I can tell, the Google Docs Viewer tool accepts a link to a raw document file (e.g. .doc, .pdf, et. al.), and renders its contents in the browser. For example, this url to a pdf http://research.google.com/archive/bigtable-osdi06.pdf when passed to Viewer, returns this link: http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf



    What I'm trying to achieve is, use the Viewer to view a document already hosted in Google Docs (i.e. no longer a raw document file). When passing a link to a Google Docs document to the Viewer, the result is not as expected. It renders the link's HTML source instead of the document's contents.



    The reason I want to do this is that I want to be able to use the "embed" feature of Viewer to view Google Docs documents. Does Google Docs have a "link to embeddable view" feature?



    P.S. Here is a sample snippet to an embedded document. This is what I want, but pointing to an existing Google Docs document.



    <iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>









    share|improve this question

























      1












      1








      1








      The title is a little confusing. I'll elaborate.



      As far as I can tell, the Google Docs Viewer tool accepts a link to a raw document file (e.g. .doc, .pdf, et. al.), and renders its contents in the browser. For example, this url to a pdf http://research.google.com/archive/bigtable-osdi06.pdf when passed to Viewer, returns this link: http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf



      What I'm trying to achieve is, use the Viewer to view a document already hosted in Google Docs (i.e. no longer a raw document file). When passing a link to a Google Docs document to the Viewer, the result is not as expected. It renders the link's HTML source instead of the document's contents.



      The reason I want to do this is that I want to be able to use the "embed" feature of Viewer to view Google Docs documents. Does Google Docs have a "link to embeddable view" feature?



      P.S. Here is a sample snippet to an embedded document. This is what I want, but pointing to an existing Google Docs document.



      <iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>









      share|improve this question














      The title is a little confusing. I'll elaborate.



      As far as I can tell, the Google Docs Viewer tool accepts a link to a raw document file (e.g. .doc, .pdf, et. al.), and renders its contents in the browser. For example, this url to a pdf http://research.google.com/archive/bigtable-osdi06.pdf when passed to Viewer, returns this link: http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf



      What I'm trying to achieve is, use the Viewer to view a document already hosted in Google Docs (i.e. no longer a raw document file). When passing a link to a Google Docs document to the Viewer, the result is not as expected. It renders the link's HTML source instead of the document's contents.



      The reason I want to do this is that I want to be able to use the "embed" feature of Viewer to view Google Docs documents. Does Google Docs have a "link to embeddable view" feature?



      P.S. Here is a sample snippet to an embedded document. This is what I want, but pointing to an existing Google Docs document.



      <iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>






      google-docs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 24 '12 at 6:39









      john2xjohn2x

      154137




      154137






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Maybe I've found a workaround.



          Firstly be sure to have set the document sharing to anyone with the link.



          Then, in the list view of Google Docs/Drive, select your document and click More > Download... and choose whatever format you want (e.g. PDF). The URL that appears for a second when you finally click Download is the URL you need (the one that works with Google Viewer).



          For text documents you can get the same URL by taking the document editing URL, e.g.:



          https://docs.google.com/document/d/ [alphanumeric code] /edit


          And change it like that:



          https://docs.google.com/document/d/ [alphanumeric code] /export?format=pdf


          For other document types it's a bit different.
          Presentation:



          https://docs.google.com/presentation/d/ [alphanumeric code] /edit
          https://docs.google.com/presentation/d/ [alphanumeric code] /export/pdf


          Spreadsheet:



          https://docs.google.com/spreadsheet/ccc?key= [alphanumeric code] 
          https://docs.google.com/spreadsheet/fm?key= [alphanumeric code] &fmcmd=12


          I don't have tried with uploaded files or other formats, but hope it helps.






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f393501%2fis-it-possible-to-use-google-docs-viewer-to-view-files-already-in-google-docs%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Maybe I've found a workaround.



            Firstly be sure to have set the document sharing to anyone with the link.



            Then, in the list view of Google Docs/Drive, select your document and click More > Download... and choose whatever format you want (e.g. PDF). The URL that appears for a second when you finally click Download is the URL you need (the one that works with Google Viewer).



            For text documents you can get the same URL by taking the document editing URL, e.g.:



            https://docs.google.com/document/d/ [alphanumeric code] /edit


            And change it like that:



            https://docs.google.com/document/d/ [alphanumeric code] /export?format=pdf


            For other document types it's a bit different.
            Presentation:



            https://docs.google.com/presentation/d/ [alphanumeric code] /edit
            https://docs.google.com/presentation/d/ [alphanumeric code] /export/pdf


            Spreadsheet:



            https://docs.google.com/spreadsheet/ccc?key= [alphanumeric code] 
            https://docs.google.com/spreadsheet/fm?key= [alphanumeric code] &fmcmd=12


            I don't have tried with uploaded files or other formats, but hope it helps.






            share|improve this answer




























              0














              Maybe I've found a workaround.



              Firstly be sure to have set the document sharing to anyone with the link.



              Then, in the list view of Google Docs/Drive, select your document and click More > Download... and choose whatever format you want (e.g. PDF). The URL that appears for a second when you finally click Download is the URL you need (the one that works with Google Viewer).



              For text documents you can get the same URL by taking the document editing URL, e.g.:



              https://docs.google.com/document/d/ [alphanumeric code] /edit


              And change it like that:



              https://docs.google.com/document/d/ [alphanumeric code] /export?format=pdf


              For other document types it's a bit different.
              Presentation:



              https://docs.google.com/presentation/d/ [alphanumeric code] /edit
              https://docs.google.com/presentation/d/ [alphanumeric code] /export/pdf


              Spreadsheet:



              https://docs.google.com/spreadsheet/ccc?key= [alphanumeric code] 
              https://docs.google.com/spreadsheet/fm?key= [alphanumeric code] &fmcmd=12


              I don't have tried with uploaded files or other formats, but hope it helps.






              share|improve this answer


























                0












                0








                0







                Maybe I've found a workaround.



                Firstly be sure to have set the document sharing to anyone with the link.



                Then, in the list view of Google Docs/Drive, select your document and click More > Download... and choose whatever format you want (e.g. PDF). The URL that appears for a second when you finally click Download is the URL you need (the one that works with Google Viewer).



                For text documents you can get the same URL by taking the document editing URL, e.g.:



                https://docs.google.com/document/d/ [alphanumeric code] /edit


                And change it like that:



                https://docs.google.com/document/d/ [alphanumeric code] /export?format=pdf


                For other document types it's a bit different.
                Presentation:



                https://docs.google.com/presentation/d/ [alphanumeric code] /edit
                https://docs.google.com/presentation/d/ [alphanumeric code] /export/pdf


                Spreadsheet:



                https://docs.google.com/spreadsheet/ccc?key= [alphanumeric code] 
                https://docs.google.com/spreadsheet/fm?key= [alphanumeric code] &fmcmd=12


                I don't have tried with uploaded files or other formats, but hope it helps.






                share|improve this answer













                Maybe I've found a workaround.



                Firstly be sure to have set the document sharing to anyone with the link.



                Then, in the list view of Google Docs/Drive, select your document and click More > Download... and choose whatever format you want (e.g. PDF). The URL that appears for a second when you finally click Download is the URL you need (the one that works with Google Viewer).



                For text documents you can get the same URL by taking the document editing URL, e.g.:



                https://docs.google.com/document/d/ [alphanumeric code] /edit


                And change it like that:



                https://docs.google.com/document/d/ [alphanumeric code] /export?format=pdf


                For other document types it's a bit different.
                Presentation:



                https://docs.google.com/presentation/d/ [alphanumeric code] /edit
                https://docs.google.com/presentation/d/ [alphanumeric code] /export/pdf


                Spreadsheet:



                https://docs.google.com/spreadsheet/ccc?key= [alphanumeric code] 
                https://docs.google.com/spreadsheet/fm?key= [alphanumeric code] &fmcmd=12


                I don't have tried with uploaded files or other formats, but hope it helps.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 2 '12 at 9:29









                GuglieGuglie

                15112




                15112






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f393501%2fis-it-possible-to-use-google-docs-viewer-to-view-files-already-in-google-docs%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Probability when a professor distributes a quiz and homework assignment to a class of n students.

                    Aardman Animations

                    Are they similar matrix