amp-google-document-embed

Edit on Github
Open in Playground View Demo

Experimental Mode

This example uses the following experimental feature: [amp-google-document-embed]. Enable the experiment via the button below. Some components require the AMP Dev Channel to be enabled as well. Learn more here.

Enable Dev Channel

Introduction

Embed PDFs and other documents formats into your AMP HTML files.

Setup

Import the amp-google-document-embed component in the header

<script async custom-element="amp-google-document-embed" src="https://cdn.ampproject.org/v0/amp-google-document-embed-0.1.js"></script>

Basic Usage

Documents are embedded via the src attribute.

Example

<amp-google-document-embed src="https://www.gpo.gov/fdsys/pkg/GPO-CONAN-1992/pdf/GPO-CONAN-1992-6.pdf"
  width="8.5"
  height="11"
  layout="responsive">
</amp-google-document-embed>