Documentation

Everything you need to embed a PDF.

Three ways to use PDFembed: the iframe generator (no setup), URL parameters (full control), or the self-hosted JavaScript library (for advanced theming).

Quick start

Paste a PDF URL into the generator on the home page, copy the iframe, and paste it into any HTML. That's all.

Minimal embed
<iframe src="https://pdfembed.com/embed/?url=https%3A%2F%2Fexample.com%2Freport.pdf" width="100%" height="600" style="border:0;border-radius:8px;overflow:hidden" allow="fullscreen" loading="lazy" title="PDF viewer"></iframe>

URL parameters

Append parameters to the viewer URL to control its appearance and behavior.

Parameter
Type
Required
Description
url
string
yes
Absolute URL of the PDF to render. Must be reachable from the visitor's browser.
theme
auto | light | dark
no
Color theme. `auto` follows the visitor's OS preference. Defaults to `auto`.
toolbar
0 | 1
no
Show or hide the top toolbar. Defaults to `1`.
download
0 | 1
no
Show or hide the download button. Defaults to `1`.
page
integer ≥ 1
no
Page to open initially. Defaults to `1`.

Frameworks

An iframe works everywhere. Some convenience snippets:

WordPress
[iframe src="https://pdfembed.com/embed/?url=YOUR_PDF" width="100%" height="600" style="border:0;border-radius:8px;overflow:hidden"]
Notion
Paste the viewer URL into a /embed block. Notion will render it inline.
Next.js / React
<iframe
  src={`https://pdfembed.com/embed/?url=${encodeURIComponent(pdfUrl)}`}
  width="100%"
  height="600"
  style={{ border: 0, borderRadius: 8, overflow: "hidden" }}
  allow="fullscreen"
  loading="lazy"
  title="PDF viewer"
/>

Self-hosting

If you want to ship the viewer from your own domain — for offline use, full styling control, or compliance — install the open-source EmbedPDF library directly.

<div id="pdf"></div>
<script type="module">
  import { EmbedPDF } from "https://cdn.jsdelivr.net/npm/@embedpdf/core/dist/embedpdf.min.js";
  EmbedPDF.create({ target: "#pdf", url: "/path/to/your.pdf" });
</script>

Security & privacy

PDFembed loads PDFs client-side — we never see your file. The hosted viewer sends no telemetry, sets no third-party cookies, and respects whatever access controls your origin server enforces.