• Pricing
  1. Home
  2. PDF Converter
  3. How to Convert PDF Documents
  4. Easiest Ways to Embed a PDF File in HTML
200622-EN-Banner-LinkedIn-Headline-Tutorial

Easiest Ways to Embed a PDF File in HTML

by David Beníček

Embed a PDF document in HTML quickly and keep your content accessible. No coding headaches—just simple, seamless ways to display PDFs on your site.

There’s a difference between embedding and linking to a PDF. Linking simply opens or downloads the file, while embedding makes the PDF appear right inside the webpage. Linking to a PDF on your website is the simplest approach, but sometimes this method just doesn’t cut it.

Maybe you want visitors to read a document without leaving the page they're on, or you need a full-size PDF to display nicely on a page. Embedding a PDF directly into an HTML page keeps everything relatively neat and accessible. Both have their uses, so let’s go over the options.

Quickest Way Is to Just Link to the PDF

The absolute easiest method is using a simple tag in the webpage source code. Just pop in the file URL like this:

Quickest-Way-Is-to-Just-Link-to-the-PDF

Want it to open in a new tab? Add target="_blank". And if you prefer having the PDF download to the user’s device as soon as they click on the link, use the download attribute.

Download-Quickest-Way-Is-to-Just-Link-to-the-PDF

This method is quick and lightweight, but it takes users away from the page they’re on. If you want them to stay put, embedding is the way to go.

Embedding a PDF Directly on Your Webpage

There are several ways in which to embed a PDF directly in a webpage.

Using the iframe Tag

The