amp-google-document-embed
Introduction
Use the amp-google-document-embed
component to embed PDFs and other documents formats directly 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. Here we're embedding a PDF document.
<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>
Jika penjelasan pada halaman ini tidak menjawab semua pertanyaan Anda, silakan hubungi pengguna AMP lainnya untuk mendiskusikan contoh penggunaan Anda yang spesifik.
Kunjungi Stack Overflow Fitur yang tidak dijelaskan?Proyek AMP sangat menganjurkan partisipasi dan kontribusi Anda! Kami berharap Anda akan terus ambil bagian dalam komunitas sumber terbuka kami, tetapi kami juga menerima kontribusi satu kali untuk topik tertentu yang Anda minati.
Edit sampel di GitHub-
Written by @cvializ