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

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.

I'm working on some more Cheat Sheets book on Jquery, TypeScript, React js and for other languages. I will send it once it's completed.

Related Posts