Explore Courses Blog Tutorials Interview Questions
0 votes
in Web Technology by (20.3k points)

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.

1 Answer

0 votes
by (40.7k points)

Try using the code given below:

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


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

UPDATE (1/2018):

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

<embed src="

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


You can just use the PDF.JS library. It's a pure HTML5/JavaScript renderer for PDF documents without any third-party plugins.

For an online demo, refer to this link:


Related questions

0 votes
1 answer
asked Aug 14, 2019 in Web Technology by Sammy (47.6k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jan 2, 2021 in Python by ashely (50.2k points)

Browse Categories