Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save simplesoft-duongdt3/9ad3fee0307141f7022f75cd9553f9e6 to your computer and use it in GitHub Desktop.
Save simplesoft-duongdt3/9ad3fee0307141f7022f75cd9553f9e6 to your computer and use it in GitHub Desktop.

Revisions

  1. @Aarbel Aarbel revised this gist Dec 18, 2018. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -18,9 +18,11 @@

    Documentation here : https://products.office.com/fr-FR/office-online/view-office-documents-online?legRedir=true&CorrelationId=1fe164cf-2fd0-4194-89c8-c2be0bb4bc85

    ## Office Online editor.
    ## Office Online editor integration.

    Office just unveiled Microsoft Online editor, which could be integrated into your app, like Dropbox does. More infos here : https://wopi.readthedocs.io/en/latest/overview.html
    Office just unveiled Microsoft Online editor, which could be integrated into your app, like Dropbox does. More infos here :
    - https://wopi.readthedocs.io/en/latest/overview.html
    - https://wopi.readthedocs.io/en/latest/

    ## Google Docs Viewer

  2. @Aarbel Aarbel revised this gist Dec 18, 2018. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,10 @@

    Documentation here : https://products.office.com/fr-FR/office-online/view-office-documents-online?legRedir=true&CorrelationId=1fe164cf-2fd0-4194-89c8-c2be0bb4bc85

    ## Office Online editor.

    Office just unveiled Microsoft Online editor, which could be integrated into your app, like Dropbox does. More infos here : https://wopi.readthedocs.io/en/latest/overview.html

    ## Google Docs Viewer

    Only files under 25 MB can be previewed with the Google Drive viewer.
  3. @Aarbel Aarbel revised this gist Dec 18, 2018. No changes.
  4. @Aarbel Aarbel revised this gist Dec 12, 2018. No changes.
  5. @Aarbel Aarbel revised this gist Dec 12, 2018. No changes.
  6. @Aarbel Aarbel revised this gist Dec 12, 2018. 1 changed file with 14 additions and 2 deletions.
    16 changes: 14 additions & 2 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -46,8 +46,11 @@ Google Drive viewer helps you preview over 16 different file types, listed below
    **Format :**
    ```
    https://docs.google.com/viewer?url=[FILE_URL_NOT_ENCODED]
    https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf
    https://docs.google.com/viewer?url=http://techslides.com/demos/samples/sample.docx
    <iframe src="https://docs.google.com/gview?url=[FILE_URL]&embedded=true"></iframe>
    ```
    You can add the hl query parameter to specify a different locale using ISO language codes. For instance, to use Dutch you should add &hl=nl as in the following example:
    ```
    <iframe src="https://docs.google.com/gview?url=[FILE_URL]&embedded=true&hl=en"></iframe>
    ```

    **Examples :**
    @@ -56,6 +59,15 @@ Google Drive viewer helps you preview over 16 different file types, listed below
    https://docs.google.com/viewer?url=http://techslides.com/demos/samples/sample.docx
    ```

    ## Zoho Viewer
    ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx', '.jpg', '.png', '.gif', etc)

    **Format :**
    ```
    https://sheet.zoho.com/sheet/view.do?url==[FILE_URL]
    ```


    # Mobile Apps

    ## Office mobile apps
  7. @Aarbel Aarbel revised this gist Dec 12, 2018. 1 changed file with 13 additions and 4 deletions.
    17 changes: 13 additions & 4 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,18 @@
    ## Office Web Apps Viewer
    ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

    **Links :**
    **Format :**
    ```
    http://view.officeapps.live.com/op/view.aspx?src=[ONLY_OFFICE_FILE_URL_ENCODED]
    https://view.officeapps.live.com/op/view.aspx?src=http%3A%2F%2Ftechslides.com%2Fdemos%2Fsamples%2Fsample.docx
    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[ONLY_OFFICE_FILE_URL_ENCODED]' width='px' height='px' frameborder='0'>
    </iframe>
    ```

    **Examples :**
    ```
    https://view.officeapps.live.com/op/view.aspx?src=http%3A%2F%2Ftechslides.com%2Fdemos%2Fsamples%2Fsample.docx
    ```

    Documentation here : https://products.office.com/fr-FR/office-online/view-office-documents-online?legRedir=true&CorrelationId=1fe164cf-2fd0-4194-89c8-c2be0bb4bc85

    @@ -40,13 +43,19 @@ Google Drive viewer helps you preview over 16 different file types, listed below
    * XML Paper Specification (.XPS)
    * Archive file types (.ZIP and .RAR)

    **Links :**
    **Format :**
    ```
    https://docs.google.com/viewer?url=[FILE_URL_NOT_ENCODED]
    https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf
    https://docs.google.com/viewer?url=http://techslides.com/demos/samples/sample.docx
    ```

    **Examples :**
    ```
    https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf
    https://docs.google.com/viewer?url=http://techslides.com/demos/samples/sample.docx
    ```

    # Mobile Apps

    ## Office mobile apps
  8. @Aarbel Aarbel revised this gist Dec 12, 2018. 1 changed file with 10 additions and 4 deletions.
    14 changes: 10 additions & 4 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -5,9 +5,11 @@

    **Links :**
    ```
    http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]
    http://view.officeapps.live.com/op/view.aspx?src=[ONLY_OFFICE_FILE_URL_ENCODED]
    https://view.officeapps.live.com/op/view.aspx?src=http%3A%2F%2Ftechslides.com%2Fdemos%2Fsamples%2Fsample.docx
    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[ONLY_OFFICE_FILE_URL_ENCODED]' width='px' height='px' frameborder='0'>
    </iframe>
    ```

    @@ -40,8 +42,9 @@ Google Drive viewer helps you preview over 16 different file types, listed below

    **Links :**
    ```
    https://docs.google.com/viewer?url=[FILE_URL]
    https://docs.google.com/viewer?url=[FILE_URL_NOT_ENCODED]
    https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf
    https://docs.google.com/viewer?url=http://techslides.com/demos/samples/sample.docx
    ```

    # Mobile Apps
    @@ -67,7 +70,10 @@ Googlesheets://http://docs.google.com/spreadsheets/Google-document
    More infos here : https://apple.stackexchange.com/questions/113680/how-to-open-google-drive-links-directly-in-google-drive-app

    ## Resources


    Samples files for testing :
    http://techslides.com/sample-files-for-development

    Info:
    http://www.labnol.org/internet/google-docs-viewer-alternative/
    http://googlesystem.blogspot.com/2015/02/google-docs-viewer-page-no-longer.html
  9. @Aarbel Aarbel revised this gist Dec 12, 2018. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -3,11 +3,13 @@
    ## Office Web Apps Viewer
    ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

    **Links : **
    **Links :**
    ```
    http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]
    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
    </iframe>
    ```

    Documentation here : https://products.office.com/fr-FR/office-online/view-office-documents-online?legRedir=true&CorrelationId=1fe164cf-2fd0-4194-89c8-c2be0bb4bc85

    @@ -36,9 +38,11 @@ Google Drive viewer helps you preview over 16 different file types, listed below
    * XML Paper Specification (.XPS)
    * Archive file types (.ZIP and .RAR)

    **Links : **
    **Links :**
    ```
    https://docs.google.com/viewer?url=[FILE_URL]
    https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf
    ```

    # Mobile Apps

    @@ -51,7 +55,7 @@ list of scheme names used to invoke :
    ms-excel:
    ```

    More here : https://wopi.readthedocs.io/projects/officewopi/en/latest/scenarios/from_app.html
    More infos here : https://wopi.readthedocs.io/projects/officewopi/en/latest/scenarios/from_app.html

    ## Drive mobile apps
    Ex:
    @@ -60,7 +64,7 @@ Googlesheets://[FILE_URL]
    Googlesheets://http://docs.google.com/spreadsheets/Google-document
    ```

    More here : https://apple.stackexchange.com/questions/113680/how-to-open-google-drive-links-directly-in-google-drive-app
    More infos here : https://apple.stackexchange.com/questions/113680/how-to-open-google-drive-links-directly-in-google-drive-app

    ## Resources

  10. @Aarbel Aarbel revised this gist Dec 12, 2018. 1 changed file with 21 additions and 59 deletions.
    80 changes: 21 additions & 59 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,15 @@
    # Desktop / Web

    ## Office Web Apps Viewer
    ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

    **Links : **
    http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
    </iframe>

    ### OneDrive Embed Links

    **Powerpoint**

    ```
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2133463&authkey=AFh1O3tkDLAQzzw&em=2" width="402" height="327" frameborder="0" scrolling="no"></iframe>
    ```

    **Excel**

    ```
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2136277&authkey=AHJ96YRJIbbJcec&em=2" frameborder="0" scrolling="no" width="800" height="346"></iframe>
    ```

    Documentation here : https://products.office.com/fr-FR/office-online/view-office-documents-online?legRedir=true&CorrelationId=1fe164cf-2fd0-4194-89c8-c2be0bb4bc85

    ## Google Docs Viewer

    @@ -45,64 +36,35 @@ Google Drive viewer helps you preview over 16 different file types, listed below
    * XML Paper Specification (.XPS)
    * Archive file types (.ZIP and .RAR)

    ### Google Docs Viewer (Apps)
    https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL]

    ### Google Docs Viewer
    https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL]
    **Links : **
    https://docs.google.com/viewer?url=[FILE_URL]
    https://docs.google.com/viewer?url=http://research.google.com/archive/bigtable-osdi06.pdf

    ## Google Drive
    # Mobile Apps

    **Sheets**
    ## Office mobile apps

    list of scheme names used to invoke :
    ```
    <iframe src="https://docs.google.com/spreadsheets/d/13R8O15c_sZKZT2QRHom1z2SDA3E1O5chUvROnqHCkwE/pubhtml?widget=true&amp;headers=true" style="width:100%;height:100%;"></iframe>
    ms-word:
    ms-powerpoint:
    ms-excel:
    ```

    ### Embedded File Viewer

    Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.

    **Google Drive Viewer: Explicit PDF files**
    ```
    <iframe src="https://docs.google.com/viewer?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
    ```
    More here : https://wopi.readthedocs.io/projects/officewopi/en/latest/scenarios/from_app.html

    ## Drive mobile apps
    Ex:
    ```
    <iframe src="https://drive.google.com/viewerng/viewer?url=http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true" frameborder="0"></iframe>
    Googlesheets://[FILE_URL]
    Googlesheets://http://docs.google.com/spreadsheets/Google-document
    ```

    **Google Drive Viewer: Non-PDF files (fileviewer URL)**

    To view Google Drive docs from fileviewer links, use the file ID as the `srcid` attribute in the iframe.

    The file ID for your PDF (one that is already in Google Drive) can be found in the PDFs web address. When you open a PDF, it’s the garbage-looking piece of the URL (it will be between forward-slashes, “/”).

    ![](http://www.benschersten.com/blog/wp-content/uploads/2014/04/Screen_Shot_2014-04-30_at_8_29_17_AM.jpg)

    The file ID is highlighted in yellow.

    In this case it’s the 0B3xoQi_oa7_hU2J5S1RQbFdqS3c

    Source: [http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true](http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true)

    `id: 0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh`

    Or

    Source: [https://drive.google.com/file/d/0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh/view?ddrp=1&hl=en#](https://drive.google.com/file/d/0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh/view?ddrp=1&hl=en#)

    `id: 0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh`

    Result:

    ```
    <iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>
    ```
    More here : https://apple.stackexchange.com/questions/113680/how-to-open-google-drive-links-directly-in-google-drive-app

    ## Resources


    Info:
    http://www.labnol.org/internet/google-docs-viewer-alternative/
    http://googlesystem.blogspot.com/2015/02/google-docs-viewer-page-no-longer.html

  11. @tzmartin tzmartin revised this gist Oct 7, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    ## Office Web Apps Viewer
    ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

    ### Pantalla completa
    http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
  12. @tzmartin tzmartin revised this gist Oct 7, 2016. 1 changed file with 44 additions and 16 deletions.
    60 changes: 44 additions & 16 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,13 @@
    ## OneDrive Embed Links
    ## Office Web Apps Viewer
    ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

    ### Pantalla completa
    http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

    <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
    </iframe>

    ### OneDrive Embed Links

    **Powerpoint**

    @@ -12,35 +21,48 @@
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2136277&authkey=AHJ96YRJIbbJcec&em=2" frameborder="0" scrolling="no" width="800" height="346"></iframe>
    ```

    ## Google Drive

    **Sheets**

    ```
    <iframe src="https://docs.google.com/spreadsheets/d/13R8O15c_sZKZT2QRHom1z2SDA3E1O5chUvROnqHCkwE/pubhtml?widget=true&amp;headers=true" style="width:100%;height:100%;"></iframe>
    ```
    ## Google Docs Viewer

    ### Embedded File Viewer
    Only files under 25 MB can be previewed with the Google Drive viewer.

    Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.
    Works for PDF and PPT
    Google Drive viewer helps you preview over 16 different file types, listed below:

    Supported File Formats of Google Docs Viewer:
    * Adobe PDF (.PDF)
    * Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
    * Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
    * Text files (.TXT)
    * Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
    * Microsoft Word (.DOC and .DOCX)
    * Microsoft Excel (.XLS and .XLSX)
    * Microsoft PowerPoint (PPT, .PPTX)
    * Microsoft PowerPoint (.PPT and .PPTX)
    * Adobe Portable Document Format (.PDF)
    * Apple Pages (.PAGES)
    * Adobe Illustrator (.AI)
    * Adobe Photoshop (.PSD)
    * Tagged Image File Format (.TIFF)
    * Autodesk AutoCad (.DXF)
    * Scalable Vector Graphics (.SVG)
    * PostScript (.EPS, .PS)
    * TrueType (.TTF)
    * XML Paper Specification (.XPS)
    * Tagged Image File Format (.TIF, .TIFF)
    * Archive file types (.ZIP and .RAR)
    * Text and Markup/COde (.TXT, .CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)

    ### Google Docs Viewer (Apps)
    https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL]

    ### Google Docs Viewer
    https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL]

    ## Google Drive

    **Sheets**

    ```
    <iframe src="https://docs.google.com/spreadsheets/d/13R8O15c_sZKZT2QRHom1z2SDA3E1O5chUvROnqHCkwE/pubhtml?widget=true&amp;headers=true" style="width:100%;height:100%;"></iframe>
    ```

    ### Embedded File Viewer

    Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.

    **Google Drive Viewer: Explicit PDF files**
    ```
    @@ -79,3 +101,9 @@ Result:
    <iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>
    ```

    ## Resources


    Info:
    http://www.labnol.org/internet/google-docs-viewer-alternative/

  13. @tzmartin tzmartin revised this gist Oct 6, 2016. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -63,9 +63,15 @@ The file ID is highlighted in yellow.

    In this case it’s the 0B3xoQi_oa7_hU2J5S1RQbFdqS3c

    Source: [http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true](http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true)

    `id: 0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh`

    Source: [http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true](http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true)
    Or

    Source: [https://drive.google.com/file/d/0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh/view?ddrp=1&hl=en#](https://drive.google.com/file/d/0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh/view?ddrp=1&hl=en#)

    `id: 0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh`

    Result:

  14. @tzmartin tzmartin revised this gist Oct 6, 2016. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -53,7 +53,17 @@ Supported File Formats of Google Docs Viewer:

    **Google Drive Viewer: Non-PDF files (fileviewer URL)**

    To view Google Drive docs from fileviewer links
    To view Google Drive docs from fileviewer links, use the file ID as the `srcid` attribute in the iframe.

    The file ID for your PDF (one that is already in Google Drive) can be found in the PDFs web address. When you open a PDF, it’s the garbage-looking piece of the URL (it will be between forward-slashes, “/”).

    ![](http://www.benschersten.com/blog/wp-content/uploads/2014/04/Screen_Shot_2014-04-30_at_8_29_17_AM.jpg)

    The file ID is highlighted in yellow.

    In this case it’s the 0B3xoQi_oa7_hU2J5S1RQbFdqS3c



    Source: [http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true](http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true)

  15. @tzmartin tzmartin revised this gist Oct 6, 2016. 1 changed file with 17 additions and 2 deletions.
    19 changes: 17 additions & 2 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,24 @@
    ## OneDrive Embed Links

    **Powerpoint**

    ```
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2133463&authkey=AFh1O3tkDLAQzzw&em=2" width="402" height="327" frameborder="0" scrolling="no"></iframe>
    ```

    **Excel**

    ```
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2136277&authkey=AHJ96YRJIbbJcec&em=2" frameborder="0" scrolling="no" width="800" height="346"></iframe>
    ```

    ## Google Drive

    **Sheets**

    ```
    <iframe src="https://docs.google.com/spreadsheets/d/13R8O15c_sZKZT2QRHom1z2SDA3E1O5chUvROnqHCkwE/pubhtml?widget=true&amp;headers=true" style="width:100%;height:100%;"></iframe>
    ```

    ### Embedded File Viewer

    @@ -34,17 +43,23 @@ Supported File Formats of Google Docs Viewer:
    * Text and Markup/COde (.TXT, .CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)

    **Google Drive Viewer: Explicit PDF files**
    ```
    <iframe src="https://docs.google.com/viewer?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
    <iframe src="https://drive.google.com/viewerng/viewer?url=http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true" frameborder="0"></iframe>
    ```

    ```
    <iframe src="https://drive.google.com/viewerng/viewer?url=http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true" frameborder="0"></iframe>
    ```

    **Google Drive Viewer: Non-PDF files (fileviewer URL)**

    To view Google Drive docs from fileviewer links

    Source: http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true
    Source: [http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true](http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true)

    Result:

    ```
    <iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>
    ```

  16. @tzmartin tzmartin created this gist Oct 6, 2016.
    50 changes: 50 additions & 0 deletions embedded-file-viewer.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    ## OneDrive Embed Links

    **Powerpoint**
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2133463&authkey=AFh1O3tkDLAQzzw&em=2" width="402" height="327" frameborder="0" scrolling="no"></iframe>

    **Excel**
    <iframe src="https://onedrive.live.com/embed?cid=CA582F2BC3AD1590&resid=CA582F2BC3AD1590%2136277&authkey=AHJ96YRJIbbJcec&em=2" frameborder="0" scrolling="no" width="800" height="346"></iframe>

    ## Google Drive

    **Sheets**
    <iframe src="https://docs.google.com/spreadsheets/d/13R8O15c_sZKZT2QRHom1z2SDA3E1O5chUvROnqHCkwE/pubhtml?widget=true&amp;headers=true" style="width:100%;height:100%;"></iframe>

    ### Embedded File Viewer

    Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.
    Works for PDF and PPT

    Supported File Formats of Google Docs Viewer:
    * Adobe PDF (.PDF)
    * Microsoft Word (.DOC and .DOCX)
    * Microsoft Excel (.XLS and .XLSX)
    * Microsoft PowerPoint (PPT, .PPTX)
    * Apple Pages (.PAGES)
    * Adobe Illustrator (.AI)
    * Adobe Photoshop (.PSD)
    * Autodesk AutoCad (.DXF)
    * Scalable Vector Graphics (.SVG)
    * PostScript (.EPS, .PS)
    * TrueType (.TTF)
    * XML Paper Specification (.XPS)
    * Tagged Image File Format (.TIF, .TIFF)
    * Archive file types (.ZIP and .RAR)
    * Text and Markup/COde (.TXT, .CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)

    **Google Drive Viewer: Explicit PDF files**
    <iframe src="https://docs.google.com/viewer?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
    <iframe src="https://drive.google.com/viewerng/viewer?url=http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true" frameborder="0"></iframe>


    **Google Drive Viewer: Non-PDF files (fileviewer URL)**

    To view Google Drive docs from fileviewer links

    Source: http://docs.google.com/fileview?id=0B5ImRpiNhCfGZDVhMGEyYmUtZTdmMy00YWEyLWEyMTQtN2E2YzM3MDg3MTZh&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true

    Result:

    <iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>