How to embed a pdf in html without downloading and printing?

Hi Friends 👋,

Welcome To aGuideHub! ❤️

In this tutorial, we will learn how to embed a pdf in html without downloading and printing.

The users to download your PDF file, add #toolbar=0 after the URL of your PDF document.

To embed pdf in html without downloading and printing it, put <embed> class to generate pdf in html

Table of contents

  • Define its class name

Step 1: Define its class name

After that, create embed a pdf in html without downloading and printing use .#toolbar=0.

    <h1>PDF Example</h1>
    <p>Open a PDF file.</p>

    <embed src="Get_Started_With_Smallpdf.pdf#toolbar=0" width="500" height="375">

Example.

Let’s look at the following example to understand how it basically works:

<html>

<head>
    <title>PDF Example</title>
</head>

<body>
    <h1>PDF Example</h1>
    <p>Open a PDF file.</p>

    <embed src="Get_Started_With_Smallpdf.pdf#toolbar=0" width="500" height="375">
</body>

</html>

Check the output of the above code example.

HTML, pdf

All the best 👍

Premium Content

You can get all the below premium content directly in your mail when you subscribe us

Books

Interview Questions

Soon You will get CSS, JavaScript, React Js, and TypeScript So Subscribe to it.

Portfolio Template

View | Get Source Code

Cheat Sheets

Cheat Sheets Books are basically Important useful notes which we use in our day-to-day life.

Related Posts