HTML PDF Viewer

Embed PDF content on your HTML website to share guides, catalogs, and documents, giving users a clear and convenient reading experience.
4.8 rating
10,000+ reviews
Free plan available
Create Widget for Free
No credit card needed
HTML PDF Viewer

Create your PDF widget

Configure your PDF Viewer and add it to your HTML website for free!

Screenshots

HTML PDF Viewer
1 / 6

Display PDF files on your HTML page

Show a PDF right on your HTML page, with no external link and no download needed. Visitors read the document where they are, whether it’s a user manual, report, menu, or whitepaper.

Upload your file or add a link, then choose File viewer, Grid, or List to fit your page. Embedded PDFs look good on desktops, tablets, and mobile devices without additional tweaking. Start free with Elfsight.

Key Features of the HTML PDF Viewer

Choose how your documents appear and what visitors can do with them.

  • Layout options: Pick File viewer, Grid, or List for document display.
  • Responsive design: Embedded PDFs look good on desktops, tablets, and mobile devices without additional tweaking.
  • No file hosting required: Upload your PDF directly or insert a link – no third-party file storage is needed.
  • Multiple files: Add several PDFs to a single page.
  • Download button: Visitors can view the file online or download it from the page.

Try every setting in the editor – no registration needed.

How to add PDF Embed to HTML

Create your PDF viewer in the Elfsight editor, then add the code to your HTML website as a static or a floating widget.

Create the viewer:

  1. Open the Elfsight editor.
  2. Select a template that fits your style and purpose.
  3. Upload your PDF or add a link to it.
  4. Set the viewer size, scroll behavior, and download button visibility.
  5. Copy the generated code.

Static widget (the viewer appears in the spot you choose):

  1. Open your website files in a code editor or use your hosting file manager.
  2. Open the HTML file of the page where you want the viewer to appear.
  3. Inside the <body> section, find the place for the viewer and paste the code there.
  4. Save the HTML file.
  5. If you edit files locally, upload the updated file to your web server or your hosting file manager.

Floating widget (the viewer floats on the page):

  1. Open your website files in a code editor or use your hosting file manager.
  2. Open the HTML file of the page where you want the viewer to appear.
  3. Paste the code before the closing </body> tag.
  4. Save the HTML file.
  5. If you edit files locally, upload the updated file to your web server or your hosting file manager.

To show the widget on all pages, add the code to each page manually. If your website shares common files like header.html or footer.html, add the code there to display the widget across all pages.

If you need help, contact our support team.

Ways to embed a PDF in HTML

You can embed a PDF in an HTML page by hand with one of three tags:

  • <iframe> shows the PDF inside your page and is easy to use. Older browsers such as Internet Explorer have limited support, and it has no fallback content if the file fails to load.
  • <object> is easy to customize and supports fallback content, such as a link to the PDF if the file cannot be displayed. Different devices may display the PDF differently.
  • <embed> is easy to use, but it cannot hold fallback content and offers limited controls. The PDF may look different depending on the browser or mobile device.

With each tag you set the size with width and height attributes, and the PDF file has to be available on your server or at a URL.

With Elfsight you don’t need to keep the file on your own hosting: upload your PDF or insert a link, and no third-party file storage is needed. Embedded PDFs look good on desktops, tablets and mobile devices without additional tweaking. Then show your documents in File viewer, Grid, or List mode, and keep the download button on if you want visitors to save a copy.

Can I embed a PDF viewer on a static HTML website?

Yes, Elfsight works on any static HTML website. Paste the generated code into your page source where you want the viewer to appear.

Do I need special hosting to use the PDF Embed widget on HTML?

No special hosting is required. The widget works as long as your HTML website supports JavaScript.

Where do I paste the PDF Embed code on my HTML page?

Paste the generated code into your HTML page where you want the viewer to appear.

Do I need to store my PDF files on my own hosting?

No, third-party file storage is not needed. You can upload the PDF directly in the editor.

Can I upload a PDF file or use a link?

Yes, you can upload a PDF directly or insert a link to it.

Can visitors read PDFs directly on my HTML page?

Yes, the widget includes a built-in viewer, so visitors read PDFs on your HTML page without being redirected elsewhere.

Which display modes does the PDF viewer offer?

You can show documents in File viewer, Grid, or List mode.

Can I display multiple PDF files on one page?

Yes, you can add several PDFs to a single page.

Is bulk upload supported for PDFs?

Yes, you can upload multiple PDF files in a single step.

Can I replace an existing PDF without removing it?

Yes, you can update a file with a new version while keeping its placement and viewer settings.

Can users download embedded PDFs?

Yes, visitors can view the file online or download it from the page. You control download button visibility in the editor.

Can I allow viewing but disable downloads?

Yes, you can disable the download button while on-page viewing stays available.

Does the PDF viewer work on mobile devices?

Yes, embedded PDFs look good on desktops, tablets, and mobile devices without additional tweaking.

Can I try PDF Embed for free?

Yes, you can start using Elfsight for free and try the editor without registration.

Pricing

14-day money back guarantee. Risk-free, you can cancel at anytime.
Elfsight Apps
Platform-independent version that works on any website
from $0 / month
start with free plan
Unlimited websites
Professional support
Free of charge installation service
Special price for multiple apps
100% customizable