HTML PDF Embed Operation

In this article, we discuss embed pdf in HTML or embed pdf in website using HTML5. In HTML there is a tag that is used for embed PDF file in HTML.

Open PDF within an Iframe

HTML tag has some attributes which are used to manage the embed PDF in website. attribute explanations are given below,

  • src – here you can set the path of the external file to embed.
  • type – here you can set the media type of the embedded content.
  • width – here you can specify the width of the embedded content.
  • height – here you can set the height of the embedded content.

Syntax of HTML PDF embed

// pdf embed code

<embed src="files/nameOfFile.pdf" type="application/pdf" width="100%" height="600px" />

Open PDF within an Iframe

Using HTML object PDF embed operation,

    <object data="your_url_to_pdf" type="application/pdf">
        <embed src="your_url_to_pdf" type="application/pdf" />

Also Check:

Happy Coding..!

Add a Comment

Your email address will not be published. Required fields are marked *