Skip to main content
100%

Google Docs Viewer and Office Web Apps Viewer

✓ Published0🌍 Public
PP15GitHubStudent
Last edited Jan 17, 2018
Created on May 22, 2023

This example demonstrates how to embed external document files directly into a webpage using two different browser-based viewer services. It shows a PDF file rendered through the Google Docs Viewer, enabled by an iframe that calls the `docs.google.com/viewer` API endpoint with a `url` parameter pointing to a sample PDF hosted on GitHub. A second iframe displays a Word document via the Microsoft Office Web Viewer, using the `view.officeapps.live.com/op/embed.aspx` API to load a demo `.docx` file. Both examples use fixed-width iframes with a height of 780 pixels to present the documents without leaving the page.

AI-generated description

Similar vizzes