amp-google-document-embed

Edit on Github
Open in Playground View Demo

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>