How to Embed PDF in HTML using Embed & iframe Tag

How to Embed PDF in HTML using Embed & iframe Tag

<embed src="https://demo.codingdiksha.com/embed-pdf-in-html/files/traveldoc.pdf" type="application/pdf" width="100%" height="700px" />
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Embed PDF in HTML - CODINGDIKSHA.COM</title>
</head>
<body>
   <embed src="https://demo.codingdiksha.com/embed-pdf-in-html/files/traveldoc.pdf" type="application/pdf" width="100%" height="700px" />
</body>
</html>
http://example.com/doc.pdf#page=5
http://example.com/doc.pdf#page=3&zoom=200,250,100
http://example.com/doc.pdf#zoom=100
http://example.com/doc.pdf#page=72&view=fit,100
<iframe
    src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://demo.codingdiksha.com/embed-pdf-in-html/files/traveldoc.pdf"
    height="800px"
    width="100%"
></iframe>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Embed PDF in HTML - CODINGDIKSHA.COM</title>
</head>
<body>
    <iframe
    src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://demo.codingdiksha.com/embed-pdf-in-html/files/traveldoc.pdf"
    height="800px"
    width="100%"
    ></iframe>
</body>
</html>
<embed src="https://demo.codingdiksha.com/embed-pdf-in-html/files/traveldoc.pdf#toolbar=0&navpanes=0&scrollbar=0" type="application/pdf" width="100%" height="700px" />

Leave a Comment