An open-source standards-friendly JavaScript utility for embedding PDF files into HTML documents.

Embedding PDFs without JavaScript

PDFs can be embedded into HTML pages without JavaScript. Below are four examples of the most common techniques.

Note: these examples work in all modern desktop browsers, but results will vary in older desktop browsers and mobile browsers. As of iOS 9, none of these examples work properly in Safari for iOS.


Using an <object> enables you to leave fallback content if the browser doesn't support PDF embedding.

Example fallback content: This browser does not support PDFs. Please download the PDF to view it: Download PDF.


The <embed> approach is widely supported, but not everywhere. Unfortunately, <embed> doesn't provide a mechanism for fallback content. If the browser doesn't support PDF embedding, the end-user sees nothing.


The <iframe> approach is widely supported.


Using an <object> with an <iframe> fallback will reach the most users.

Now that you've seen how it works with plain HTML markup, check out what's possible with JavaScript and the PDFObject utility.