Html – Recommended way to embed PDF in HTML


What is the recommended way to embed PDF in HTML?

  • iFrame?
  • Object?
  • Embed?

What does Adobe say itself about it?

In my case, the PDF is generated on the fly, so it can't be uploaded to a third-party solution prior to flushing it.

Best Answer

This is quick, easy, to the point and doesn't require any third-party script:

<embed src="" width="500" height="375" 

UPDATE (2/3/2021)

Adobe now offers it's own PDF Embed API.

UPDATE (1/2018):

The Chrome browser on Android no longer supports PDF embeds. You can get around this by using the Google Drive PDF viewer

<embed src="
viewer?embedded=true&url=" width="500" height="375">