How do I embed a PDF into a page?
This article explains how to display a PDF on a webpage via embedding. To learn how to create a download link for a PDF (recommended), see Linking to pdfs, mp3s and other media.
A cautionary note
There is no best way to embed a PDF document into a web page. The PDF (portable document format) has become the de facto standard for printable documents, and in theory, doesn't have any built-in means to display on web pages.
If the content of a PDF needs to make it onto a web page, ideally the same information would be recreated in standard HTML, and/or a link to the PDF would be available for users to download the document to their computer. If the PDF is an interactive form, it is especially important that the form be recreated in HTML.
There are some methods you can try however that will attempt to embed a PDF in your page. Retrieve the URL of your document and use that with one of the following embed methods.
Google Doc Viewer (iframe method)
Paste the following code into the HTML view.
<iframe src="http://docs.google.com/gview?url=http://example.com/YOUR-DOCUMENT.pdf&embedded=true" style="width: 700px; height: 500px;" frameborder="0"></iframe>
... or use the Google Docs Viewer code generator.
PDFObject (object method)
PDFObject is a script created by Philip Hutchison that displays a PDF in an object tag. This solution may be best suited for advanced users.
Please also note:
- These methods may not produce your desired results in all browsers.
- Embedding large image files of PDF pages is not recommended.